Random Dungeon Creator

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
Posted By: tzw

Re: Random Dungeon Creator - 02/12/11 05:14

brilliant!
Posted By: SeaCancer

Re: Random Dungeon Creator - 02/12/11 07:52

Excellent Work!
Posted By: robertbruce

Re: Random Dungeon Creator - 02/15/11 22:43

Thanks for e-mailing.

The file can now be downloaded here
Posted By: lostzac

Re: Random Dungeon Creator - 02/15/11 22:55

Thanks for the hosting...I will have more on this in about two weeks if all goes well..including a second generation script for pre constructed models of different sizes a character generation script with dynamic item swamping (basically I do the model in parts, and trade out for the item...example would be if I was to equip bracers, the arms model would be swaped for the bracer mdl file)
Posted By: Det

Re: Random Dungeon Creator - 02/15/11 23:47

Cant dowwnload it if ten donloads are full you cant download again.
Posted By: lostzac

Re: Random Dungeon Creator - 02/16/11 11:55

There is a link posted above by Robertbruce is hosting it ...
Posted By: lostzac

Re: Random Dungeon Creator - 02/16/11 13:30

Update....Got the Character Spawn working and all its parts....adding in animation then to touch up on the second part of the Dungeon Generation
Posted By: ratchet

Re: Random Dungeon Creator - 02/16/11 22:19

Very good laugh

But i already exprimented that, and it really shows a big problem in A8 :
you see that lightening is not uniform at all, you see the seems
even if you "Glue" perfectly all pieces !
SO it's impossible in A8 to sue some "TorchLigh" systeme or
3D tile system (used in Dungones of Oblivion also).

Evene when you move the character: incredible the lightening is flickering in some pieces frown

Well i've seen some demos of 3D tiles running perfectly in Unity 3D even with shaders or not.

That's a shame A8 is so weak on that point , that you can't make a 3D tile system with good lightening , no flickering problems , and without visible lightening seems bewteen 3D pieces : (

Well ...
Posted By: Superku

Re: Random Dungeon Creator - 02/16/11 22:21

Quote:
That's a shame A8 is so weak on that point , that you can't make a 3D tile system with good lightening , no flickering problems , and without visible lightening seems bewteen 3D pieces

That's not true, it is possible.
Posted By: ratchet

Re: Random Dungeon Creator - 02/16/11 22:32

Well on unity with standard lightening no problems at all !

On A8 : you have all that problems frown
Posted By: lostzac

Re: Random Dungeon Creator - 02/17/11 11:13

The problem with my tiles where I just texture on it, and didn't worry about looks...as Superku said it is possible and I have done it also..You will see it in the video of this I am putting up when I am done with the next versions
Posted By: ratchet

Re: Random Dungeon Creator - 02/17/11 21:22

Ok if it is possible , why not sharing the solution for us ?
Any people using A8 interested in 3D tile system would find it usefull laugh !
Posted By: paracharlie

Re: Random Dungeon Creator - 03/01/11 02:04

This is really outstanding. I'm looking at the maps and thinking you can change/end the level at E. How to use + to create doors angled the correct way in line with walls. Add lighting (possibly near all +'s), ceiling, objects, monsters and you have an rpg that is capable of producing random dungeon levels. I've seen this type of code throughout the internet for the c language and thought this might be a good idea but after seeing this, I am really in love with this code.
Actually you dont really need to add a ceiling maybe as an option because this would be good for isometrics as well. Very well done I hope you continue producing on this, I will definately keep an eye on this one.
Posted By: lostzac

Re: Random Dungeon Creator - 03/24/11 15:12

Yeah I am still working on it, I had to take some time off to do things around here, I have finished the parts code that will allow better looking characters as far as items and weapons swap out...I should be releasing the next version soon...I want to work on the second algorithm and prefect it....as far as ceilings go ...A simple way to go about this, which is the way I am implementing would be to make those tiles a separate entity which by my code you can see I have already done, and then use a check on the camera height and angle, if it places itself above the roof, (like switching to an isometric camera) you would make those tiles invisible...
Posted By: ratchet

Re: Random Dungeon Creator - 03/24/11 15:21

In fact it reminfs me Wizardry 7 game.
Dungeons with traps, monsters, treasures , with some adventure/dialog part and good RPG system.
Good old stuff in fact for retro nostalgic people laugh
Posted By: lostzac

Re: Random Dungeon Creator - 03/24/11 16:44

Well the goal of the final project is to create a rpg tool-set for the users and hobbyist to help in the creation of such games...

Plans for this year is to finish up the
Dungeon Creation Algorithms
World Generator (which I have about 10%) completed
Character Generator
and a Character Morphing tool, i had working with A6 that I need to update
Posted By: ratchet

Re: Random Dungeon Creator - 04/01/11 08:24

Any new on this cool contribution laugh ?
Posted By: lostzac

Re: Random Dungeon Creator - 04/01/11 15:19

Sorry I feel behind in development on the account of work...I am still working on it, as I stated up above I am switching it to a tool design to allow users more freedom in the creation....I have the framework outlined of what I would like to see in it....and I am working as hard as I can to get it up....Hate it when I can not maintain a deadline.....but the project is definitely not dead...Maybe I should post some screen-shots of what I have done up for ya all....see if I can find the time..
Posted By: 3run

Re: Random Dungeon Creator - 07/16/11 07:23

Hey, I really like this maze generator laugh Thank you for sharing.
I have no question, I'm having problem with making level from ".txt" file:
Code:
5
5
#####
#S..#
#...#
#...#
#####

Problem is, that generated level doesn't have some of the walls from the downer right side.
I can post a screen if you want me to, may be I've made it wrong in ".txt" file.
Posted By: lostzac

Re: Random Dungeon Creator - 07/16/11 12:29

Your txt file looks right....Could you send me a screenshot or email me your code and I will take a look at it
My first guess would be to check to make sure its reading the full bottom string...You could put a TEXT* to show at the beginning to test to see if it has all the chars....
Posted By: 3run

Re: Random Dungeon Creator - 03/04/13 09:13

lostzac@ could you please reupload this file?
Posted By: lostzac

Re: Random Dungeon Creator - 03/04/13 09:33

Yeah I can......I will try to get to it today
Posted By: 3run

Re: Random Dungeon Creator - 03/04/13 09:36

lostzac@ thank you very much mate.
Posted By: lostzac

Re: Random Dungeon Creator - 03/04/13 09:48

Rouge.rar

There ya go
© 2024 lite-C Forums