> Keep in mind the basics of a good story: an escalation in tension and difficulty, spaced with breathers for rhythm and flow.
It's out of scope for this article, but my little game tries to do some of that. Once the dungeon is generated, it chooses a random starting place for the player. Then it calculates the distance to that tile for every other tile.
When monsters, treasure, and quest goals are placed, those distances are taken into account. Harder monsters and better stuff are placed (roughly) farther from the player, so it feels like there's a general progression in difficulty and reward as you go farther through the dungeon.
There's definitely a lot more I could there.
Now that I think about it, one simple refinement would be:
1. Place all of the monsters first.
2. Recalculate distances and treat tiles near monsters as being "high distance" based on the monster's strength so that paths that go through monsters become "longer".
3. Now place treasure according to that.
That would give you dungeons where monsters "guard" better treasure, and stronger monsters protect better loot.
The basic process is:
1. Pick a random difficulty for the monster. 2. Pick n random locations for the monster and place it at the farthest one.
n is based on the monster's difficulty so stronger monsters get more chances to end up farther away. This means you can still run into really hard stuff early, it's just less common.
(Draft in part because some of the figures still need work. I'm a coauthor of the book, but not of this particular chapter.)
I was really excited when I first stumbled onto this book. As you can imagine, it's perfectly in line with my interests. But, when I tried to read it, the prose just killed me. I think there's good ideas in there, but I can't bear to wade through the heavy-handed academic style get there.
I understand writing for a certain venue requires certain stylistic choices, but I really hope you guys can tone it down a bit. Here's a sentence plucked randomly from the linked chapter:
> "Generative grammars were originally devised as a method to formally describe sets of linguistic phrases."
Let me just go through that:
"originally devised" -> "Devise" implies originality.
"as a method" -> This adds nothing to the sentence.
"formally" -> I suppose this matters in some cases but given that the chapter isn't a precise introduction to generative grammars, whether or not it's a formal system doesn't seem very critical to me.
"sets of" -> This adds nothing.
"linquistic" -> What other kinds of phrases are there?
I would edit this sentence down to:
> Generative grammars were invented to describe written text.
I understand academic writing isn't designed to be read for pleasure, but we're all human. If you make the prose more approachable, you'll reach a much wider audience. You have some fantastic material in here, great algorithms, diagrams, and structure. I just feel that the writing style gets in the way of it.
If I could suggest anything, it's that the authors go through the prose and for every phrase ask themselves: "Does this add information? Is there a way to convey the same concept in plainer language?"
If it is a subject you are interested in, then George Orwell's essay on writing style [1] is worth a read.
I also highly recommend William Zinsser's On Writing Well. It's a perfect gem of a book and improved my writing more than anything else ever has.
The full text is available online
"originally devised" -> "Devise" implies originality.
The word original in the original text is used in the sense of "from or in the beginning; at first", while you seem to be taking it in the sense of "in a novel and inventive way".The phrase "originally devised" implies the usage of the devised thing has since changed or expanded beyond the purpose of its invention. This is important, because it is in a passage talking about one of those new usages - dungeon generation.
Yes, your sentence has the same meaning, and in a weak sense has the same implication, but "originally devised/invented" has a history that boosts that implication to make the purpose clearer.
Musical phrases.http://en.wikipedia.org/wiki/Phrase_%28music%29
Means almost the same thing as linguistic phrases except it is about groups of notes rather than groups of words.
But yes, I'm aiming to bring it in a more conversational direction. It still needs editing too, but Ch. 8 is closer to the style I'm personally aiming for.
http://www.amazon.com/The-Sense-Style-Thinking-Person%C2%92s...
“A coherent text is one in which the reader always knows which coherence relation holds between one sentence and the next.”
Sage advice indeed.
http://www.telegraph.co.uk/culture/books/bookreviews/1108972...
One area I've been experimenting in is constraint-based solvers in my generators. It requires keeping track of rooms or regions but allows the algorithm to express ideas like: this room has a health potion but the boss cannot be within 2 rooms of it. You can of course get more creative with your constraints. I'd like to build up the ability to have sophisticated (for some value of sophistication) puzzles built into the dungeons I generate.
If you'd like a more academic look into procedural 2d game generation, there's a nice research paper here, that describes a method and talks about Spelunky a lot (the king of procedural 2d level generation, in my book): http://games.soe.ucsc.edu/sites/default/files/cig10_043CP2_1...
Additionally, Derek Yu open sourced the code to the original Spelunky, and Darius Kazemi created a great breakdown of its level generation techniques here, also with interactive examples: http://tinysubversions.com/spelunkyGen/index.html
The action roguelike genre, particularly the roguelike FPS, is a vital new area being explored by indie game developers. It reminds me of the way 2D platformers were mined, explored, and iterated upon starting around 7 or 8 years ago.
Right now, it doesn't take much to stand out from the herd, as many of the most popular games in the genre don't do much beyond generating a bunch of square rooms and connecting them with doors and short, straight corridors. In my opinion, developers in the genre should take more cues from Doom, and less from original Zelda dungeons moving forward.
And, from a more holistic perspective, nobody really cares about mazes, room placement on a grid, and connective corridors when playing a game, beyond a brute mechanical level. A more useful framework for thinking of generating levels might be to go one level of abstraction higher. Think about a level as a story for your player, and generate setpieces or 'acts' that you want the player to experience as they play. Keep in mind the basics of a good story: an escalation in tension and difficulty, spaced with breathers for rhythm and flow. Place those sets on a path in a map, then figure out a way to connect them together at the lower level with rooms, objects, enemies, and corridors.