Monday, March 28, 2011

Random platforming levels

Currently working on a sort of level generator for very basic platforming games.  It's so far generating the ground with varying heights, and making pits of random length. 

All of these random numbers are pulled from a set of parameters, meaning different levels can generate different feeling stuff.  For example, one level might make wide gaps and long strings of bricks to make a waterfall/cliffside type level, while another makes 2 brick wide posts over tiny gaps to make a challenging jumping area.

Today I added in support for making a "roof" to the level.  This works pretty much like the floor, only upwards.  It's using the same block distance and settings as the floor right now, but I might seperate that later on.  The roof's position in height is based on a set randomized distance from the floor, which should in theory allow for control over the overall empty space in the level.

In reality, sometimes the game is making dead ends now, because the next block of level has the roof too low or the floor too high compared to the last block.  Doh!

It should be a rather simple fix.  I just need it to know what the last block looked like, and not make the next one something that is impassable.

I'd post a demo of it in action, but it's nowhere near any condition to be playable yet.  The main problem is that the player physics are still the default MMF2 platform movement(yes, the terrible one from back in click and create, not the extension movement that is actually good).  And the player's spawn isn't changed yet, so half the time I'm stuck in a wall/roof when I test it out.  Oh, and of course, everything is ugly squares on a white background.  Yeah...maybe I'll just hold off till I get all the game together.

Eventually, what I've got on paper is a lighter, platform game version of an old Rougelike game.
Once I iron out all the bugs, get some sane platform movement/fighting code in place, and get it going from scene to scene("Floors" in the traditional Rougelike), I plan on making a couple of different release versions.  This all depends on how solid or expandable the gameplay turns out to be:

-A single dungeon, no saving flash game. 

This version would be a light, easy to start up romp that tosses you straight into hacking through a probably limitless (or just very very long) dungeon.  Since there's no save and only one life, the game would make a good "coffee break" kind of action/platformer while having that light touch of "how far can your luck/skill hold out?"

-A more complex, multi dungeon stand alone game. 

More then likely, this version would be a downloadable PC game exe.  The great thing with the stand alone version is that I could very easily have two versions, a paid for version and a free "shareware type" version. 

Obveously, the latter "full version" is a very ambitious project.  I'm definetly doing the smaller single dungeon flash game first.

My original idea was to have this be an online, profile driven game that saves your progress in an account, and possibly even had multiplayer. (LAN style 2 to 4 players helping a host for one dungeon, not MMO all on the same server) support.  But I've looked into the backend of those things and I lack the time/money/server/security to invest in such an endeavor.

So that's pretty much what I've been up to lately on the game developer side of the coin.

1 comment:

  1. And yay! I think I caught all the places where it made unpassable terrain and fixed it. All that's left on the terrain part of the engine is an option to not generate a roof(for foresty or plains levels).

    Then I gotta work out how to spawn "things" on the terrain. Might be part of the terrain spawning, or possibly seperate entirely. We'll see.


Please keep your comments clean and avoid flame wars. Thank you!