4 Hugues Ross - Blog: RPG Project - 04 - A visit from the magical recursion fairies
Hugues Ross

9/10/12

RPG Project - 04 - A visit from the magical recursion fairies

I had a very strange yet welcome experience today. I decided to write a recursive flood fill algorithm for the map editor, but I was having trouble with all sorts of buggy results, not to mention frequent stack overflows. Then, I got back to my code this afternoon and it worked seamlessly. My code didn't change, nor did the computer I was using. I'm a little perplexed, but happy with the result.
Now, I need to write a version for non autotiles.
This could be pretty painful.

No comments: