Random Map Generator

The development of the game itself or new resources for it. Any new stuff you're working on would go here, as well as the discussion of in-development stuff.

Moderator: Developers

User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

That sounds a lot like how booger had planned the gameplay Egoboo (leader of the old egoboo community and first leader of the soulfu community). He had this idea where between every hand crafted level in the game, there would be 10 or so random generated levels. Then Egoboo would be truly a Roguelike game!

The essence of this is of course a very good random map generator, which is hard to do.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

Really it wouldn't have to be any better than what is used in NetHack. And that isn't very customizable at all. the closest thing they have to "random encounters" are boulder trapsm treasure rooms, shops, and treasury rooms. Everything else is almost completely random, falling with very broad theme categories, and a certain difficulty setting.

For instance, the gnome mine levels are all random except for the 5th "city" level, and the final level which is one of 3 hand crafted levels. It is exavtly similar to the "normal" dungeon levels, which are randomly attached to the gnomish mines and several other hand crafted levels, and a random atchment to the end (which I have never seen, by the way! :twisted:)

Anyway, in a worst case scenerio, we could reverse engineer the exact level generation of nethack and have a list of object substitutions. :)
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

But as Aaron commented in the code: Passages will be hard to do. I think Aarkon actually implemented this in randmap. Ever played Castle of the Winds? I love the random map generator there. One of the best rouglikes ive played :D
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

You are talking about implementing the scripting aspect of a shopkeeper or a doorway without knowing the passage number in advance?

We could have a template script that had some "blanks" in it that would be filled in by the generator and then compiled for the random shopkeeper/door. You also would not need to use the shopkeeper script to spawn the shop objects since the random generator would be in control of the module spawning.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Mostly doorways and locked doors would be difficult. But maybe that's something with random dungeons, where you might expect players to somehow get golden keys to open them like in soulfu.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

I think what you mean is that locked door puzzles would be difficult.

Even without that there is a question of whether the map is traversable. Adding the doorway/key or other puzzle just makes it slightly more complicated. But the problem is complex and computing traversability on a generic mesh is not easy.
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Post by Cimeries »

This talk about shops reminded me that we should make shopkeepers more intimidating.
Maybe give them awesome wands like in Nethack? I doubt many players can survive a point blank barrage of missle storm.

Also, holy crap Zefz, thanks! I was looking for the name of this game forever! I used to play it when I was like 8 years old or something. You made my day awesome. :D
:wink:
Chevcx
Tranch (Novice)
Tranch (Novice)
Posts: 115
Joined: Tue Aug 11, 2009 3:45 pm
Location: A place.

Post by Chevcx »

Why do you even need doors when I was trying/failing to make a map in egomap i just made a hallway that would branch off into many different places so you could sort of have a choice to what you are getting yourself into like have multiple exits and have the place close behind you once you chose a certain path err one way doors
I must be a zombie, because I came back after, around, a year.
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Post by Cimeries »

Doors have aesthetic appeal and make the module look better (and more realistic).
:wink:
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

And doors can serve as puzzles or rewards. Locked doors can imprison monsters or allies or most often treasure or the next part of the dungeon. One way doors prevent the player from escaping battles or returning to previous parts of the dungeon using the same way.
Crispy
Grub Bug (Rookie)
Grub Bug (Rookie)
Posts: 41
Joined: Sun Apr 04, 2010 5:17 pm

Post by Crispy »

I just thought a bit of this and how it could be made and came up with the idea of making the random map generator to start the dungeon creation from the last room instead of the room the players will spawn. that would make alot of things easyer. first of all, there could be a list of events, monsters and stuff that might be created and new stuff would be unlocked and possibly some old stuff like pushover monsters locked every time the player advances to the next level. at the beginning the generator could roll a fixed amount of events etc. from the list of possible events that must be applied to the dungeon. every time the generator creates a door there could be a chance of creating a locked door or one with some kind of mechanism and if one of those is created then the key/mechanism button/trigger would be added to the remaining list of stuff that must be included. the amount of doors the generator creates should take in account the size of the room and possibly the amount of walls and rooms right next to the room currently under creation. lets say that the generator creates three doors and two of them are locked. since there is now two locked doors it is possible that the generator creates both of the keys/triggers behind one of those doors and that would be nasty. i managed to think about a solution for this event also but i'm short in time atm, so i'll resume the topic later.

oh, and btw, since i lack the skill to create what i have just thought it will be left on the level of an idea unless someone wishes to take it further ^^
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Post by Cimeries »

That is actually a very solid idea. Kudos.
Torchlight did something like this, I think, where every floor of the dungeon was constructed and put together from preset formations and events. This is not optimal if there are only a few possible events, but with a large enough list, this can be turned into something very powerful.

I think this can already be done with our current file system, but it will take a good coder. Here's how I see it working:
The generator program will contain a folder full of small modules (say, 8x8 in size), called 'chunks'.
When constructing a new dungeon, the user will give the program some specifications. The program will then load random 'chunks' and align them on a new map mesh until the output module fits the specifications.

Item and object placement will be a little tricky to manage, but a primitive version is already possible if we forgo complicated things like locked doors or puzzles and put the various objects in the chunks themselves. It will be less random, but it will be functional.
:wink:
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Locked doors and puzzles that are inside the same "chunk" could still work and be pretty simple. Or of you spawn a locked door, spawn a golden key in the previous chunk.
Seanbot
Cobol (Esteemed member)
Cobol (Esteemed member)
Posts: 691
Joined: Tue Apr 07, 2009 8:30 am
Location: Australia

Post by Seanbot »

Procedural generation is still a very difficult path to go on, and would take a long times, there are a few dungeon generation algorithms around though, so maybe someone (was suppose to be me) could hack it into egoboo. In fact I think we have one lying around or something.
Anyway, I guess it could be less difficult than other roguelikes seeing as how we have fewer elements. Possible, but improbable that someone would go and do it.
Moogirl wrote: [19:47:14] ­period jokes = not cool
[19:47:23] ­no wait it's the anus
[19:47:25] ­wtf
[19:47:46] ­a cloud cannot have that much blood
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

Again, the problem is whether you could provide an algorithm that was "guaranteed" to make a traversable map. If not, you would have to have some way of determining whether some random map was traversable and then keep generating until you had something that could be traversed.

Literally, we could completely steal the nethack dungeon generation algorithm. The thing that Arakon was able to do was to generate rooms AND some simple scenarios (like 4 COBOLs guarding a chest). The "random map generation" in SoulFu involves just connecting a set of pre-generated rooms in a random manner...
Post Reply