Dungeon Generation
September 25, 2012 in Featured, Media, News
Hi guys,
I know it’s been a little while since I’ve blog posted. That’s largely down to us crunching down on the game. So worry not, we’re making great progress.
Recently I’ve been asked a lot about how dungeon generation works. So I thought I’d give you a very brief run-down.
Essentially dungeons are divided into different rooms/corridors. Each room is made of a single image. Each pixel in an image references blocks, objects, spawn points, connection points and so on.
The engine then intelligently connects these rooms together to produce new dungeon layouts. It creates monster spawns and places chests in random locations inside the dungeon.
Here is one such image from the entrance to an Avian tower.

Most of the pixel colours here reference various blocks and objects. But of special note are the grey, pink, blue and black pixels.
The pink pixels tell the engine to accept anything in that location.
The grey pixels tell the engine to fill those locations with the main blocks from whatever biome the dungeon appears in.
The blue pixels tell the engine where to connect this room to another room.
The black pixels tell the engine that there should be sky in this location.
Once the engine has read the image, connected it to other rooms and placed it in the world it looks like this:
There are hundreds and hundreds of these images being used to generate all manner of different dungeons, temples, crypts, etc.
The engine is also capable of randomising what a particular pixel means, so a single room could appear in a multitude of different ways.
LUA scripts can be built directly into dungeons and wiring works too.
A video on travel from planet to planet coming soon!










Thats awesome great work :)
Of course the second after I leave after doing my daily check for new posts you post this.
Good think I came back.
Have you heard of RSS?
Is the first picture supposed to be that small?
It’s nice to finally read a new update. Keep it coming.
I think it is, mainly because the engine reads *pixels*. That means that it doesn’t have to be large at all to make a room, and most likely means as well that the picture won’t be at all heavy in size, allowing to keep a lot of “room models” without that becoming a problem because of the size of the files. :)
Looks awesome Tiy, every update makes me desperately want the game even more. xD Keep it up. <3
I can’t wait :D
Brilliant. :)
Nice job :).
I can’t wait either… that really looks promising and I am happy about every bit of information you give away. Keep up the great work
Amazing, keep up the good work Tiy, and the rest of the team :D
This game will be great ! Thank you for all the informations you give.
Thanks for:
this
starbound
AND PURE AWESOMES!!!!!
So, does this mean we can make custom dungeons by creating our own pictures and adding them to the collection? Awesome update.
Hmm… so does this mean the dungeon isn’t completely random? It looks to me like this is very similar to what Spelunky (another awesome game, try it out) does with level generation – it takes pre-made terrains and adds random elements to it. This way the level is always different, but after playing for a while you can start to recognize the different pre-generated terrains.
So this looks like there will be a limited amount of dungeons possible (a high number, but still limited) unless you’re also planning on a way to allow players to add their own dungeons.
There are a limited amount of ROOMS possible. With the number of ways these rooms can be combined, the number of possible dungeons, while technically finite, should be far beyond such notice.
Per room, however, it seems to work how you’re describing.
It would have been great to have dungeon generation similar to roguelikes, where engine generates rooms of different size and type, and then connects it with the corridors. Though it would work only for underground dungeons, not for the temples like the one in the post.
Still, I like your approach too :) If there would be tons of different dungeon templates, it would be even greater :D
Let us not forget about the fact that it MAY be possible to add new rooms to the mix ourselves.
Sweet!
Awesomeness packed in a single game! can`t wait for its launch!
I just cant wait for starbound to be playable :D
Looks so good
Гей здоров був хлопці. Я не розумію що ви там мемекаєте та я тут зовсім випадково. І що це за фігня, напевне будиночок якийсь.
English bro (English website)
Great solution, simple in concept yet effective
my hype levels have surpassed critical mass
I WONT A VIDEOOOOOOOOOO!!!!!!!!!!!!!!!!
Give us more news….
I was refreshing this site for the whole day! Totally worth it :3
Will you, at any point in the foreseeable future, just give us a few bits of gameplay videos? From what I have read, at least part of the game is in a playable state and multiplayer works, so a few short videos with some dev team members showing off what you’ve got so far (or maybe just normally playing a bit) would go a long way.
this this this this THIS!
You should have a look at the few short videos they’ve posted with dev team members showing off what they’ve got so far. They go a long way.
Where do I find those? Link please.
They’re right here on the site: http://playstarbound.com/media/
I agree with Fred, these show no gameplay interaction. I wanna see guns going off mobs attacking, players getting hit, you know… actual gameplay.
then wait for the game to come out c:
Those show off environments and visual effects, not gameplay.
the game won’t be coming out for quite some time. If they showed “gameplay” as you are wanting it, it would probably look sloppy, unpolished, and a glitchy. That is how games get bad press. Releasing full gameplay videos too soon is bad stuff.
That being said… I would really like a gameplay video. Mining, building, fighting, talking, accepting a quest, ANYTHING!!!!
But seriously, don’t cave to our demands. Do things on your own schedule so that the game does well and so that the final product is as amazing as we all know it will be. Also release it in the next 5 minutes or I may die.
A livestream was done recently by Tiy showing actual gameplay. Guns were fired. Buildings were crafted. Planets were teleported to. Creatures were shot.
He asked that no one record it, only screenshots were taken, and only fifty people were actually there to see it, though. Kind of sucks.
There are a few demo videos on youtube. there water pressure, forest, and lighting demo’s.
Plus je vois de news plus je deviens amoureux de ce jeu <3 (sorry my english isn't good enough :( )
Sweet Article! :D I agree with hoping Players can make Mod Room Pics as well!
Looking to the Planet Travel Vid, but I kinda wanted the Combat Vid more… has something happened that’s holding up or interfering with completion of the Combat Mechanics in the game…? :( (Or, are ya just having trouble making a Combat Vid that doesn’t end in humiliating defeat vs a Demo Procedural Generated Boss…? :P )
I think they might be doing it on purpose. :P
So you quit Terraria , to make Terraria?
Because this game has random dungeons and exploration makes it a Terraria clone? *rolls eyes*
You need to realize that games can borrow some things from each other, it’s the only way for games to get better, copying good stuff and adding more to them.
In fact, that’s what every game does, copies stuff from other games and expanding on them
Don’t feed the troll
True…
But yes, I do agree with 11clock.
He quit terraria to make his dream game – starbound
A stylized space monkey with a giant sword and a laser gun exploring an ancien temple on the surface of an alien world…. all that randomly generated ?
Hmmmm……. oups, sorry, I need to change my underwears !
Come on……. come on !!! :cartman:
Awesome stuff, I can’t wait to explore and discover these “hundreds and hundreds” of images.
Looks awesome!
It’s just lua, not “LUA”. It’s not an acronym.
If you’re going to be a nazi about it it’s technicaly Lua not lua ;-P
Who the hell gives a fuck anyway? God damnit.
Mother of god :O !!!!
This is amazing.
Oh wow, the video should be interesting. I plan on playing Starbound when it comes out. It is much like Terraria, but also a completely new experience. I look forward to this. And Tiy? I tip my hat to you.
Ah its nice to come back and see a post here X3 thanks the the update :D been missing them for almost a month D: but looks good :) keep cracking guys
I cannot wait to see this game come out. No matter the price, as long as it’s fair, I’ll buy this, FOR SURE!
I think you guys are making some great progress, and I can’t wait to see the Planet to Planet video!
Hmm… So after a while you’d notice similarities? I guess it’s an interesting trade-off, you get the originality of procedurally generated terrain coupled with some planned elements in between. Makes sense, good idea guys.
you guys might wanna make a teaser-trailer for the game soon, since you made gotten so much progress…
you guys should make a teaser trailer since you have made so much progress!
Looks great man, nice work
Did anyone notice the floor going into the stair support, but other than that? looks good.
Holy goddamn shit this is fuckin’ AWESOME.
I really wish you’d just let me give you my money. Can you do pre-purchasing please? I want to buy this while I have the money so I don’t have to worry about it when it comes out.
Buy one of those Steam gift cards
Starbound has to be the most anticipated game I have ever been waiting for. I know already it will consume more than triple the hours that Terraria did. Gimme gimme gimme, for a price, of course. lol.
Awesome cant wait for traveling video :D
FINALLY. i check this website everyday, finally an update. please try hard to let us know whats going on…
yes chief investor. we’ll get right on that. sir. we’ll make sure to cut back development efforts in order to detail all the development that we won’t be making. sir.
Keep up the excellent work.
Massively looking forward to playing this game for many years to come. Keep focused, love that your cracking down on a release but make sure your ready. Im sure this will be GRAND
Ho, great work :D
Cheer up!
=( I wish we could get a release date, I’d love to play it pre-release like minecraft did and so many other games are doing.
Nice update!
http://www.youtube.com/watch?v=PEf29fBMzUA
New mob for Starbound :D
Love these updates. Please keep them coming and don’t be afraid to keep including those technical details! fascinating stuff
Ah cool bit out of my depths with the programming stuff,
but really looking forward to the video on travelling to planet to planet brill!!!!!
I thought this game would be awesome, but now i think it will very much better.
I FUCKING WANT TO PLAY THIS GAME! GIVE IT NOW:)
>A video on travel from planet to planet is coming soon!
My body is ready.
for orgasm?
Hell yeah.
So, as I see, a lot of persons are waiting for Starbound and I’m really sure that everybody would like to tell this only question : Are you now able to tell us when Starbound (Any playable version) will be available for all ? By the way, it’s just a question, you’re not obligate to respond, but it would be nice :D Thank You
Starbound will come out around december :)
There isn’t a release date defined yet.
Thanks guys, but I would like to know more about the *Demo/Beta/Alpha* Version and the preorder, but it’s too much for now I guess ^^
Really great!, are you guys planning to create a lua api for modding?
“A video on travel from planet to planet coming soon!” …..oh my!
Dual wielding? A big sword and a little gun. What packs a bigger punch?
I wonder if Tiy knows we can’t see the first picture.
Looks much better than Terraria already.
I definitely see a future for this game…I wonder what new devices/gadgets and such I can expect to see that utilizes wiring.
Looks so awesome!
You are killing me with awesomeness! I will definitely spontaneously combust when this game comes out and die. Thanks for working so hard on this, we all really appreciate it!
TAKE MY MONEEEEEY! TAKE IT AAAAAAALL!
everytime a new post is out i get excited but with every new post the wait til the next one is longer and longer, i hope that it will not continue in this fashion
Man if this doesn’t make me want to become a Game Coder even MORE… and a Graphic artist… sadly too many people wish the same, so i’ll stick to my current pace and just keep that stuff as a hobby for now.
I’m so fucking stoked for this
This is absolutely simple and awesome. =) Adding new content is gonna be simple which is incredibly well for future..
Interesting, cool!
I personally like this idea for the reason that it seems moddable. Depending on the place those images are stored i imagine a player could add more.
I woner if it will be a beta testing soon…
Are they going to be big deep dungeons like in terraria?
Random dungeons that look great. I’m so excited for the release of Starbound!
How soon is soon on that video?
So we’ve heard from all the Fanboys… now I have a complaint.
.
.
.
.
.
.
I can’t give you my money fast enough!
So, will we have ingame computers to control our stuff or some kind of “redstone/wiring” ? That would be really awesome.
Is it an Apex?
I want to play this game so badly.
when will the alpha be released?
Looks amazing, and I am not using that word lightly. I am actually amazed. This dungeon generation using an image file seems like it should be the way that all procedurally generated things should be generated, and that everyone who has ever done so in a different way was stupid for doing so.
To those asking why the first picture is so small, that is because it is 150 x 69 pixels. This means that the room it generates will be 150 x 69 blocks in dimension. It isn’t meant to be viewed by a human, it is just a source file for the dungeon generator to read.
I am wondering though how the generator knows what to put in background when the pixel is telling it what to put in the foreground. I would assume that it would just choose the default background for that zone. But, for instance, if there is sky to the left, and dungeon background to the right, and the pixel dictates a foreground object, which background goes behind that foreground object? Or do you simply assign a different color for foreground objects based on what their background will be? I guess you do have almost 17 million choices for pixel content (assuming standard RGB pixel colors), so no reason not to have millions of different colors mean millions of different things…..
I wish i had never heared of this game….*sniffle* because my heart cant take checking this sight everyday anymore.
Neat! Will there be dungeon “asteroids” as such? aka. small (or large :P) planets which are dedicated only as dungeons. That would be cool!
Dood that would be so awesome! If they did that they could also put in abandoned space stations and other things like that :D
Awesome Idea! I also wish Unicron like asteroid http://tfwiki.net/wiki/Image:TFTM_Unicron_Lithone.jpg.
“A video on travel from planet to planet coming soon!” So, I wait, wait, wait… When?
Soon!
I just wanted to ask what engine do you people use? A custom one?
SHUT THE F*** UP AND TAKE MY GOD DAMN MONEY
gameplay footage please. you guys said the game would be coming out by the end of this year. with less than 3 months to go, let’s see what we have so far.
interesting. the ability to duel weild a sword and pistol. interesting.
So out of curiosity will this game be out before Christmas?
I was in love with this until I read “LUA scripts.” LUA IS NOT AN ACRONYM. It is “Lua” not “LUA.” LUA = Learn Ur Acronyms
I’ve been throwing my money at the screen for WEEKS.
WHY ISN’T IT WORKING!?
how long will it be before this out! This is the one game I want more than Assassins Creed 3.
Some new updates? Fast?
I can’t wait for the next video !!!
this game is my god :)
Hello guys !
I’m french and I want to say that you do a really good job ! Thank you very much ! Continue like that !
I’m a fan !
more!
fucking release the game
looks great guys! looking forward to this!
So when’s that video coming?
Been waiting for this game to come out already! I’ve created so much on terraria
could totally make this into a “conquer the galaxy” pvp mode. strategic resource capture, planetary defense, shock invasions, alien cpu teams, rts elements on the planet. some npc troops controllable by giving basic attack, defend, orders from the mothership.
this game could grow in all kinds of ways
I was wondering if it would be possible and/or in your interest to make it possible to make our own room images to try and feed the game? It’d be a great way to allow player content without having to ram through already completed boilerplate.
I wonder what soon means to them :)
Still waiting for that video to come out soon!
Three and a half weeks, no video.
Must have hit a snag somewhere.
Oh wells. “Work-in-progress.”
WOW :D thats cool
Ive hope Starbound have Night and Thermal vison googles what :P futuristic game dosent have this things.
“Coming Soon”
Inigo Montoya–”I don’t think that word means what you think it means.”
:-)
i’,m a guy who usually goes for 100% in a game.
Seeing this, i just know i’m gonna love it. (It is also going to ruin my social life xD)
Keep going Tiyuri, we’re all supporting you :D
One question can this be mod friendly in a way where you can make a room to go into the randomized dungeon sets and can you enable and disable addons
Not to sound pessimistic, but does Any one know what today is? It’s the day that marks nothing… for a months time… i know there crunching but still at least once per month show us something
Anything new going on? It’s been a full month, bro.
I’m just hoping for a little update on the game info. Mostly curios about whether or not it will come out this year or be an early release next year.
I don’t need any gameplay videos or others, because I like to wait for Starbound to come out. Then it shall be more fun :3
I thought this was suppos to come out at the end of summer but now its fall and we still dont know for sure if its coming out this year and on top of that its been forever seince there has been anything new on this site and we were promised a video on travle from planet to planet but we still have not seen one.
Sorry, im just so exited for this game. I want it to be out soooooooooo badly.
Is this game going to be ready by Holidays 2012? I want this game soooo bad.
What is considered “Holiday”?
tell me what does soon mean to you guys? i mean a month has passed since u told us about “a video on travel from planet to planet coming soon” ;(
It’s Lua, not LUA!
“Please do not write it as “LUA”, which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write “Lua” right!” -Source: lua.org
>A video on travel from planet to planet coming soon!
OH GOD YES.
it’s been quiet from the developers for some time. i wonder what they are planning….
It has been more than a month since this site has posted something :( I have been checking every day. Please add something fast.
RELEASE SOME NEWS!!!! NOAW!!!
Yeaaah about that video which is supposed to show us how travelling between planets works…
Please Update like 2 months has passed i fell empty D;
Is this Valve time?
Hurray for Lua scripts
its not all capital btw because its not an acronym :D
no October pic?
NO MORE UPDATES GUYS, (i hope im lying)
Awesome breakdown of the technology. As a game developer, I love reading this kind of stuff, as it gets me excited both as a gamer, and a developer. I actually used similar (but more basic) technology for a flash game a few years ago. We designed all the maps in photoshop with a simple color palette, and had each pixel represent an in game item. Awesome work on the game thus far, can’t wait to play it.
I have an idea for a new playable race, the reptilians. A hardy and large race that thrives in any climate, from lush jungles, to dry deserts, to freezing tundras. They stand about 8 feet tall and weigh about 500 pounds at the largest, 250 pounds at the smallest. They are advanced, capable of space travel. They are strong and can regrow lost limbs or appendages over a time of weeks or months. They usually live in large groups, establishing cities as they go from planet to planet.
Did I mention reptilians are reptiles? With tails and such
ok and skeletron again?
i was ok with waiting a couple months …. but after these posts I CANT TAKE IT ANYMORE !