Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Random 3D Dungeon with source code

Author
Message
enderleit
16
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 20th Feb 2011 07:17 Edited at: 20th Feb 2011 07:27
I have been playing with this the last couple of days and I figured someone else might put it to good use... (I rarely finish anything )

Basically it generates a random dungeon and lets you run around in a 3D Lit & Textured version of it... FULL source code included...

BTW... You need Sparky's Collision DLL to compile it... (for the sliding collision)

I included the Executable in the download so you can test it even if you don't have Sparky's...


I apologise for the crappy video quality...
EDIT: Actually, it's fine... guess YouTube just didn't work for me before...

Attachments

Login to view attachments
Ranietz
AGK Gold Backer
19
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 20th Feb 2011 13:48
Thanks for posting this.
I'm making a random dungeon generator myself (although it's for a 2d game) and I see we use pretty much the same approach. The biggest difference between your method and mine is that I couldn't figure out a good way to place the rooms after I generated the maze so I ended up with making the rooms first then create a maze around them. I'll take a good look at your code and see if I can learn some things so I can improve my own.
enderleit
16
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 20th Feb 2011 17:15
You're welcome...

However if you're looking to do actual rooms, you might be a bit dissapointed... All I do is generate the maze, and then remove a number of random walls to make it a bit more open, and replace som lonely walls with columns... So there aren't any real room generation...

enderleit
16
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 20th Feb 2011 18:24
Actually I have another one... Doesn't look as impressive...

This one generates a grid of rooms and creates random connections between the rooms...

Attachments

Login to view attachments
Ranietz
AGK Gold Backer
19
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 20th Feb 2011 19:03
Thanks again for posting your code.

I could post my own code but it's quite a mess right now. I was supposed to rewrite it and clean it up today but I ended up doing a couple of fancy "Hello World" programs instead.

I can post it after I've cleaned it up if you want to.
enderleit
16
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 20th Feb 2011 20:15
Sure... i love anything that is random generation type stuff...

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 20th Feb 2011 21:43
Very nice work! Thanks

Ranietz
AGK Gold Backer
19
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 22nd Feb 2011 05:19
I know I said I would post my code but the rewrite didn't go as I planned. I need to take a brake from it. Maybe I'll give it a try sometime later...
GantZ_yaka
13
Years of Service
User Offline
Joined: 22nd Feb 2011
Location:
Posted: 23rd Feb 2011 16:32
its awesome ty for code
enderleit
16
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 23rd Feb 2011 20:45
You're all welcome...
Let me know if you have any problems or questions...

Softwizz
14
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 23rd Feb 2011 22:10
This is fun, lets see what I can do with it.
Thanks

Scurvy Lobster
18
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 1st Mar 2011 10:47
Impressive

Could be cool if someone added random weapons, loot and enemies.

I am trying to make FPSC X9 do random dungeon creation for my current game. It is nowhere near as random as this but the player will still feel there is something new on every play.

EdzUp
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: UK
Posted: 1st Mar 2011 22:21
Theres loads of generators on the net I done one for AI . Rogue like dungeons are made via rooms fors then connecting corridors

-EdzUp
Graveyard Dogs
Tapewormz
21
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 2nd Mar 2011 06:53
Cool post! Nice twist on the maze generators of the early 80's. A very solid bit of work here.
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 2nd Mar 2011 13:02 Edited at: 2nd Mar 2011 13:06
Very nice work! I have been working on my own procedural RPG for quite some time now, and dungeons are a large part of it. Here's an early preview of mine:

http://www.youtube.com/watch?v=1nbeZMKcwFU

I opted out of smooth free look 3D and went with the classic grid-based first person option for mine, just because I'm nostalgic lol

You can look into it more at www.msoa-game.com or email me! Perhaps we can share ideas!

Malevolence: The Sword of Ahkranox
The infinite RPG
http://www.msoa-game.com
Alkerak
13
Years of Service
User Offline
Joined: 7th Mar 2011
Location:
Posted: 14th Mar 2011 00:12
Hello

I am also looking for a Random Dungeon Generator.
Any good pseudo-code or logic on it?
I love procedural stuff but I am never good with algorithms
I wanna have the pride of building one of my own though
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 14th Mar 2011 11:16
By researching things such as procedural generation and fractals, after a bit of experimentation you should be able to come up with some great stuff! Stick with it!

Malevolence: The Sword of Ahkranox
The infinite RPG
http://www.msoa-game.com
Neuro Fuzzy
16
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 14th Mar 2011 11:44 Edited at: 14th Mar 2011 11:46
Here's an implementation of a maze generating algorithm.
http://forum.thegamecreators.com/?m=forum_view&t=182805&b=6

If you stop the generation midway (like in the second screenshot), then take all of the big, contiguous maze areas and turn them into caverns, you should have a very nice dungeon crawl map!

It's an implementation of the "depth first search" maze generation algorithm as described on wikipedia. http://en.wikipedia.org/wiki/Maze_generation_algorithm

[edit]
also, this is something I really want to try. You could surely rig it to behave like the depth first search maze, to get those big caverns. However, it does need a good understanding of 2d math.

Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 14th Mar 2011 12:45
awesome! I'm downloading now...

Sleep is over-rated.
enderleit
16
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 26th Apr 2011 06:20
Thanks for all the positive comments... glad you all liked it...

WickedVixen
17
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 6th Jun 2011 16:18
Great work, Enderleit!
Just wondering how to change/alter the texture for the "ceiling" tiles, as they currently mirror the "floor" tiles.

I was goofing off and made a couple of funny "advert poster" tiles that I am using to test this. I am thinking of including them, once I can determine if a Ceiling Texture can be added.

Please let me know...

WickedVixen
17
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 6th Jun 2011 18:20 Edited at: 6th Jun 2011 18:22
I FOUND IT!!!
YAY!

I'm also including these funny "advert" textures and a slightly modified source... Thanks to Enderleit!

You'll have to extract the file and take the textures to use in your own stuff.

The three tiles are TCWall.png, TCFloor.png and TCCeiling.png. I hope you like them. If you use them, credit me and Enderleit, since, without his programming magics, I would not have created these tiles...

Thanks.

[Edited to include my file... >_<]

Attachments

Login to view attachments
WickedVixen
17
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 6th Jun 2011 18:50
A quick note: I am looking to make a game with this...
Anyone remember a game for the PSX called "Kileak"? (In Europe is was subtitled "The Blood", the US version was "The DNA Imperative".)

I think I can generate levels and enemies (floors, ceilings, doors, turrets, and certain other specialized beings (lol)), but it'll take some time... I can't wait to get some prelims running...

Thanks for the source code. I'll credit you for the code.

enderleit
16
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 8th Jun 2011 20:17
I don't know that game, but I love all games that have Turrets in them...

Good luck with it.

Login to post a reply

Server time is: 2024-04-20 05:48:30
Your offset time is: 2024-04-20 05:48:30