Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 3.62 KB

README_EN-US.md

File metadata and controls

72 lines (52 loc) · 3.62 KB

Conways

Conway's game of life is a simple game that captures the imagination of thousands of people since it was first invented in the seventies by the british mathematician John Horton Conway. The game represent's a celular automaton, and was created to reproduce, using some simple rules, the changes in a group of living cells. At each generation of the game, the rules are applied to determine the cell's life or death. The game "evolves" in generations, and in each one, some interesting patterns can emerge. Depending on the rule's variations, several patterns can emerge, being stable, chaotic or explosive.

Print Print Print Print Print Print Print Print Print Print Print Print Print

It's proposal is a simple one: The game is not played by a player. Between your screen and your chair sits an observer to the game. In the game's screen, we randomly select where our cells are born, and then they start interacting with their neighbors. They, like us, are social beings, they dont like loliness at all. But if the neighborhood gets too crowded...well... lets just say they begin to leave. These are the rules:

  1. If a living cell has 0 or 1 neighbors, they die of loliness
  2. If a living cell has exactly 2 or 3 neighbors, they stay alive where they are
  3. If a dead cell has 3 neighbors, they come back to life
  4. If a living cell has more than 3 neighbors, they will die from overpopulation

And thats it, from this simple concept they start to create patterns and random organizations from the chaos. It is very fun to watch the generations unfold and new, chaotic shapes coming out from it

You can download the game's binaries and run it on your machine by accessing the Releases tab and download the "release.zip" file containing the executables and assets needed to run the program

How to interact with the game:

You can spawn new cells by pressing SPACE You can control the game's speed by pressing the key UP (Increase speed) and key DOWN (Decreases speed)

This game was built in C++ with the Allegro5 library, and compiled(tested) with GCC(g++) 7.3.0

How to compile the game yourself:

  1. Download the Allegro5 libray and add to the PATH of your machine

  2. Clone the repository:

git clone https://github.com/GabrielTheophilo/ConwaysGame.git
  1. Go into the folder that was created
cd ConwaysGame
  1. With the compiler installed (gcc in my example):
gcc -o conwaysgame.exe conways_game.cpp -lallegro -lallegro_image -lallegro_font -lallegro_ttf
  1. The executable will appear on the root folder

  2. If you have any problems with executing, transfer the DLL's from the Allegro5 folder to where the executable is > libstdc++-6.dll, libwinpthread-1.dll e libgcc_s_seh-1

TO DO's:

  1. Edit the game's font
  2. Create a makefile
  3. Add a main menu
  4. Make the project more modular (more OOP oriented)
  5. Integrate the whole game, and variants, after making the main menu - 50% DONE

Screenshots Conway's