Generate Random Structures?

Discussion in 'Plugin Development' started by xxNightlordx, Nov 15, 2012.

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


    Is it possible to make a plugin that generates random structures, such as a castle?
  2. Offline


    The short answer is yes. The long answer is yes.
  3. Offline


  4. Offline


    Probably by hardcoding into your plugin "blueprints" of the structure. You could do this by setting blocks to air/stone/dirt/etc. one at a time. For massive structures, this would take forever...

    Alternatively, you could use for loops to loops through massive locations and change the blocks. Again, this would still take an incredible amount of time.
  5. Offline


    If you want it to automatically generate the castles you would have to change the terrain generator.
  6. Offline


    Simplest way is to do what SgtStud suggested - create a blueprint of several types of castles beforehand and just "randomly" select one of these.

    Alternative, and much more difficult, is to write an algorithm that will build something for you using pre-defined rules. It's complicated, and if you're asking this question, it's probably a little too difficult for you to even consider yet. Try the pre-defined blueprint method first.
  7. Offline


    But whats the code supposed to be? Can u provide an example or something
  8. Offline


    There is an example for a different terrain generator in the link I provided in my previous post.
Thread Status:
Not open for further replies.

Share This Page