Posts Tagged ‘peak’
This still isn’t a game yet. It isn’t interactive. But it’s a neat simulation of hungry red dots eating green dots and procreating. And the advancing wall of doom should be a little more obvious now. >:D
My heatmap code was very slow in the Flash Virtual Machine on my ancient PowerPC Mac, so I optimized the hell out of it and now it is actually useful. Here is a demo. Green dots chase red dots, red dots chase yellow dots, and yellow dots chase green dots. The blue clouds you see are the heatmap representing proximity to the nearest green dot. (the red and yellow dots have their own heatmaps too, but you can’t see them)
The “advancing wall of doom” isn’t obvious yet, but hopefully it’ll make sense later.
Just a simple heat map implemented in flash, gradually updates as the heat sources move. Click to move the heat sources. Gonna use it for pathfinding.
I wanted randomly generated wrapping terrain. Perlin Noise! Done. But I want lakes, so I throw in a flood fill. Done! But I don’t want to deal with programming boats or whatever, so I want all of the land to be contiguous. I want people to be able to walk from any piece of land to any other piece of land, so there can be no islands. That was trickier, but, inspired by Photoshop’s “solarize” filter, I came up with an algorithm to generate contiguous wrapping terrain (99.99% of the time), with no islands and plenty of lakes: