![]() ![]() To begin we construct a graph of all of the rooms' center points using Delaunay Triangulation. For the next stage we want to link each room together. The remaining cells are still useful however. Because of the Park-Miller Normal Distribution described earlier, there will only be a small amount of rooms in comparison to the number of cells, with lots of space between. We determine which of the cells in the grid are rooms - any cell with a width and height above a certain threshold is made into a room. The result is that we end up with a square grid of differently sized cells, all perfectly packed together.ĥ. We fill in any gaps with 1x1 sized cells. This technique ensures that the cells are not overlapping, yet in general remain as tightly packed together as possible.Ĥ. Next we use simple separation steering behaviour to separate out all of the rectangles so that none are overlapping. At this point we have 150 random cells in a small area, most are overlapping. In addition to this I ensure that the ratio between the width and length of each cell is not too large, we don't want perfectly square rooms but neither do we want really skinny ones, but somewhere in between.ģ. The reason for this will be explained later! This skews the size of the cells so that they are more likely to be of a small size (more smaller cells, less larger cells). Instead of using uniformly distributed random numbers (the default Math.random generator in most languages), I'm using Park-Miller Normal Distribution. Again the radius doesn't matter too much, but it should probably be proportionate to the number of cells. For each "cell" I spawn a Rectangle of random width and length within some radius. This is an arbitrary amount really, but the higher the number the larger the dungeon and in general more complexity.Ģ. First I set the number of cells I want to generate, say 150. The interactive demo can be found here: Dungeon Generation Demoġ. It's pretty over-engineered, but hopefully will give anyone interested some ideas on generating dungeon layouts for their own games. Hours of gameplay with Secrets that extend the experience – Discover items and weapons that can slow down time, render you invincible or provide secret saves.So today I'm going to be a little different and talk about one technical aspect of my game TinyKeep, that is random procedural dungeon generation.Experience 3 separate endings to the game, depending on how you play. ![]() Rescue other captives to fight along side you, but beware as you never know which ones have gone crazy trapped up in the Keep.Collect coins from fallen foes to purchase random player-altering Buffs that just might give you the advantage you need to make it out alive.Use traps and environmental hazards to your advantage - fire, spike pits and rotating crushers hurt your enemies as well as you!.Creatures work together to chase you down, flee from threats and fight each other for dominance. Battle a variety of intelligent enemies, each one determined to make your escape as difficult as possible.From the cold slimy walls of the dungeon to the hot fiery pits of hell, TinyKeep is a visual treat. Explore a variety of beautiful but deadly environments.Watch your step as it can be your last! Extremely challenging Permadeath gameplay.Procedurally generated random dungeons – no playthrough is ever the same!.There are many ways to survive in TinyKeep. You can also take advantage of monster rivalries and lead them against each other, while you wait behind a corner as the resulting chaos ensues. Enemies will work together in groups to hunt you down, and some will flee from threats. Lure monsters into traps, knock over fire torches to set the dungeon alight and set prisoners free to help you on your way. With nothing but a flickering lantern and a strange letter left behind by their in-mate, they must venture into the darkness and escape TinyKeep! Their savior is nowhere to be seen, but the cell door is broken and ajar, tempting them with the sweet scent of freedom. In TinyKeep players will embrace the role of a hopeless prisoner held deep in a forgotten dungeon who one day wakes up to find themselves mysteriously released. ![]()
0 Comments
Leave a Reply. |