Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do you make level generators?

Comments in 'Plugin Development' started by Dinokiller, Nov 16, 2013.

  1. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    Where is the documentation for making your own level generators.? If there is none then can someone please give me a basic idea of how to make these things. Thanks.
  2. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    The only level generator is by shogincp, I m curious about this too. I don't think there is any documentation though :(
  3. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    Oh well... :(
  4. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    392
    No their isn't documentation, but just look at other level generators. I made a plotme level generator, I will upload it when I'm home so you can check that too
  5. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    I once had a quick look through a few level generators but not properly so I might take a proper look soon.
  6. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    You start the class with

    PHP:
    class generator implements LevelGenerator{

    For further examples, check shogicp's Skygrid Generator. :)
  7. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    Lol. I worked the class part out!
  8. Dragonbone
    Offline

    Dragonbone New Member

    Joined:
    Nov 13, 2013
    Posts:
    50
    You can look at @VanishedKevin infinite world generator
  9. ZacHack
    Offline

    ZacHack Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    326
    Plugins:
    6
    Minecraft User:
    _ZacHack_
    He has one? Where? Lol
  10. Dragonbone
    Offline

    Dragonbone New Member

    Joined:
    Nov 13, 2013
    Posts:
    50
    In his PocketEssentials
  11. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    Its now done yet! (infinite generator)
  12. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    392
    It's impossible
  13. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    Hey wies how do you teleport player in a schedule to coordinate
  14. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    392
    PHP:
    $player $this->api->player->get($username);
    $player->teleport(new Position($x$y$z$level));
  15. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    Check your inbox please!
  16. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Uh link please?
  17. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    I would start by looking at the LevelGenerator code.
    Maybe, you could learn something from that?

    Here is the LevelGenertator inference:
    PHP:
    interface LevelGenerator{
        public function 
    __construct(array $options = array());
      
        public function 
    init(Level $levelRandom $random);

        public function 
    generateChunk($chunkX$chunkZ);
      
        public function 
    populateChunk($chunkX$chunkZ);
      
        public function 
    populateLevel();
      
        public function 
    getSpawn();
    }
    You would have to rewrite this to generate your level.
    Maybe start easy by making a flat world of netherack?

    Here is the SuperFlat world generator(First example of a custom level generator):
    https://github.com/PocketMine/PocketMine-MP/blob/master/src/world/generator/SuperflatGenerator.php
  18. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    A flat netherack world sounds good to start with! :D
    jython234 likes this.
  19. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    If you guys need help just PM me :)

Share This Page

Advertisement