[WGEN] The Dungeonator - A Procedural Dungeon Crawl Generator [v0.0.3 Preview Now Available!]

Discussion in 'WIP and Development Status' started by Timberjaw, Feb 26, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Timberjaw

    @dak393 Nothing to worry about there. It's pulling rooms from the cache to generate new chunks.

    @dak393 It looks like you did your editing right near the spawn. That's fine, but it does mean you'll need to travel a ways to reach new chunks (the pre-generated spawn area is 20x20 chunks I believe, so you may need to travel as far as ~400 blocks). It'll be quicker to climb out of the hole and walk along the surface. You can also delete your world (but DON'T delete your dungeonator database or tiles) to respawn in a new world where all chunks outside the starting 20x20 should be Dungeonator chunks.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  2. Offline

    dak393

    o ok perfect I'll try getting away from spawn :) (I think when it wasn't working I generated some chunks thus screwing this up now XD )

    Working now! I was sooo close too XD about 30 blocks away from the dungeon stuff >.>
    Edit: Message 800! Woooo! Any ways I'm having fun with the generation :) Need anything tested? I noticed that you are able to get floating torches by placing them on the obsidian. Also Not to destroy the floor (it way be awesome for staircases but if it generates as the lowest room it opens into the void)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  3. Offline

    Timberjaw

    @dak393 The void issue won't be a problem in the next version. I'm working on doorway matching to ensure that rooms fit together nicely. As part of that, I'll be making sure that rooms marked as having a "down" exit won't be placed on the lowest row.

    I'm not particularly concerned about the torches, but that is interesting. In practice, the solution to that will be "don't put torches there if you don't want them floating in your world." ;) Very generally speaking, when your room is done there shouldn't be any obsidian showing.

    Got any cool screenshots of your world/rooms? I'd love to see them. :)

    This release is mostly aimed at giving people an idea of how the Room Editor and Room Library systems work. When finished, the Dungeonator will ship with a variety of rooms pre-populating the Library, but many server admins will likely want to add their own. I have plans for an online repository of user-created room packs.

    How is the performance on your system (and what view-distance are you using in your server config)?
     
  4. Offline

    dak393

    I'm using normal view distance and server performance was nice, although it was eating up a lot of ram hovering at about 700MB if I remember correctly. I haven't made any impressive rooms yet was just messing around seeing how stairs might work XD. Do you plan on rotating rooms? I did notice with the small number of room possibilities that there was a lot of repetition (I know that will all be worked out ^^ ) I have screenshots that I'll upload later I'll try to make some good rooms as well :D. Torches floating are not a problem just thought it was funny XD. Looking forward to updates on this :)
     
  5. Offline

    dak393

    any Update on this? :)
     
  6. Offline

    Timberjaw

    @dak393 Hopefully soon. We lost an engineer at work so I've been doing double duty.
     
  7. Offline

    dak393

    Oh what happened?
     
  8. Offline

    Timberjaw

    @dak393 Probably shouldn't talk about it, but nothing too horrible. :)

    My backlog is looking a bit better toward the end of this week though. I'm hoping to have some Dungeonator progress over the weekend (it's so very close to having doorway matching, which will put it in its first really playable state).
     
  9. Offline

    dak393

    Awesome looking forward to it :)
     
  10. Offline

    gameswereus

    Sorry to interrupt, but will you have to teleport to a separate world? :p
     
  11. Offline

    Timberjaw

    @gameswereus I'd like to support first-world generation, but it's a bit of a hassle since the server generates the starting chunks before plugins are loaded. A separate world is probably going to be the cleanest solution, though I do have a functional workaround for the above issue.

    Dungeonator now has mostly-working doorway matching, but I need to put in some work on the performance side; it's pretty brute-force right now, running 48 database queries per chunk generated to pull adjacency data (bad!).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  12. Offline

    Adondriel

    well, why don't you make just a world gen .exe thingy? so that you can gen the world and the server will see you have "world" folder and wont gen the world then the plugin would have some epic cmds and what not! :D

    I just thought of the negatives of an exe, since i run my serv on linux lol idk you could make it a shell thing?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  13. Offline

    Timberjaw

    @Adondriel It's a possibility, but it's kind of a messy way to do things. Messy = more potential for bugs. :)
     
  14. Offline

    Adondriel

    @Timberjaw True, true. Hmm well i still need to test 0.2 but i'm really glad to see this getting worked on i had thought it went under for awhile there! I'll test it out in a couple of seconds here.
     
  15. Offline

    Timberjaw

    Doorway matching!
    [​IMG]

    12-direction doorway matching is working! I've built a base library of 15 rooms covering the 15 possible NESW combinations, as well as an additional alternate N-S tile (the hallway in the above picture). At this point, the only thing standing between the current version and a fully-fledged labyrinth is populating the library (somewhat arduous in its own right, because given N possible doorways, you need (N^2)-1 rooms to cover each possible combination once).

    4 directions (NESW) = 15 rooms needed
    6 directions (NESW,Up,Down) = 45 rooms needed
    14 directions (3 per side plus Up and Down) = 16,383 rooms needed

    Obviously perfect matching will be out of the question without procedural generation. Currently, the algorithm searches for a candidate room with all the appropriate doorways. If it doesn't find one, it selects a random room (I plan to improve this later to find a closest match if possible).

    Right now, the generation is vastly improved from the previous version. Dead-ends are much rarer.

    ToDo:
    • Special handling for certain blocks (chests, ladders, etc) that don't work currently (populating block IDs is insufficient for certain block types; ladders will pop off the wall when loaded, for example)
    • Performance improvements (the SQLite db is a bit of a bottleneck right now)
    • Improved starting library, including Up/Down paths
    v0.0.3 should be out soon, and will be a bit more fun than v0.0.2. :)

    Something else I'm playing with:
    [​IMG]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  16. Offline

    dak393

    Looks amazing, excellent work! What happens with chests? the contents isn't saved? Now we just need an army of builders to work on a repository of rooms :D Are you going to be cataloging rooms that people send you and possibly putting it as an optional default generator? Man as soon as I have time I wanna help build on this :D

    ... O.O No way :D
     
  17. Offline

    Mukrakiish

    Man I love watching this thread! :D
     
  18. Offline

    HSAR

    Amen to that.
     
  19. Offline

    Timberjaw

    @dak393 Basically, you can store a chunk/room as a list of bytes, 1 byte per block. To store data values, you need an additional byte list, 1 byte per block. The first list takes care of most regular blocks (stone, cobble, dirt, wood, etc; torches seem ok). The second list takes care of blocks that need a specific value, like the color of a wool block or the direction a ladder block is attached to.

    Things like chests have even more data attached to them, which requires a 3rd storage mechanism (since a single byte would be insufficient to store all the info about the items in a chest).

    Re: the Room Library:
    What I'd actually love to do, and have some basic plans for, is to set up a website where packs of rooms and widgets can be uploaded/downloaded by users and dropped into their local installs. A pack could be a random assortment of passages, a themed collection of rooms (Timberjaw's Castle Collection), a single fancy room (like a treasure chamber), or a Room Set (a collection of rooms that are designed to be connected together in a predefined arrangement to create 1 super room).

    I've mentioned widgets briefly, but those will add a lot of spice to most rooms by dynamically populating them with objects. Widgets would be things like tables, bookcases, fountains, etc that can be reused in multiple rooms.

    [​IMG]

    I'm now exporting/importing Data Values. These specify what direction things like furnaces should face, as well as the color of wool, the type of wood, and so forth. There are still some quirks to work out there (furnaces/tracks/torches don't seem to take their data value correctly).

    I've also begun tackling Tile Entities. These are complex blocks like signs, chests, furnaces, and dispensers. They require custom data beyond a simple byte value (a chest, for example, has 26 item slots, each of which needs its own type and data value).

    So far Signs are working for tile entities, so I can save and reload signs complete with text. :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  20. Offline

    dak393

    Yay, great to see you making progress :). Are you just using flatfile to store all the data? What setup do you use to store say the signs I'm guessing you store item id, data(byte), then the additional information? Man I should really download the new version and look through it XD (and make tons of new rooms :) .)
     
  21. Offline

    Timberjaw

    @dak393 The rooms are stored individually as files in an NBT format. I store two separate byte arrays: block type and block data value. There's an additional compound tag storing the more complex tag entity information. Some meta data is tracked as well, such as the author of the file and the date it was saved.

    The room files sitting on disk will only be used for generation if they're loaded into the Library though. The library is stored in a SQLite database. Rooms are randomly selected from the database, then loaded from their source files on disk to generate new chunks. Active rooms are also listed in the database for the purpose of edge matching.

    I still have some more work to do to bring the data values and tile entities into the generator (right now they're only pulled into the Room Editor). Once that's set up, and maybe after some optimization, I'll release 0.0.3.
     
  22. Offline

    dak393

    great work on this :), good to know hope to see more updates and I hope I get some time (prob next week or 2) to work on a bunch of rooms.
     
  23. Offline

    Mukrakiish

    @Timberjaw
    So I've been thinking with all this chunk generation options coming up with 1.8 is there going to be additional pre-laid out framework that you can run with following Strongholds and Town generation code?
     
  24. Offline

    Timberjaw

    @Mukrakiish I'm not sure what you mean by a pre-laid out framework, but I'll be making use of Bukkit's BlockPopulator feature to create ruins/dungeons in the default world, that lead into the dungeon world.

    For now though, Dungeonator just takes over the default world, which should still work in 1.8.
     
  25. Offline

    HSAR

    I think he's wondering whether you can hijack the Stronghold biome or the Town biome to integrate it better.
     
  26. Offline

    Timberjaw

    @HSAR Ah. I'm not sure. If 'town' is actually a biome, it could be feasible to have my BlockPopulator try to put the dungeon access areas in or near towns, but I won't really know until 1.8/1.9 is out.
     
  27. Offline

    HSAR

    @Timberjaw - Towns are almost certainly their own biomes. Notch commented on it on Twitter. Not sure if strongholds are, but it's likely.
     
  28. Offline

    Mukrakiish

    @HSAR

    Thank you, sometimes I don't translate my thoughts well to paper :D
     
  29. Offline

    HSAR

    @Mukrakiish - No worries man, it's cool.

    Does Bukkit offer any functions for creating custom biomes? If there were, you could attempt to reverse-engineer the useful bits of the town biome code.
     
  30. Offline

    Timberjaw

    @HSAR I don't think so currently. Biome data is read-only as far as I know.

    Sorted out a big chunk of the performance issues I was having with SQLite. Chunk generation went from avg 280-250ms per chunk to 40-60ms. There are still occasional spikes but the overall feel while walking around is way better.

    I've also fixed the furnace/torch/track alignment issue in the Room Editor (thanks to raphfrk for feedback on that).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
Thread Status:
Not open for further replies.

Share This Page