You inspired me to make my own Game of Life implementation in C++ with SFML
It's over in the WAYWO thread if you wanna see it
[QUOTE=Chris220;26232431]You inspired me to make my own Game of Life implementation in C++ with SFML
It's over in the WAYWO thread if you wanna see it[/QUOTE]
Link?
God yes I feel so awesome at the moment.
I set myself the challenge to port my Game of Life implementation (that was written in Python) to C++ without almost no knowledge of the language, and the only support of the SFML tuts about drawing Rects or gathering events.
Here's what I got so far:
[img]http://dl.dropbox.com/u/2951174/GameOfLife/c%2B%2B2.png[/img]
Basically creates a 2D array to store the status of every cell. Then, for testing purpose, it fills it with random values (either 0 or 1).
Then inside the game loop, there are 2 loops that go through every x,y of the array and draw the cell if it's alive at the proper positon.
Note that I don't store any info about position, it's calculated by multiplying the number of the cycle by the cell size (which is also customisable and the program dynamically changes accordingly).
Here's how it looks with grid size set to 5px:
[img]http://dl.dropbox.com/u/2951174/GameOfLife/c%2B%2B1.png[/img]
Only one question. Is it fine to use a short unsigned int to store the status of each cell or should I use something else, that consumes less memory (the number can only be 0 or 1)?
Sorry, you need to Log In to post a reply to this thread.