Finally finished this weekend challenge. Well, technically it was finished two weeks ago, I just managed to fix most of the bugs yesterday. There are two modes, Win By 1 and Win By 3. Essentially, you can play against the AI until someone wins one grid, or three grids in a row.
Win By 1 – AI uses a combination of Minimax and Alpha-Beta pruning
Win By 3 – AI uses a Monte Carlo simulation
The UI sucks, as always. I am just bad at creating GUIs.
The source code is available on Github.
I am still intrigued by the use of malloc() and “placement new” to create objects on the heap in C++. This allows you to construct an object at a particular location in memory. Basically memory that has already been allocated.
Malloc() only allocates the requested amount of memory and returns a pointer to it. Whereas,
mallac() with a call to the object’s constructor which initializes the object. In order to use
malloc() with a class, you would have to explicitly call the objects constructor. As well as explicitly calling the object’s destructor!!!
Please do not use placement new unless you really need to place an object in a specific part of memory.
Unturned is a sandbox multiplayer game much like Minecraft. It was recently Greenlit on Steam, and gained a huge amount of popularity in the following few days. The game currently saves player data in the registry (on Windows). Which I thought was a bit strange. Turns out, the developer used PlayerPrefs from Unity.
The key value needs to be converted into Windows-1252 encoded bytes, then decoded as if it were encoded in UTF-8. Each character’s unicode will then need to have ’32’ subtracted from it. Then we mod every character by 255, such that we get an ASCII character. You can read more about the encoding/decoding process here.
On Macs, save data is actually stored in a .plist file. Which can be parsed, and only need to be decoded as if it were UTF-8 encoded. Here is a prototype application which parses the .plist file and displays the decoded ‘inventory_’ value. We can then edit this string to give the player any item, ammo, etc.
Coded in C/C++
The source code has been released on Github. To be honest, this is something I probably won’t be maintaining anymore.
This is a simple file integrity monitor/scanner. I started this after the BlackShades incident. Thought it would be a fun project to do, and a great way to learn more about file I/O.
I stopped playing TF2 for a whole day for this?!?!?! ohmygherd so OP.
Was bored. Rewrote Qt calculator example with new ‘engine’ and the ability to define expressions with parenthesis. Will probably add more features for the lawlz. Nuff said.
Ultron, an automatic homework fetcher/parser. I started working on this to reinforce what I learned using Qt. Too bad I don’t have access to my Moodle account anymore, time to add new features.
All of my GUIs look simple and plain. That will be something I will work on when I have time. Learning Qt is pretty fun :)
Learning how to use the Qt Framework for creating GUIs on Linux. My second application is real simple. I call it Moose. This works the same way as Anonymailer.net, except everything is on your own computer, and you don’t have to worry about third party.
Moose utilizes your local MTA to send emails. Simple GUI allows you to change the To:, From:, Name:, Subject: headers. Depending on how you have your /etc/hosts setup, sending time will differ from a few seconds up to a minute.
This is an extremely useful book on rootkits: Rootkits: Subverting the Windows Kernel
It took me awhile to find all of the source code examples in the book. Since rootkit.com has been taken down, and that is where the book directs you to download from.
These are the examples listed in the book:
Development of a simple x64 bit operating system is now in progress! Matt and I are working on creating a PDF that will explain the methodologies of it’s boot/load/run process.
As well as releasing the source code on GitHub. More information can be found here.
Please visit our forums for questions.
Come check out my vanilla SMF forum.
View the change log: http://micropenguin.net/forums/index.php?topic=2.0