1.8.8 Dungeon generation??

Discussion in 'Spigot Plugin Development' started by Didi1150, Jun 7, 2021.

  1. I want to know gow to generate a dungeon, which consists of many small rooms connected to each other. For example, thos can be seen on hypixel skyblock. What would be the easiest way to do that? Ive read somewhere that you need an A*Algorithm.
     
  2. This depends on what kind of dungeon you want, do you want it to be randomized? like every dungeon will be different each time, or do you want to just add pre existing one? Easiest of the two is to just add pre existing one, which you will create your self. I already made a randomized dungeon and I can tell you that there's a lot of computation specially if you would like it to be a maze dungeon
     
  3. I want it to be randomized, so ill build different small rooms which will then be geberated and linked together
     
  4. You will need to read up on a topic called "procedural generation". I will link some resources below but note that there is no "out of the box" solution for this. You will need to understand what it is, try some stuff out, start small and grow.

    Basics: https://en.wikipedia.org/wiki/Proce...l generation is,create textures and 3D models.

    Example project: https://web.archive.org/web/20170812230846/http://www.gameprogrammer.com/fractal.html

    Generating noise: https://core.ac.uk/download/pdf/34480918.pdf (only in case you want to generate very big structures)
     
  5. Well that will be hard, I'll just explain the idea on how I made mine.

    If you want it to be randomize, then you need to learn how maze is being generated. That will be your foundation and also the hardest part.

    We will always have a spawn point, where the player will start. From that, start crawling on each side, create a random chance to get which will be generated on which way, is it a hallway? a corner? a room? etc., on north, east, south or west? if it's a room, then spawn your structure, at the end of that, get another chance to crawl again on all side and repeat until you reach your goal.

    There are still a lot to consider when generating them, but this is how I started mine.
     
  6. If you still want to proceed with this, here's an example of what the basic dungeon maze would look like, basically each yellow blocks will be the possible rooms or the one that will determine if it will still continue to crawl, to create a hallway or a corner or dead end, the iron blocks is the main hallways, for testing purposes I just use the same length, you can randomize this. You can also notice the different colored wool, this are the direction, I just use them so I can visually know where they will go or the direction.
     

    Attached Files:

  7. I want to set rooms at the yellow blocks and the lines between them willjust be gates
     
  8. You can create this as I explain in here

    Here is the Maze Generator I studied when I did this
    https://www.spigotmc.org/threads/a-little-maze-generation-program.261077/

    GoodLuck!!
     
  9. Damn I might need some little help, can u explain maybe just a little bit of the code?