An Algorithm To Randomly Generate Game Dungeons 77
An anonymous reader writes: Game developers frequently turn to procedural algorithms to generate some of their game's content. Sometimes it's to give the game more diverse environments, or to keep things fresh upon subsequent playthroughs, or simply just to save precious development time. If you've played a game that had an unpredictable layout of connected rooms, you may have wondered how it was built. No longer; a post at Gamasutra walks through a procedural generation algorithm, showing how random and unique layouts can be created with some clever code. The article is filled with animated pictures demonstrating how rooms pop into existence, spread themselves out to prevent overlap, finds a sensible series of connections, and then fill in the gaps with doors and hallways.
Re: (Score:2)
Re: (Score:3)
Re: (Score:2)
Re:Oh just like Sword of Fargoal? (Score:4, Informative)
That, and many others. Procedural generation is not new.
I did enjoy the article, though. It was well written, well illustrated and fun to read. I have recently written some 2D game code that was generating a different kind of dungeon (not rectangular rooms, more organic / cave like environment. That was a fun project.
An article doesn't have to be about the cutting edge latest smart phone to be interesting. (I admit to have very little interest in smart phone news. I might read some articles when the time comes to buy a new handset...)
Re: (Score:2)
Rogue was the most popular and cloned by many others. Moria on the Vax (780?) pushed the limits of the machine at the time and aparently the limit of the game features was based on what could be tested using the test program that would check that new changes could be won. The odd thing is that it was written on a one off VAX (ouvax?) that had been an odd upgrade research project when DEC had a crazy idea that they could do field updagrades from PDPs to VAXen.
Re: (Score:1)
This is a more advanced algorithm than what would have been used back then! Placement was an integral part of the algorithm (rather than being done by a physics engine to 2D areas within a 2D space).
One example is the "mining" algorithm. Start off with a room, then from one of its walls, dig a corridor or another room. Repeat n times. Dungeon generated.
Obviously you could then do things for object placement. The article's algorithm can make use of the minimum spanning tree endpoints to place items at the en
Yesteryears Algorithms (Score:2, Insightful)
While I agree that the animations are nice to look at fore a minute, such concepts have been around for 30 years, since the early days of Rogue and Hack. Why is this on Slashdot in 2015???
Re: (Score:3)
Exactly my thoughts.
Sorry, but a lot of it is obvious (don't stomp over other rooms, etc.). A lot of it has been around for decades. And I was writing things to do this over 20 years ago for HOBBY projects, so I'm damn sure anyone who needs to write these sorts of things can find the material online, come up with it themselves, and/or already knows it.
Honestly, "geek site" does not equate to "let's just regurgitate 20 year old articles on the basis of programming that people were doing back in the 1980's"
Re: (Score:2)
Indeed, on the surface this appears to be nothing more than an updated version of nethack
Re: (Score:2)
Indeed, on the surface this appears to be nothing more than an updated version of nethack
Yeah, but this is webscale. Huge difference.
Re: (Score:3)
The interesting point to draw from this is surely how the internet has really, really, dumbed us down. I'm constantly infuriated by the amount of repetitive superficial crap that pops up in computer tutorials, and lament the fact that even expensive programming textbooks are seemingly less sophisticated than the magazines of the 80s.
While I agree that it's wrong that our current environment makes this sort of stuff into front-page news, surely we should at least be thankful that there are materials on inter
Re: (Score:3)
Too bad it has some fairly advanced concepts, like Delaunay triangulation, which has been taken from a library and quite frankly - useless. Carmack himself speculated some y
Re: (Score:2)
Obviously you have accumulated too much knowledge for anything to be still interesting to you.
You're getting old. If you're lucky you will develop altzheimers and all of this old stuff will be exciting for you once again.
Re:Yesteryears Algorithms (Score:5, Insightful)
Damn, what a sad attitude to see.
Say there's some 11 year old newbie programmer. She hasn't done any of this yet, and hears, "a lot of people who are into the stuff you're into, are on a place called Slashdot." Yeah, let's agree that our position is: fuck off, newbie, go get your learning and inspiration somewhere else.
I remember reading articles kind of like this, a few decades ago in "COMPUTE!" magazine and similar things. The topics were even old then, and some graybeard from the 1960s might have scoffed with "oh, I was doing that 10-20 years ago." Well, guess what, 1960s graybeard: maybe you didn't leave enough accessible notes, much less, code. And yes, someone can look at (or imagine) results, and make up how they'll do it, without needing to know how you did it. But maybe some kid wants to learn from your mistakes and successes.
Anybody who writes up decent problems and solutions is welcome, IMHO. I don't give a fuck if it's stuff we were doing decades ago. And honestly, most of that source code isn't around anyway. And when I think of my 1980s code, even if I had my old source, you sure-as-fuck wouldn't want to try to read it.
Re: (Score:1)
I'm the AC you replied to. You got my attitude totally wrong. I'm a high school lecturer and am quite used to regurgitating yesteryears concepts to undergraduate students. I like to do it, I take pride in being good at that, I thoroughly enjoy my job.
But: This is not a 1980s (or 60s) textbook, neither a newbie programmer's ideas-for-a-summer-project collection. This is slashdot, and I expect slashdot to be different. Your expectation may vary.
Re: (Score:3)
Re: (Score:1)
Re: (Score:1)
Actually it's a different mechanism to generating non-overlapping rooms than other algorithms that either place rooms, or divide up areas. Overkill - probably. Does it matter? No, not on today's hardware. Also this algorithm isn't portable to very old computers, not that most people care.
There is always a desire to create 'realistic' dungeons. The truth is, most real dungeons are small and compact, so the entire concept of 'realistic dungeon' is rather silly.
Re: (Score:2)
Casual phone games have come up with an interesting variation on procedural generation -- I suppose you could call it "shuffling". One of my favourite examples is called "Platform Panic", and it looks like a very retro flick-screen platformer on first play. On second play, however, you notice that the screens are in a different order. As you play and get further, you get more screen types, and more variations on them, and they generally get more difficult as you progress. I've seen this same approach taken
I have a better title: (Score:2)
Any "hallways" in any area but the periphery are going to be wonky and stupid agglomerations of whatever rooms happened to be shoved in there. Attempting to control for that factor would just make all the rooms too similarly square. And frankly, randomized connectivity is just silly to begin with. Other map generators tend to focus on sticking modules together, in part because the connectivity always makes sense that way. It makes for samey architec
Re: (Score:2)
Re:yawn. (Score:5, Interesting)
The algorithm is new... or at least it's one I've never seen before, and I've been a fairly avid follower of game programming algorithms since the early 1990's, and reading rec.games.programmer every single day.
Using steering behaviors or a physics engine to separate randomly generated rooms is a different approach from anything I've ever seen for dungeon generation.
I'm not convinced that the approach is necessarily superior to anything else that has been done so far, however. It is innovative, yes... interesting, even. Useful? I'm not so sure about that.
But with no taunt you have no tank! (Score:1)
Focusing Without Seeing
A Play in One Act
Beowulf17: "OH BOY! Another random dungeon. Cool! Ok, lads, here we go!"
(send in the tank to start taunting)
(everyone else enters)
(sigh)
Re: (Score:1)
Re: (Score:1)
1980 called and wants their story back (Score:2)
This story is about approximately 35 years old stuff. (I think Rogue came out in 1980)
Re: (Score:2)
Re: (Score:2)
This story is about approximately 35 years old stuff. (I think Rogue came out in 1980)
The ADND Dungeon Master's Guide (a book first published in 1979) had a pretty complex random dungeon (and wilderness) generation system, so the idea is certainly nothing new. There may have been even earlier variants on this theme, I haven't read all the earlier books.
The ADND system was intended for use by a human, but I'm sure lots of people ended up writing computer variants (most of which probably never got published).
It's always nice to have people publish their versions of this kind on thing. There'
Carmack said... (Score:2)
Re: (Score:3)
Physicists might counter that artists are procedural generated.
Re: (Score:1)
Re: (Score:2)
But they need not. Chaos theory means that a deterministic system is capable of generating endless variation. Fractals are a famous example, and in fact games could be seen as systems which procedurally generate a timeline of events based on user input along the way.
Also, I'm not at all sure tha
Re: (Score:1)
Re: (Score:3)
But this has more to do with current state of procedural generators rather than the concept of general. Try Dwarf Fortress [bay12games.com], and you do get extremely varied environments to get your dwarfs killed in.
That is untrue. Any game with s
Re: (Score:2)
Big fan of Brogue and I find that the author did a great interview explaining how it works in his game here:
http://www.rockpapershotgun.com/2015/07/28/how-do-roguelikes-generate-levels/ [rockpapershotgun.com]
He gets more into how the terrain is generated as well.
That is a MUCH better article. Brian Walker has a good overview of dungeon pathfinding too.
http://www.roguebasin.com/inde... [roguebasin.com]
Not new, not news. (Score:2)
The third major rev of Avatar brought an extensible maze generated as needed. One team explored 800+ to the east. Coming from a game that was in a maze 30 by 30 and 15 floors deep (and everybody and their mother knew it), this was a revelation. And annoying.
tl;dr (Score:1)
PLATO Circa 1975-78: Mines of Moria (Score:2)
Probably the first massive multiplayer dungeon game to employ random algorithm "room" generation was the Mines of Moria on the PLATO system circa 1975-78 [wikipedia.org].
New tools in the game engine (Score:2)
It is easy to argue that all of the ideas in the article are not new.
What I found interesting is that rather than reinventing the wheel with custom built functions this author took advantage of
library element that are already in the game engine. Using the physics engine is only a heavyweight solution if you don't have a
preexisting API for handling physics. Since all modern game engines come with these tools it makes sense to adapt the crusty
old process of generating mazes to the tools that are right in fr
Oh this is SO important... (Score:1)