Skip to content

Conversation

@JordSant
Copy link
Contributor

@JordSant JordSant commented Dec 7, 2025

Example to show an implementation of Conway's Game of Life.

The Game of Life follows a simple set of rules on a 2D grid with cells in two possible states.
Interesting patterns emerge from the interaction of the previous patterns and the simple rules.

In this implementation some basic starting patterns are used in pre-stored pngs, that the user can select from a list.

The user also can draw its own patterns with the mouse.
For performance, the next generation is computed with a fragment shader on the world of size 2048 x 2048 cells.

@raysan5 raysan5 merged commit 366300a into raysan5:master Dec 9, 2025
16 of 17 checks passed
@raysan5
Copy link
Owner

raysan5 commented Dec 9, 2025

@JordSant thanks for the addition! this example is a bit bigger than usual but still veery nice! Thanks!

@JordSant
Copy link
Contributor Author

JordSant commented Dec 9, 2025

Thanks! It's a pleasure working on raylib, and the game of life is something I wanted to do for some time.
Sorry if it's a bit big, but I couldn't add all the functionality in less lines.
I created another PR to fix the loading of the resources. When approved and merged, please recompile it and upload it to the web.
Please recompile also the shaders_mandelbrot_set example, because it's not working on the raylib web.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants