Continuing on old code

Meganoid3_week1ish2

This week I did a little interview about Space Grunts, random levels, Ouya and PC vs Mobile game development, so check it out over here.

I also finally got Heroes of Loot finished and ready for a May 26th Steam release! The new mouse-aim controls are so sweet, you can still play without just a keyboard and auto-aiming, but if you start using that mouse to target your enemies you’ll have a much better control obviously. It’s really worth checking out ;)

So how about some game development talk? Well, I took a small break from Space Grunts this week to continue work on some slightly older code. You might remember I was working on a level generator back in December (before starting on Space Grunts). It turned from a jetpack-flying game to a platform run and jump game.

This week I went back to that code, dove into the level generator and improved it some more. Turning the closed-cave levels into more open-world platform levels. The bit I added was actually very little code: once the cave generation is done, I go through every horizontal line in the tilemap, and I find the most top empty spot, and remove all the solid stuff above it. This basically removes the “roof” of the map, and turns all the top-cave rooms into “above ground” area’s with a big sky above it.

The result is pretty cool:

It’s also possible to change the variables a bit for each level or world, so that you can have levels that are more focussed on vertical climbing or levels that are mostly horizontal based affairs. You can further more go for smaller-open rooms in a level, or big screen-size rooms. This makes it possible to have a variation in gameplay depending on the levels/world you are in.

The next improvement I did was turn most of the monster placements into “tiles” so that the level generator places tiles in the map where monsters should appear, and these tiles are then processed at run-time to turn the tile into a monster.  Saving a lot of monster-objects in memory and in the update cycle.

Bookmark the permalink.