ID:156825
 
Ok, I have pretty much got the basics of SwapMaps down, and it is working quite well. I have one issue though. I am making a side scroller, based off of Mario. It will be single/multi player. And in the single player mode, I am using SwapMaps to give each player their own map to play on. I used a prob() proc to place turfs on the map, and the map looks just fine. But when I use it to place platforms, they are randomly scattered (I expected this, but I wanted to try it to see if I could breed ideas from seeing the chaos) amongst the map, to the point where they do not even look like platforms anymore.

So my question is, what would be the easiest/best way to accomplish this? To make actual platforms and not just scattered blocks.
Of course, procedural map generation in this case doesn't have much to do with SwapMaps, but here's my idea:
Generate the platform blocks in a line, rather than one at a time. Lines start and end, and have blocks in between.

If you want flat platforms, you should try actually making platforms, rather than spawning scattered blocks. I don't really see what the problem is anymore.
This is a surprisingly hard problem, in practice. If you can find code/algorithms for some of the entrants to The Mario Level-Generation Contest, that may be a good place to start.