An Algorithm To Randomly Generate Game Dungeons
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.
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???
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...)
The physics engine in Exile was pretty basic, but used to good effect. The procedural generation of the map was heavily specialised and optimised, otherwise it wouldn't have fitted in 32K. The sort of physics engine that the article seems to be referring to is pretty heavy stuff, and is computationally overkill for the task at hand. However, it's "efficient" in programming terms because it already exists, so is "free" to the programmer. Sword of Fargoal had a minimal and highly efficient solution custom-coded to do the job.
Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
All procedural generation is is a really, really, really tight form of compression. It's also lossy compression, so what you recover from it is almost always lots of different things that are all basically the same. Artist created content may be expensive, but it's superior to procedural generation in almost every way.
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.
File under 'M' for 'Manic ranting'
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's still lots of room for innovation in this area.