var randomThought:int = Math.floor(Math.random() * thoughtsInHead);

I recently rewrote the random level generation code for my current game project, Hell Invades Mars. In addition to the levels being generated much faster, they now feel a lot more random. In my last Flash game project, I had to write a separate application to do level design. While designing a level editor was fun, it was also a good bit of extra work. Thinking about the differences in the development experiences between my current and previous project, I remembered this blog post by Adam “Atomic” Saltsman.

Long story short: a little bit of randomness in your games can be a good thing for the developer (less work) and the player (more variety and replayability).

Post to Twitter Twitter Post to Delicious Delicious Post to Digg Digg Post to Facebook Facebook Post to StumbleUpon StumbleUpon