Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 24, 2024, 09:12:01 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignProcedurally generated Metroidvania
Pages: 1 2 3 [4]
Print
Author Topic: Procedurally generated Metroidvania  (Read 23260 times)
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #60 on: June 09, 2010, 04:46:20 AM »

That sounds workable... but another thing I'm considering in my project (which may work with your projects too), is a more pyramid-like-style configuration to room layouts; by offsetting the "rooms" in particular ways; and wrapping the sides of the screen (ala Pac-Man) to allow longer pathways to be created in less "virtual space."

Wink

See how these rooms all can interconnect, for example? Also bear in mind, that the entire maps wrap, not *just* the magenta-outlined rooms. This can make for both direct and detouring passageways, and all it takes is one consistent border running through each direction; you have a variable map space that can take a variety of shapes and distances from one another, and still be "neatly contained."



Here's another example of a wrapping map, only this time, the rooms/corridors and their contents can be mathmatically "stretched." The elements and triggers are mathmatically spaced more apart, and endpoints of things like moving platforms, climbable surfaces, pit distances, etc.; are calculated based on player abilities, give or take a margin of error.

Areas early on will have a very forgiving margin of error (6 half-tiles or so), allowing you to pretty much skip your way through it; but as you get further/deeper into the levels, between the stretching of obstacles and the margin of error shrinking, you would have to use (or in a Metvania case; gain) more skills, more tactfully to continue.



This is basically (more or less) how I plan to put barriers in the rooms, give or take a slight variation in the middle, depending on how rooms may be adjoined. In the more room-oriented parts of the game (such as the Adventure element), the barriers will be placed first and foremost, and then a variable number of each type will be removed. As rooms are stretched, the barriers themselves are too, they aren't just doubled in instances. The barriers that remain will then also have variables to determine if they do anything widgety (like conveyors, for example, or housing a staircase).

However, in the more open parts of the game like the more exploratory platformer parts, they will begin completely open, and only a limited number of them will added, instead.



Here's a simple idea of how the approaches can be combined, and the following is a bigger (arguably better) one:



I did include some spacey gridmarks in the second, so you can see that in spite of looking like a stack of Tetris block rooms, it still actually derives from the horizontal-offset pyramid structure. It's far more obvious in the first.

The first one, I posted to illustrate a map concept that is less gridlike, and yet still managable; where the second one takes the same two steps (and more space), and does them in the other order, to give you a totally different type of structure. The first corresponds more with my approach to outdoorsy and natural areas, wheras the second one would be more artificial places.
Logged

Derakon
Level 2
**


View Profile
« Reply #61 on: June 09, 2010, 07:55:00 AM »

Seems like you've given a lot of thought to making a grid-based system that doesn't look grid-based. Smiley I went for a more "naturalistic" approach myself, but I admit it does make the process more complicated.

I spent some time yesterday expanding on the design I described earlier and coming up with an algorithm that would actually generate the maps. Here's my plan:

1) Partition the universe up into sectors at a fairly crude scale. I already have code that does this for purposes of assigning a terrain type to each square (you can see it in the unfilled tiles in the map on the Jetblade front page), so I can just adapt that same code to generating N sectors, where N is based on the number of powerups we want to place. Note that I could just directly assign each terrain type as a sector itself, but I'd rather not tie things down like that.

2) Place a series of graph edges down onto the map, such that each edge straddles two sectors, and is far away from any other edge (and no two edges are connected). These are the "lock edges" of the map: they provide access from one sector to the next. The nodes on lock edges are the only nodes that connect across sectors. Each sector should have at least two lock nodes placed in it (i.e. should connect to at least two other sectors), though more is preferable.

3) Grow the map out from the lock nodes in a breadth-first manner. That is, I insert all lock nodes onto the stack. Then I pop a node, read its sector, and then do the following:

a) Try to find nearby nodes that are in the same sector and either disconnected from this node, or far apart in terms of edges to traverse to get to this node. If I can find one such, then connect to it.
b) Also, look for open space in the vicinity that is not too close to other nodes or edges, and place new nodes there, then connect them to this node. Push the new nodes onto the stack.

This does not guarantee that each lock node in the sector will be connected to the other lock nodes in the sector, since it's a fundamentally random process. However, it should be fairly reliable. I can insert a connectivity check once growing the map is done, and either reject the map or prune out disconnected segments.

That's it; from here on out it's the same basic algorithm I've already written. The code I have to traverse the existing map graph will have to be modified since it assumes a recursive (i.e. directional) data structure, while this is an undirected structure; however, that's a comparatively minor detail.

One thing to note is that I could place lock edges that are entirely contained within a sector. These would work well as bossfight rooms; in this case, the "lock" is simply defeating the boss (or, alternately, navigating a particularly tricky platforming segment), and the only thing it provides access to is a powerup. The trick here is that the "lock" doesn't require any special powerups for the player to traverse; just skill.
Logged
X3N
Level 6
*


View Profile
« Reply #62 on: July 20, 2010, 05:05:29 PM »

phroot hath made a procedural metroidvania:
http://forums.tigsource.com/index.php?topic=13005.0
Logged

destiny is truth pre-op
quantumpotato
Quantum Potato
Level 10
*****



View Profile WWW
« Reply #63 on: April 23, 2017, 09:32:15 PM »

I've been playing Salt & Sanctuary lately and thinking hm.. would be interesting to see a short Yoda Stories style game procedurally generated. Fight through 2-3 zones with their bosses, hm.

Anyone played anything good in this regard?
Logged

Tanner
Level 10
*****


MMPHM *GULP*


View Profile WWW
« Reply #64 on: April 24, 2017, 09:12:25 AM »

well since the desktop adventures games were kind of simplified mystery dungeon games, i'd say some of the side dungeons in the newest shiren the wanderer games might scratch that itch
Logged

quantumpotato
Quantum Potato
Level 10
*****



View Profile WWW
« Reply #65 on: April 24, 2017, 10:26:03 AM »

well since the desktop adventures games were kind of simplified mystery dungeon games, i'd say some of the side dungeons in the newest shiren the wanderer games might scratch that itch

oh cool, Roguelikeradio has mentioned that a few times but I couldn't tell how they spelled it!
Logged

Tanner
Level 10
*****


MMPHM *GULP*


View Profile WWW
« Reply #66 on: April 24, 2017, 10:56:36 AM »

if you have a vita, shiren is a must-have. i really hope it gets ported to pc someday, it really deserves a wider audience
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #67 on: April 24, 2017, 01:08:48 PM »

Chalice dungeon
Logged

quantumpotato
Quantum Potato
Level 10
*****



View Profile WWW
« Reply #68 on: April 25, 2017, 05:45:27 AM »

Chalice dungeon
I forgot about those!
Logged

Pages: 1 2 3 [4]
Print
Jump to:  

Theme orange-lt created by panic