Reputation: 63
So, I have implemented cellular automata into one of my games in GameMaker. But there are tons of disconnected caves... So does anyone know how to implement an algorithm like Flood Fill?
Upvotes: 0
Views: 661
Reputation: 19513
Have your automata check their immediate neighbours (the four pixels above, below, left and right). If the checked neighbour is the colour they're targeting, spawn an automaton there.
Upvotes: 0