Page 1 of 2

[Mod] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sat Sep 26, 2015 02:44
by eduardomezencio
This mod generates an infinite dungeon world. Actually it stops generating a little above y = 0 so that you can look it from above, but this can be changed by removing one line from the source.

For now it's nothing very exciting, but I want to use this in a nice game that I'm still planning, a game with a darker tone, that does not involve crafting or placing and removing blocks. I'll let you guys know when I really start working on the game (if it happens someday...)

One thing before you try it: it is very dark, because torches are kinda rare. This is intentional, though. Makes the thing more creepy.

Here are some screenshots:

+ Spoiler


Github: https://github.com/eduardomezencio/em_dungeon_gen
Zip: https://github.com/eduardomezencio/em_d ... master.zip

Report bugs on the github issue tracker. There's a known bug right now: viewtopic.php?p=193110#p193110 . If you can help, please do.

License: GPLv3

That's it for now.

Re: [WIP] Dungeon Test [dungeontest]

PostPosted: Sat Sep 26, 2015 04:06
by Don
Cool. Can't wait for the game. I am working on a game and know how hard it can be. Keep it going. Looking forward to see the game.

Re: [WIP] Dungeon Test [dungeontest]

PostPosted: Sat Sep 26, 2015 07:31
by Dragonop
This might help, kinda old to.
https://github.com/celeron55/dungeon

Re: [WIP] Dungeon Test [dungeontest]

PostPosted: Sat Sep 26, 2015 08:16
by Ferk
Ouch.. I was planning using this name as well, I even made a menu logo for it. I'm working in something similar.
+ Spoiler

I'm sorry.. maybe I'm hijacking your thread.. perhaps I should write instead a topic already in the "games" section though it's earlier than I had wished for.

EDIT: Done! :) viewtopic.php?f=50&t=13317

Re: [WIP] Dungeon Test [dungeontest]

PostPosted: Sat Sep 26, 2015 08:49
by Sane
Maybe you both could join forces and bring a brilliant dungeon crawl to mt?

Re: [WIP] Dungeon Test [dungeontest]

PostPosted: Sat Sep 26, 2015 09:50
by Ferk
Sane wrote:Maybe you both could join forces and bring a brilliant dungeon crawl to mt?


I don't know, I like the idea of a more organic and darker dungeon that is truely random. Maybe it would be cool if both ideas develop in different directions and we get 2 different games in their own accord. My structure is too grid-y and inflexible. The rooms might be repetitive because there are not that many room options in the set right now (though I hope that would be fixed at some point). It's also not very cheap to generate because it spawns a schematic on every room.

My idea is more towards a more nethack-like kind of game. each layer of rooms has special rooms that spawn ladders going up to the upper level or down to the one below at specific positions. I depend on the grid being a particular way, otherwise it becomes messy to do in an "infinite" fashion (to be fair, initially I didn't plan the dungeon to be infinite). if I introduced a more organic distribution there's a chance the stairs to the lower level will be blocked and since the walls are indestructible that wouldn't be nice.

Though, perhaps I could make it so some particular layers of the dungeon generate differently, and use different approaches in those. Like a special "catacombs" level.

Re: [WIP] Dungeon Test [dungeontest]

PostPosted: Sat Sep 26, 2015 10:00
by Sane
Ferk wrote:
Sane wrote:Maybe you both could join forces and bring a brilliant dungeon crawl to mt?


I don't know, I like the idea of a more organic and darker dungeon that is truely random. Maybe it would be cool if someone else uses a different approach. Mine is too squarish, everything in a grid and the rooms are repetitive because there are not that many room options in the set right now. It's also not very cheap to generate because it spawns a schematics on every room.

My idea is also more towards a more nethack-like kind of game. each layer of rooms has special rooms that spawn ladders doing up to the upper level or down to the one below at specific positions. I depend on the grid being a particular way, otherwise it becomes messy if I introduced a more organic distribution there's a chance the stairs to the lower level will be blocked and since the walls are indestructible that wouldn't be nice.


Just can't wait to see both the Dungeon Tests emerge and evolve than.

Uhm, about the topic hogging ... maybe you should actually open a separate thread in wip worlds.

Re: [WIP] Dungeon Test [dungeontest]

PostPosted: Sat Sep 26, 2015 15:17
by eduardomezencio
Dragonop wrote:This might help, kinda old to.
https://github.com/celeron55/dungeon


Thanks, I'll take a look.

Ferk wrote:Ouch.. I was planning using this name as well, I even made a menu logo for it. I'm working in something similar.


Don't worry. As I said, this name was just a placeholder.. I'm going to change it now that I know about your game. And, by the way, it looks nice! I hope we can both finish these projects into full playable games.

With my game I think I'm going to do the following: first I'll finish this mod, at least making it ready for a initial release. Then I'm going to write down everything that I want for my game, kinda like a simplified design document and I'll publish this document here in the forums. I want to make a plan that is not too complex.. a game that is just enough to be playable. Then, with all planned I'll start coding everything else and hope that people in the community help with some parts, since the project plan will be open.with some parts.

In short, instead of focussing in making a very complex game, I just want to focus in releasing something, and then making it better slowly after.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sat Sep 26, 2015 16:19
by eduardomezencio
Update: Changed the name of the mod. Since I don't know yet the name of the game that will use this mod, I just decided to use a very specific and descriptive name, so it will never conflict with other projects.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sat Sep 26, 2015 19:40
by paramat
Interesting i wil try this out soon, i love dungeon generators.

Re: [WIP] Dungeon Test [dungeontest]

PostPosted: Sat Sep 26, 2015 22:52
by kaadmy
Sane wrote:Maybe you both could join forces and bring a brilliant dungeon crawl to mt?

Guess what...
I was in the process of making a dungeon crawler recently O_O
I already made quite a bit of art for it, and I can share the art, if you'd like.
The art fits the Minetest 0.3 style better.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sat Sep 26, 2015 23:31
by eduardomezencio
God.. lots of dungeon generators here... I would love to take a look at the art, even if just for inspiration. I'm yet to think about art for my game.

You guys shoud post whatever you have ready... it's nice to see what others are working on.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 04:42
by FreeLikeGNU
Awesome to see dungeons getting much needed love!

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 08:12
by cd2
Hmm, this looks like my rooms mod...

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 10:28
by Ferk
cd2 wrote:Hmm, this looks like my rooms mod...


Your rooms mod was a trigger for me to start working on my Dungeontest game, I bet that has something to do with eduardomezencio and me comming up with this in the same timeframe :P

I had been having the idea on my mind for a while, but seeing your mod and how simple it was made me start fiddling with the map generation.

However, my code doesn't look anything close to your mapgen, since I'm following a different approach.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 13:24
by eduardomezencio
Ferk wrote:
cd2 wrote:Hmm, this looks like my rooms mod...


Your rooms mod was a trigger for me to start working on my Dungeontest game, I bet that has something to do with eduardomezencio and me comming up with this in the same timeframe :P

I had been having the idea on my mind for a while, but seeing your mod and how simple it was made me start fiddling with the map generation.

However, my code doesn't look anything close to your mapgen, since I'm following a different approach.


Yes, same here. Seeing your mod was the trigger for me to start working on this one, but this one is also another different approach.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 14:49
by cd2
eduardomezencio wrote:
Ferk wrote:
cd2 wrote:Hmm, this looks like my rooms mod...


Your rooms mod was a trigger for me to start working on my Dungeontest game, I bet that has something to do with eduardomezencio and me comming up with this in the same timeframe :P

I had been having the idea on my mind for a while, but seeing your mod and how simple it was made me start fiddling with the map generation.

However, my code doesn't look anything close to your mapgen, since I'm following a different approach.


Yes, same here. Seeing your mod was the trigger for me to start working on this one, but this one is also another different approach.


Ok i just wanted to know that :)

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 16:20
by kaadmy
eduardomezencio wrote:God.. lots of dungeon generators here... I would love to take a look at the art, even if just for inspiration. I'm yet to think about art for my game.

You guys shoud post whatever you have ready... it's nice to see what others are working on.

Here's my current art(Not the best, but a starting point):
3.png
3.png (347.34 KiB) Viewed 4454 times

2.png
2.png (355.14 KiB) Viewed 4454 times

1.png
1.png (289.9 KiB) Viewed 4454 times

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 20:06
by Ferk
kaadmy wrote:Here's my current art(Not the best, but a starting point)

It looks nice. I didn't know you could use 2D sprites for the players (I'm a newcomer, relatively). Having a different style does set it apart from other minetest games. It might be a lot of work to redo all the graphics, though.

eduardomezencio wrote:You guys shoud post whatever you have ready... it's nice to see what others are working on.

Ok, I've just done that: viewtopic.php?f=50&t=13317

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 20:41
by Esteban
kaadmy wrote:
eduardomezencio wrote:God.. lots of dungeon generators here... I would love to take a look at the art, even if just for inspiration. I'm yet to think about art for my game.

You guys shoud post whatever you have ready... it's nice to see what others are working on.

Here's my current art(Not the best, but a starting point):
3.png

2.png

1.png


The 2D sprite for the player looks perfect! I hope you guys manage to get all the support you need to complete these games. Minetest needs games that get out of the craft/build/lotsamods formula. I look foward to all of these projects! Good luck!

I wish I could be of more help, but the only thing I excel is in drawing (and currently I have art classes that take all of my time).

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 22:19
by kaadmy
Esteban wrote:The 2D sprite for the player looks perfect!
[...]
I wish I could be of more help, but the only thing I excel is in drawing (and currently I have art classes that take all of my time).

You already have been of help, the player sprite is based off you artwork :) viewtopic.php?p=109972#p109972

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 22:23
by kaadmy
Ferk wrote:I didn't know you could use 2D sprites for the players

minetest_game uses sprites if it can't find the model, and if you look at the file in minetest_game/mods/default/player.lua, there's the code required to get the model implemented, as there's no builtin API to handle player animations.

Ferk wrote:It might be a lot of work to redo all the graphics, though.

I already have animated torches, chests, furnaces, stone, cobble, mossy cobble, trees, and wood. It shouldn't be too hard to make a full set of usable textures.

Edit: Another screenshot!
4.png
4.png (365.6 KiB) Viewed 4454 times

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Sun Sep 27, 2015 23:36
by eduardomezencio
I like the textures a lot! And they seem like a very cohesive set. About the player being a sprite, will the other mobs be sprites too? It would make the game look very nice, but I don't think it's possible to change the sprites depending on the direction they are facing and stuff like that, is it? The player being the only sprite-thing in the universe would be strange..

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Mon Sep 28, 2015 08:38
by Ferk
eduardomezencio wrote:I don't think it's possible to change the sprites depending on the direction they are facing and stuff like that, is it?

I'd be interested on this as well. I suck at 3D modelling and I have some ideas of objects I would like that don't fit neither the "box" nor the "plantlike" drawtype.

I could use nodeboxes, though. But they are kind of troublesome to create and don't allow for slopes. I'm already using them for bones and skulls.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Wed Sep 30, 2015 13:56
by eduardomezencio
Updated: Now pits generate and various generation glitches were fixed. For now, the only known bug in this mod is about lighting.

Sometimes the light from the torches is not correctly calculated, and I have no idea of what causes this for now. I'm attaching screenshots from normal and glitched torches, and even a normal torch generated right next to a glitched one, in hopes that someone here is familiar with this and can help me.

(I'll post screenshots of pits soon)

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Wed Sep 30, 2015 19:33
by paramat
You place torches after all the lighting updates, place them in the VM immediately after creating pits, and before 'vm:set_data(data)' and 'vm:calc_lighting()'.

Ah but, you need schematic stairways placed before lighting calculations, try placing stairs before the VM.
Or much better: don't use a schematic for stairs, use a program to generate them inside the VM. 'place_schematic' includes a slow and buggy lighting update that is unnecessary here because 'calc_lighting' does the lighting.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Wed Sep 30, 2015 19:48
by BrandonReese
This looks really cool

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Wed Sep 30, 2015 21:18
by eduardomezencio
paramat wrote:You place torches after all the lighting updates, place them in the VM immediately after creating pits, and before 'vm:set_data(data)' and 'vm:calc_lighting()'.

Ah but, you need schematic stairways placed before lighting calculations, try placing stairs before the VM.
Or much better: don't use a schematic for stairs, use a program to generate them inside the VM. 'place_schematic' includes a slow and buggy lighting update that is unnecessary here because 'calc_lighting' does the lighting.


I would never imagine that just by placing the torch in the stairs after 'vm:calc_lighting()' it would ruin so many other torches, but you're right. After removing the code for this torch I could not find one single glithced torch. The only lighting glitch that still happens after this is at the boundaries of the blocks, where the light from a torch in one block does not reach the other.

About the schematic, I liked it because it was easy, but I don't want my generator to be slow, of course, so I'll also chage that. Thank you very much for the help!

BrandonReese wrote:This looks really cool


Thank you!

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Wed Sep 30, 2015 22:08
by eduardomezencio
paramat wrote:use a program to generate them inside the VM


I have one question: If I place stair nodes inside the VM, how can I define the direction the node will be facing? This was the first reason why I decided to not make the stairs or the doors inside the VM.

Re: [WIP] EM Dungeon Generator [em_dungeon_gen]

PostPosted: Wed Sep 30, 2015 22:33
by kaadmy
Hmm, maybe a simpler implementation of this dungeon generator might be fit enough for use in Pixture?