Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411636 Posts in 69394 Topics- by 58448 Members - Latest Member: Danque_Birbington_II

May 13, 2024, 11:51:34 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignProcedural map generation suggestions
Pages: [1]
Print
Author Topic: Procedural map generation suggestions  (Read 2974 times)
Derakon
Level 2
**


View Profile
« on: March 19, 2011, 12:18:34 PM »

Like many here, I'm working on a game that features procedural map generation. Like many here, the goal is to make a Metroidvania game. Originality, I has it!

I could go into a lot of detail about the map generator I currently have, but it's 3500 lines of Python and would require a similar amount of English to do justice to. The short version is that the map is broken up into multiple sectors; within a given sector, all parts of the map should be equally accessible, but crossing from one sector to another requires finding a powerup to bypass some barrier.

What I'm looking for is ways to make the maps generated more interesting. So you have some idea of where I am now, here's two maps.

 * Map one, pretty-printed, showing various tilesets and rudimentary background objects.
 * Map two, showing a more symbolic view before background objects have been placed. This is from later in my development cycle after the different regions became better-separated (but my pretty-printer got broken by the move from SDL to OpenGL rendering, and I haven't fixed it yet).

I've run around in some of these maps. They work pretty well, though of course they're rather empty at the moment -- I'm short on artwork and enemies. What I'm looking for is suggestions on ways to make them more structurally interesting; my basic tunnel-carver doesn't do a whole lot beyond decide where the walls go. You can see one "map feature" I made in the axis-aligned tunnels: the pillars in some rooms are intended to serve as platforms the player must jump on to avoid nasty liquids or spikes. More ideas in a similar vein would be awesome.
Logged
Ben_Hurr
Level 10
*****


nom nom nom


View Profile
« Reply #1 on: March 20, 2011, 07:24:17 AM »

Like many here, I'm working on a game that features procedural map generation. Like many here, the goal is to make a Metroidvania game. Originality, I has it!

I could go into a lot of detail about the map generator I currently have, but it's 3500 lines of Python and would require a similar amount of English to do justice to. The short version is that the map is broken up into multiple sectors; within a given sector, all parts of the map should be equally accessible, but crossing from one sector to another requires finding a powerup to bypass some barrier.

What I'm looking for is ways to make the maps generated more interesting. So you have some idea of where I am now, here's two maps.

 * Map one, pretty-printed, showing various tilesets and rudimentary background objects.
 * Map two, showing a more symbolic view before background objects have been placed. This is from later in my development cycle after the different regions became better-separated (but my pretty-printer got broken by the move from SDL to OpenGL rendering, and I haven't fixed it yet).

I've run around in some of these maps. They work pretty well, though of course they're rather empty at the moment -- I'm short on artwork and enemies. What I'm looking for is suggestions on ways to make them more structurally interesting; my basic tunnel-carver doesn't do a whole lot beyond decide where the walls go. You can see one "map feature" I made in the axis-aligned tunnels: the pillars in some rooms are intended to serve as platforms the player must jump on to avoid nasty liquids or spikes. More ideas in a similar vein would be awesome.
You know, looking at both these maps you've pretty much procedurally remade maps from Metroid 1.  To be honest you could totally get away with this if you were making a Metroidvia with simple maps; ie - SotN and later.

How did you do it actually?
Logged
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #2 on: March 20, 2011, 08:03:33 AM »

I suppose if you really wanted to make more structrual variation, you could make multiple tunnelers of different sizes/shapes, and have them create the different terrain variations.

For instance, if you wanted to focus more on long stretches and jumps, you could have a tunneler that's 3-4 tiles wide (and one high); or if you wanted a place more deliberately structured (like artificial caves/civilizations), you could make a 2x2 or 3x3 one. A tunneler that's 3-4 tall and one wide would result in terrain that's considerably more vertical-oriented for climbing and/or wall-jumping action; and you could also make a "mini-tunneler" that's only half a tile each way, to get something more nuanced and gritty. You could even make an "untunneler" that fills particular opened areas with destructible terrain, maybe even an environmental hazard; like spiky vines/bushes that can be cut away.

At this point, I think you should consider the items/weapons you plan on featuring in JetBlade, and produce things like that which illustrate each one's distinctive value. Much of the "update" I've been working on to Gentrieve is focused on that design scheme - taking the items and weapons in the game, and building additional factors and room types which give the items an emphasis of value; which is also the basis behind much of the level design aspect to my iMAGE Zero (and MetroMania) projects; although I'm still at the character-illustration and tileset-development phase of those.
Logged

Derakon
Level 2
**


View Profile
« Reply #3 on: March 20, 2011, 12:42:05 PM »

You know, looking at both these maps you've pretty much procedurally remade maps from Metroid 1.  To be honest you could totally get away with this if you were making a Metroidvia with simple maps; ie - SotN and later.

How did you do it actually?
I finally got around to writing up an article on the process, which you can read here.

I'm hoping to get more complex than Metroid 1, though it's a good starting point. My measuring stick is Super Metroid, naturally; if I can procedurally generate map features of similar levels of detail then I'm doing well. But that's a difficult challenge.

Baconman: good suggestion on looking to the powerups to determine what I should do mapwise. The map should encourage the player to use the powerups they've obtained, or else they aren't very useful.

As for the tunnelers, Jetblade's map generation doesn't quite work that way, but perhaps I can manage something with similar results.

If any of you have any specific suggestions for procedural set-pieces, I'd love to hear them.
Logged
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #4 on: March 20, 2011, 01:18:04 PM »

If any of you have any specific suggestions for procedural set-pieces, I'd love to hear them.

That comes back to the items/weapons thing. Shoot me a PM of what you've got in the planning phase, and I'll see what I can do! Wink
Logged

Derakon
Level 2
**


View Profile
« Reply #5 on: March 20, 2011, 01:52:50 PM »

If any of you have any specific suggestions for procedural set-pieces, I'd love to hear them.

That comes back to the items/weapons thing. Shoot me a PM of what you've got in the planning phase, and I'll see what I can do! Wink
Derp. Of course. May as well list 'em here though.

Given the name "Jetblade", obviously two of the upgrades are gonna be blades and jets -- the one on the arms/legs (figuring they'll retract when not in the middle of a swing) and the other on the back/legs for limited flight. Which implies that I need some more open rooms, but I knew that already.

I'd always planned the first upgrade to be a high-jump ability. Making the corresponding "lock" for this powerup is easy. Smiley

While the plan is to have mostly melee-oriented combat, I do want to include a rocket launcher of some kind. I have a nice explosion graphic I made awhile back and it'd be a shame to not include it. Smiley Obvious uses here would be for destructible terrain and monsters with destructible armor.

I'd like to include some type of speed booster / high-speed mode. I'd thought generally of having a "devil trigger", tentatively named overdrive mode, in which the protagonist's everything is improved. Melee hits deal more damage (possibly the blades only come out during this time, which would improve your melee range as well), motion is faster, jumps are higher, etc. This would be limited by battery packs that recharge with time, and of course you could find more of them to improve your overdrive duration. The overdrive could also be broken up into components, so that you don't find one item and suddenly are able to do everything better.

Anyway, speed upgrades in the Metroid series mean blocks that are breakable by speed boosting, so the obvious set piece is a long mostly-horizontal corridor with a breakable barrier at the end. The overdrive mode implies instant speed, though, not the long run-ups that the Metroid series uses. If it wasn't instant speed, then I'd have to deal with the potential of the player not having enough battery upgrades to make it through. Maybe you retain your speed even when the batteries run out?

Given the concept of bladed armor, it seems reasonable to add a wall-cling ability, presumably as a precursor to the jetpack. Or once you have said jetpack, a way to recharge it without having to land.

I'm not certain the jetpack should fold into the overdrive mechanism, but at the same time it doesn't really work to limit the jetpack's flight time without combining it with the overdrive meter. Maybe flight should be unlimited, which means that the jetpack would generally be the last mobility upgrade you get.

That's what I have so far.
Logged
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #6 on: March 20, 2011, 02:12:43 PM »

Hmm... let's see what directions we can take these powers/combinations thereof.

So far, it sounds reasonably solid; all I'd suggest maybe adding is some kind of "spinning blade" collision attack, not too unlike a Sonic Spin or Top Spin. This, in combination with the melee-based combat structure could result in a fun system that relies on intentional collision-based combat; which could be offset by enemies or obstacles having shields/projectile-based attacks that would require you to dodge, and nail them in between. Even blade-attacks can be executed by "charging through" your enemies; and it would provide a nice role-reversal of the dodging dynamic.

As far as the "jet" system, since you're going for an instant-motion instead of build-up, I'd suggest making it more like the post-crouching Speed Booster trick; that you can basically launch yourself in whatever relative direction you aim in. Now, we just need to introduce gameplay elements that both encourage and discourage use of these various mobilities; and things that put them to use. Clearly the "bushes to cut through" are a step in the right direction. There's also the emphasis on speed, so things that are timing-sensitive like light-screen traps are a good thing to include.

I would also suggest having the "high jump" be almost like a default ability; and that your first upgrade be related more to climbing/wall-jumping instead. Wall-jumps can be a default ability too; but having something that allows to cling to your terrain and climb around in it will make the more vertical-oriented parts of your level generator every bit as intuitive as a usual platforming section - or better yet, allowing the player to basically choose between the two sides.

Finally, if we're going to differenciate the different areas of the map, we should give each a unique gameplay flow/focus about them, then simply insure that the item most helpful to clearing that flow isn't the one guarded within it. (Screen is getting jumpy, I'll do a repost, brb.)
Logged

baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #7 on: March 20, 2011, 03:06:09 PM »

Alright. Looking at the presuming list of powers, you should be able to collect multiple "blades," "jets," perhaps "rockets," and "batteries" to upgrade your potential... as you collect more blades/jets/rockets, you can do more things, and the more advanced stuff could require more batteries/juice to pull off (IE: like an ammo powerup/container).

JET POWERS:
1x = High Jump
2x = Dash Attack (any direction, uses 1 battery)
3x = Speed Booster (prolonged dash attack, drains a second battery as used)
4x = Jetpack/Freeflight (just allows "steering" during Speed Booster; could even tip the gameplay flow towards a multi-directional shmup feel? One battery every 4 seconds.)

BLADE POWERS: (no batteries required!)
1x = Wall Climb/Stick
2x = Cutter Blade (projectile, cuts softer natural hazards)
3x = Stationary Spin Attack (effects a circular range around you, kind of defensive in nature?)
4x = Mobile Spin Attack (similar to Screw Attack, but moves more directly instead of in jump arc? Changes "Speed Booster" to something like a Spin Dash?)

BLAST POWERS:
1x = Bombs (1 battery)
2x = Grenades (1 battery)
3x = Rockets (1 battery)
4x = Super Bombs/Giga Crush (4 batteries; erases enemy shots, too!)

SECRET POWERS:
Laser Specs (headpiece) = Allows you to see active enemy firing ranges, gives slight discoloration to destructible terrain.
Generator (legpiece) = Allows you to refill batteries by running - every 10 tiles you "run" will generate enough static electricity to power one battery.
Hookshot (armpiece) = Allows you to fire a zipline for improved transportability, or like the Scorpion Spear, to pull an enemy to your position.
Overdrive (bodypiece) = This allows you to kick into overdrive; where you have unlimited "battery usage," but they will drain as a form of timer in the meantime. It also drains batteries instantly into your health, which instantly maxes it, and if you take damage while using it, it comes off of your timer, not your health.

Jet powers should be focused on navigating terrain, clearly; so you're going to need an edge-tracing spike/hazard generator, or something to that effect; one that kind of bounds back and forth between surfaces, or provides stuff in the middle to dodge. Speed/timing traps would fit the mobility issue, too; as well as space-controlling elements to navigate around... like an alarm system of some kind, or something like that?.

With the blade powers, I'd still suggest some kind of "bush creator" to tear through those; though some kind of wall-based "snare" thing might catch you, and force you to rely on blades to cut yourself loose. Maybe some objects/power-ups that you can use things like the cutters and spin-attack range to hit or collect?

Blast powers can clearly be dealt with by boulders or foreground-effective, destructible tiles (screw "typecasting" those, that's a cop-out) and shielded enemies... but it can also be used like flares, temporarily lighting up darker areas, filled with light-source "fireplace" objects that explosions can ignite.

Then clearly, we'll need some kind of unexpected, situational hazards unique to the dark, so that visibility would be desriable... but something systematic enough that you could (and may have to!) navigate through the dark without seeing... I know "The Body" part near the end of Aquaria has these things that look like Pirahna Plants, that extend from the background and try to bite/attack you as you pass by them; something to that effect may be cool.

The idea here is that while the powers all have value, especially towards completion %s, they're also somewhat extraneous, and skilled players *can* complete a map all on their own, allowing for great speedrun potential as well. The only thing really missing now, is the goal/objective and boss of the game! And really... I'd stick to a small group of which to collect a set of goal-oriented items from, if you like doing multiple bosses, or a selection between them if you're going for a single end-of-game boss.

Boss design comes down to a form of "level design" as well. If you're going to go for a set, I'd orient each boss around a different power group: Have a "basic/fun boss", a "jet boss," a "blades boss," and a "blast boss;" and focus battle/interaction potential around utilizing your items (or lack thereof?). Beating each boss will "level up" the remaining bosses (so that occurs independently of item collection). Then, have an attack/defense strategy where each of JB's powers that correlate to the boss can capitalize on a different vulnerability - the more of your powers you have before taking on the boss, the faster you can defeat it (by attacking more often); and the fewer you have, the longer you have to endure/survive the attacks to get to your fewer opportunities to attack.

Then, when it comes to basic combat; sure, you'll want some head-to-head colliding action... but the majority of interesting gameplay will come from you having range-limited "get in there" powers, and enemies that have a tendency to shoot at/around you to limit your mobility, and run away when threatened. This also means powering yourself up takes some hunting/effort on behalf of the player; you can't just "milk" an enemy generator; and it creates a sense of natural strife between you and them (close = your advantage, far = theirs). For this very reason, I ALSO suggest NOT damaging the player for contacting this type of enemy - you'll want to *encourage* them to connect!

And while "aim at player" isn't hard to code, it's very predictable; so I'd suggest aiming in variations of 15 or 30 degrees; anticipating the direction the player is heading in. (If they're moving right, aim at "player angle +/- difference, relative to the right.) Multi-shots and pattern-shots could fare well too, or even something evil like being vague about the hit detection. (Screen flashes or gun says "bang," but you don't actually SEE the shots. Unless you're using OD, or get some kind of item to detect gun ranges?)
« Last Edit: March 20, 2011, 04:06:19 PM by baconman » Logged

baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #8 on: March 20, 2011, 03:14:07 PM »

As for player navigation, especially where flight is concerned... I was thinking of a system of 4-directional "accelerator-based" movement... in that once you hit your accelerator, you will continue facing and travelling in a certain direction; and can move relatively with the control pad/arrows.

So "forward" would move you forward quicker, "back" would move you forward slower, and to the sides would simply steer you. Once you release the accelerator (this results in a slowdown/skid-to-stop), you can use the directions to turn and reorient yourself, and then reapply it (regardless of your momentum) in the new direction. Perhaps all that "Jet #4" might do is lessen the gravity during the slowdown phase (where without it, it would fully apply). I'd make the "jet button" seperate from the "jump" button, though; and allow something like "jet + jump" to be some kind of manuever (like a slight rolling dive?).

Some of the longer stretches of corridors would make for that to be an ideal action-climax to the game; and the threefold layouts of your level-builder are near-perfectly balanced for that kind of approach, as well. The jungley areas are clearly built around the blade influence... the caves are great terrain for jetting and have good potential for darkness and blasting as well... and the more roomy-structured areas look good for basic platforming and combat focus. There's plenty of cool "secret area" potential in the first map layout as well. And the water areas? I'd focus that part more to the lower side than the upper corner, and have it work just like the flight part, but without requiring the jet powers for it.

I am still wondering how the different terrain types in your later build (map 2) play out - are they too, in the three archtypes, or are there more now? Also, map 2 has a considerably bigger pool of dead-ends and much fewer looparounds... is it designed to have 255 upgrades or something? Mind popping another 3 maps or so, just to check out the algorhythms/results? Because the two of them look WAY different to me.


Oh... I think I see it now. Like, the blue is the watery part, the red is cavern part, the gray is the techpipe, the bright green is the jungle, and the dark green is... the more bricky part?


EDIT!!: If one tile is surrounded by walls on 3 sides, place a destructible block there concealing a powerup. Wink Give players something to dig up! I'll get to wrestling with level concepts regarding terrains vs. powers; and boss "rooms." But for the most part, if you simply edit the player's abilities, the level design really works as it is. About all I'd maybe change is giving the "hurdles" in the brick area some high-altitude horizontal steps with which to present a high road/low road kind of thing.

As far as the Metroid vs. Super Metroid map? That's mostly just a matter of scale; a map twice as wide would give you that.
« Last Edit: March 20, 2011, 04:40:46 PM by baconman » Logged

Derakon
Level 2
**


View Profile
« Reply #9 on: March 20, 2011, 07:11:15 PM »

Let it never be said that you fall short when it comes to brainstorming. Thanks for all the ideas, Baconman! You rock. Smiley

The second map is short on loopbacks because I haven't added in-sector loop edges yet. I only just recently reworked the map graph generation process to be more controlled -- previously, determining what areas the player could access with a given selection of powerups was more or less impossible, but the new map structure should work much better. It shouldn't be difficult to identify potential loopback locations and insert them so the map doesn't have so few ways to get from point A to point B. I'll get to that after I fix my pretty-printer.

I made a few extra tilesets, but they're not very detailed at all; basically they're just placeholders so I could see what adding more than the three terrain types I had before does to the map. Eventually of course I'd like to have a dozen well-fleshed-out terrain types, but that's for the distant future. Smiley Currently I have the jungle (bright green), a rocky cave (blue), a mossy cave (dark green), a hot cave (red), and the technological zone (grey). Only the jungle has any scenery elements so far, but that's mostly a matter of modeling at this point -- time and some creativity but no implementation hurdles. Well, not until I get around to figuring out how to do display of pools of liquid properly in OpenGL, anyway. That clearly calls for some snazzy particles and glows and so on.
Logged
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #10 on: March 21, 2011, 03:26:17 AM »

Idea!

If you really wanna be a dick (potentially), you could have an option that disables the maps. Evil
Logged

Derakon
Level 2
**


View Profile
« Reply #11 on: March 22, 2011, 08:12:06 AM »

Oh, that'll be one of the challenge options, of course.

One of the nice things about the way I'm building the map is that I can constrain which parts are drawn to the screen since I know who "owns" each map area. Thus instead of having to say "Draw all blocks that are within X of the player", which could cause the player to become aware of blocks that are spatially close but require a lot of traveling to get to, I can just draw the blocks that are in tunnels up to two edges away from the tunnel the player is currently in.

And I can use the map graph as a symbolic map that can be shown in the upper-right corner. Just mark an edge as discovered once the player sees any block in that edge, and it can be added to the symbolic map.
Logged
Derakon
Level 2
**


View Profile
« Reply #12 on: March 25, 2011, 03:17:21 PM »

Figured I may as well post this. I've modified the generator to encourage loops within a given region, which should make exploration less tedious. I've also fixed the pretty-printer, so now you can see just how barren the other regions are in comparison to the "jungle" region.

The greyish areas are filled with water.

Logged
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #13 on: March 25, 2011, 08:02:06 PM »

Jet Boss:

Since the Jet powers center around mobility; this boss encounter should be akin to winning a race through some kind of obstacle course; kind of like Labyrinth Zone Act 3 from Sonic 1; but fast paced, and with you and the boss attempting to plant obstacles in one-another's way. Possibly create a multi-linear submap for this encounter, designed with numerous (5 or so) hazard types, and then only activate a number of the types depending on the boss' difficulty level. You could also stage a race through the in-game world, which could prove interesting in approach, as well.

Blade Boss:

Pure combat, focused on the close/far disparity I discussed with enemies earlier; this boss is protected by 2-3 orbital shields of differing rotation speeds, each a 270-degree arc. Their differing speeds mean that you will have to approach the boss when vulnerable from a particular direction, each of which can be capitalized by using a different Blade power; and it's firepower should be somewhat akin to a Gradius Boss, but with rotational capacity. A higher level boss would result in the ability to combine a greater number of firing patterns at a time.

Blast Boss:

Since the Blast powers mainly affect the environment, I'm thinking it would be best for some kind of environmental interaction to be the focus in this battle; a couple of coordinated blast powers could set up an attack, and expose a vulnerable point in the boss; and damage is done by executing both in succession. Seeing as it's also used to brighten areas, facing this boss at a higher level could also result in facing it in the dark, or facing it at a lower level could mean only going for the environment factor or exposing the vulnerability instead of having to do both. Terrain alteration can also give you some kind of advantage, but not a distinctly "safe" place.

Early "For Fun" Boss:

A classic case of bait-and-wait, this boss should mostly be beaten by turning it's own geometric-related attacks back at it, by exposing a weakness when the boss crosses it's own line-of-fire; although positioning yourself to direct that line-of-fire could/should also play into the tactic as well. Kind of like the Carnival Night Zone Act 1 boss. Higher levels could result in more malicious or deceptive room shapes.

Endgame Boss:

A very active combination of the above concepts, this encounter would mostly be akin to fighting/racing alongside a Gradius-style boss through a contortedly-branched level design; where your main form of attacking is by blasting elements of the level design into the boss' path to expose it, while using your blade powers to actively defend against both direct attacks and level-design hazards. Once exposed and vulnerable, you must close in and use a blade power to quickly attack it and escape. On occasion, you may also end up in a dark region that requires lighting to see, sometimes accompanied with a change in travel direction; or a total dead-end in level design that would require you to blast open a way through.
__________

On an unrelated note... curious about the water pools in the technology zone... do they serve some kind of purpose? Because when I first saw the area, I thought that was mostly going to be focused on as Speed Booster-breakable "hurdles," is there another direction you're going with that?
Logged

baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #14 on: March 25, 2011, 08:19:06 PM »

In fact... for designing the Jet Boss:

Create a "priority" of directions to travel in; Up/Down/Left/Right.
Place the boss near the edge of the map opposite of it's highest priority.
Have it preplan a course accordingly for a particular distance.
Place "the destination" wherever that ends up.

This way, a player can take an alternate, perhaps more optimal route; and yet it success in the encounter will still depend on the player's ability to pull it off. You can even "landmark" the race's destination ahead of time this way, too. Maybe even plant a couple of "fakes" out there too, to throw the players off, and keep them from trumping the boss before the encounter.
Logged

Derakon
Level 2
**


View Profile
« Reply #15 on: March 25, 2011, 11:16:25 PM »

The water in the tech area is part of the "pit" tunnel type, which currently only tries to place itself in the tech region. The idea there is that you have to jump from pillar to pillar and if you screw up you fall into the fluid, which might be nastier than water depending on how early that particular map is generated. It's not very evolved right now. I need to add an expected exploration direction for each tunnel and bias the feature placement around that (so e.g. falling in could require you to walk back to the start of the jumping puzzle).

My current expectation with bosses is that each will be largely confined to a specific arena that won't take up too much space on the map -- a few tunnels' worth or so. Trying to plan out a race without creating a large empty space that isn't very interesting to explore would prove difficult. I'd also like each boss I make to have difficulty level tweaks so I can have it show up earlier or later in the "powerup chain" and still have it be a reasonable challenge. Ideally every boss should be a good fight both when the player has absolutely nothing and when they're armed to the teeth, though that may prove difficult to implement.

I do plan to leverage boss tropes I like, though. Reflected attacks (so long as that's not the only way to damage the boss), evasive bosses, big bosses, etc. No puzzle bosses. They have terrible replayability.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic