SFML community forums

General => SFML projects => Topic started by: Haikarainen on August 04, 2011, 12:56:03 pm

Title: Conway's Game of Life Clone
Post by: Haikarainen on August 04, 2011, 12:56:03 pm
Hey fellas, Was bored yesterday and couldn't sleep so I created a "Game of Life" http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

Win32 Binaries and source:
https://legacy.sfmluploads.org/file/42

Press space to play/pause simulation, feel free to optimize the code but please note me if you do so :)

Rar contains:
Win32-executable
Pre-compiled unstable SFML2-libraries
Source.rar wich contains the source, icon and codeblocksproject.EDIT: Fancier link, updated sfmluploads :D
Title: Conway's Game of Life Clone
Post by: AlZe on August 10, 2011, 04:30:42 pm
It may be less coherent but it would suffice using a Boolean directly instead of the LifeState object.
Title: Conway's Game of Life Clone
Post by: Haikarainen on August 10, 2011, 07:30:13 pm
Quote from: "AlZe"
It may be less coherent but it would suffice using a Boolean directly instead of the LifeState object.


Lol yes that is very true :D When i made it i was thinking of implementing colours and my own testing sandbox, therefore i created the class.
Title: Conway's Game of Life Clone
Post by: McKnas on August 12, 2011, 01:29:41 pm
Nice, I recently found Game of Life for the first time and thought I would try to make it.
However i used hexagons instead (took rather long time for me to get those damn shapes working) :?
Thought i could share it here alongside yours if anyone is interested :)

https://legacy.sfmluploads.org/file/46

Not very nice code but I didn't plan on sharing this when I wrote it :P
Title: Conway's Game of Life Clone
Post by: Haikarainen on August 12, 2011, 08:14:56 pm
Quote from: "McKnas"
Nice, I recently found Game of Life for the first time and thought I would try to make it.
However i used hexagons instead (took rather long time for me to get those damn shapes working) :?
Thought i could share it here alongside yours if anyone is interested :)

https://legacy.sfmluploads.org/file/46

Not very nice code but I didn't plan on sharing this when I wrote it :P


That is really cool :D What rules do you use? 2 or 3 lives on?
Title: Conway's Game of Life Clone
Post by: McKnas on August 12, 2011, 11:19:03 pm
I first tried using both 2 and 3 i believe, but it was rather dull results...
When i googled hexlife i found this and applied the same rules as he used, got much more interesting then.
http://www.well.com/~dgb/hexlife.html