Game of Life with colors

Hello MonoGame community,

I’m currently working on a project based on Conway’s Game of Life, but with colors. I managed to replicate the rules easily, and added some extra things. It’s very basic right now.

  • Cells(not black) around a black pixel have a red color, darker when more black cells surround the red cell.
  • Cells that would go off the screen (x < 0, y < o, x > screenX, y > screenY) return on the other side. This creates an infinite loop when “Gliders” are active.
  • The program counts the total number of cell deaths per position (x, y), and displays a background color, in function of the deaths.
  • Two different viewing modes (normal & raster)
  • You can toggle the background color, clear background or cells, pause and design a pattern, change viewing mode and speed.

This is an early project, and it might grow in features.

Download link here.
You can visit my twitter for more updates on this.

Update: Added color correction so repeating patterns can’t create colors that have a much higher value than the other colors around it.

Some pictures and gifs:

3 Likes

Pretty cool you should do it with render targets and a shader that would be even cooler.

1 Like

Hmm… maybe that’s a good idea!
I’m fairly new to shaders in MonoGame though.
Could you reference some information as a starting point?

Update: Added color correction so repeating patterns can’t create colors that have a much higher value than the other colors around it.

What I thought I was going to see might interest you:

That you place each initial cell with a colour. The colour of each child is then a blend (using some interesting formula) of its parents colours. This might create some interesting evolutionary colours. Then again, the whole world might just end up grey.

1 Like

Yes! This was an idea from the start of the project.
I really like this idea, but I don’t know how to put this into the project, in a user-friendly way.
I’ll try!

New color combination for the game:

1 Like

I don’t know what you did - but I like it!

1 Like

@Tatanka

Thanks!
I’ve shared the code with a friend and he changed some color values.