I've made this little tool/lib for a little project, and I thought maybe someone could use it to make something cool, or just take a peak at the code.
This is a basic dungeon generator, inspired by Zelda NES, where every door leads to a room of equal size. There are no pathways. A Dungeon instance, is aware of the 'start_room', and the 'end_room', and have each room on a matrix of customizable size.
It's been made thought so every room will own it's entities (be it enemies, items, or furniture), so you can have many entities, but only update the ones, on the 'active_room'. Remains to be implemented though.
It's under MIT license so do whatever you want with it.
That's all.
Github: https://github.com/nyenye/DungeonGenerator
Random dungeon generation
Random dungeon generation
- Attachments
-
- dungeon_generator.love
- (4.63 KiB) Downloaded 237 times
Last edited by nyenye on Wed Jun 07, 2017 9:52 am, edited 1 time in total.
- yetneverdone
- Party member
- Posts: 448
- Joined: Sat Sep 24, 2016 11:20 am
- Contact:
Re: Random dungeon generation
Awesome and very useful. It would be great if you would upload it in a github reponyenye wrote: ↑Tue Jun 06, 2017 7:01 pm I've made this little tool/lib for a little project, and I thought maybe someone could use it to make something cool, or just take a peak at the code.
This is a basic dungeon generator, inspired by Zelda NES, where every door leads to a room of equal size. There are no pathways. A Dungeon instance, is aware of the 'start_room', and the 'end_room', and have each room on a matrix of customizable size.
It's been made thought so every room will own it's entities (be it enemies, items, or furniture), so you can have many entities, but only update the ones, on the 'active_room'. Remains to be implemented though.
It's under MIT license so do whatever you want with it.
That's all.
My GameDev Website
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Re: Random dungeon generation
Uuups... forgot to add the repo. Edited post.yetneverdone wrote: ↑Wed Jun 07, 2017 8:16 am Awesome and very useful. It would be great if you would upload it in a github repo
- yetneverdone
- Party member
- Posts: 448
- Joined: Sat Sep 24, 2016 11:20 am
- Contact:
Re: Random dungeon generation
1. On the basis of the classic Zelda game on NES, would your dungeon generator provide an overview of the whole dungeon and only apply a camera view to the current active room? Or could each room be like a gamestate, where entering/leaving a room go to the next room?
2. Is it possible that you will add more api or document the current functions that work?
2. Is it possible that you will add more api or document the current functions that work?
My GameDev Website
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Re: Random dungeon generation
What I had in mind is that you would only need to call update() on the dungeon object; which in turn will call update() on the current room; which will cal update() on all of its entities. The same for a draw() call.yetneverdone wrote: ↑Wed Jun 07, 2017 12:49 pm 1. On the basis of the classic Zelda game on NES, would your dungeon generator provide an overview of the whole dungeon and only apply a camera view to the current active room? Or could each room be like a gamestate, where entering/leaving a room go to the next room?
About the camera, maybe leaving it a position (0, 0) and drawing the room with an offset, would suffice. Maybe not
When the player exits by a door, maybe calling a onExit() function with the door as argument, which would lead to update current_room, to the new one.
Yes, gotta work on that. Will update when I have it in better conditions.yetneverdone wrote: ↑Wed Jun 07, 2017 12:49 pm 2. Is it possible that you will add more api or document the current functions that work?
Thanks for the interest.
Re: Random dungeon generation
Added some docs so it's easier to understand, and use/modify.
https://github.com/nyenye/DungeonGenerator
https://github.com/nyenye/DungeonGenerator
Who is online
Users browsing this forum: No registered users and 3 guests