Example

Improved Cellular Automata

2

McPepic 2022-08-24 16:58 (Edited)

I thought I would write a new cellular automata program because I thought I could do better and also because there was a problem with the old one.

This can provide some smooth generation by splitting the map up into cells and counting the number of neighbors each one has, activating cells that have enough neighbors and deactivating ones that have too few.

Results smooth out with more iterations.

Update: Tap to regenerate map


was8bit 2022-08-25 04:31

Very nice :)


was8bit 2022-08-25 04:57

Smoothie version ;)


SP4CEBAR 2022-08-25 11:41

It kind of looks like a map generator


McPepic 2022-08-25 14:27

@was8bit Nice! I was actually thinking about using this to make an actual game out of my underwater effect demo. I was thinking about a way, though, that I could make it so the areas all stayed connected.


was8bit 2022-08-25 16:00 (Edited)

Thanks :)

If you want a big challange, make one that can loop together in all directions... so you can scroll in any direction and it seemlessly connects.. the whole 32x32 ;)

I can do it with a strict maze format, but it is rather rigid and lacks organic form..

I would imagine using several starter cells, and using math to allow the growth as if there were no edges...

Also, ensuring all paths are connected is easy enough to test, but solving the connection is harder... i have taken the easy path in a maze checker of just starting all over again if the different parts didnt all connect...


Log in to reply.