So, firstly, I completely finished my text-based version of Conway's Game of Life. It now supports the loading of user-made text files (containing a grid of 50*25 ones and zeroes) into the simulation, and has been cleaned up significantly. The new source code is available here for your viewing pleasure.
Then, deciding it was time to continue my SDL learnings with a view to getting the GUI done soon, I continued on with some tutorials, and soon created a game/test thingy where you can add, delete and drag around a collection of clouds (each inscribed with a helpful "Drag me!" message):

Finally, after much procrastination (and feature creep of the test above), I decided the time was right to start making the Game of Life GUI. So, after many hours of fiddly coding and battling with screenfuls (literally) of errors, here it is - the SDLGOL:

As you'll notice, now that it's drawn onto a window instead of being displayed as ASCII in a command-line view the simulation grid is significantly larger. 200*150 cells, to be exact. And yet despite the fact that TestNeighbour() alone is now run around 240,000 times per frame, it still runs incredibly quickly - which is a testimony to the speed of C++. So, in true open-source fashion, here is the source code.
No comments:
Post a Comment