Posted By: lostzac
Random Dungeon Creator - 02/12/11 05:13
Back when I was working on my game, A good friend of mine named Gavin, and I created this to make random dungeons for a rouge type game.
So I thought I would throw it up here for all of you to enjoy as I am currently reworking the source code for my rouge game...
A Couple of notes, I did not spend a whole lot of time making resources to be used in this....when you run the script it can take anywhere from 10-30 seconds for the dungeon to be completed so if you just see a brick wall give it a few seconds, (Hit f11 and you can see how many entities are being created so you know its working) If this was being used in a game I would of used a loading screen or something pretty but as I just wanted to put this up, you all get the boredom of waiting for the spawn point to be loaded in so you can walk around...and yes I know the texturing on the blocks are ugly...I am not an artist nor do I claim to be one, I just made some blocks and threw a texture on it....
How this works....
The function generate_floor is the call to the dll, this will run a maze generation and print it out in a text file...
The text file is then loaded in and the proper tiles are placed in the corresponding spot...
There is 5 different chars...
the # is for walls
the . is for floors
the S is the spawn in start
the E is the exit for the level (in my game it would of been stairs to the next level)
and the + is for doors....
You will also want all your tiles to be the same width and height...
In my original script, I had it so only the spawn spot loaded up and the surrounding tiles, to cut down on the load time, and i also had the ability to call random tiles, and diffrent tile-sets....but for some reason since I updated to the last a7 code it is running a Sys error, once I figure out why, I will put that code up to share as well.
anyways for anyone who need the ability to generate random maps I hope you enjoy.....
http://rapidshare.com/files/447478596/Rouge.rar
If questions go ahead and message me, and I will do my best to help out...
Cheers
So I thought I would throw it up here for all of you to enjoy as I am currently reworking the source code for my rouge game...
A Couple of notes, I did not spend a whole lot of time making resources to be used in this....when you run the script it can take anywhere from 10-30 seconds for the dungeon to be completed so if you just see a brick wall give it a few seconds, (Hit f11 and you can see how many entities are being created so you know its working) If this was being used in a game I would of used a loading screen or something pretty but as I just wanted to put this up, you all get the boredom of waiting for the spawn point to be loaded in so you can walk around...and yes I know the texturing on the blocks are ugly...I am not an artist nor do I claim to be one, I just made some blocks and threw a texture on it....
How this works....
The function generate_floor is the call to the dll, this will run a maze generation and print it out in a text file...
The text file is then loaded in and the proper tiles are placed in the corresponding spot...
There is 5 different chars...
the # is for walls
the . is for floors
the S is the spawn in start
the E is the exit for the level (in my game it would of been stairs to the next level)
and the + is for doors....
You will also want all your tiles to be the same width and height...
In my original script, I had it so only the spawn spot loaded up and the surrounding tiles, to cut down on the load time, and i also had the ability to call random tiles, and diffrent tile-sets....but for some reason since I updated to the last a7 code it is running a Sys error, once I figure out why, I will put that code up to share as well.
anyways for anyone who need the ability to generate random maps I hope you enjoy.....
http://rapidshare.com/files/447478596/Rouge.rar
If questions go ahead and message me, and I will do my best to help out...
Cheers