Jump to content

Howto programmatically generate a map? (server generates map)


Haxel0rd
Go to solution Solved by Peter,

Recommended Posts

Hello,

how can the maps be generated programmatically, by code, without using Inspector?
This is important for games where a server has to generate new random maps (by seed),
without human help/interaction. Maybe the PW staff has a code snipped that could serve
as example? That would be great for starting out.

Thanks and regards!

Link to comment
Share on other sites

  • Solution

Hello, this is not so easy unfortunately as Gaia currently works during design time only. Too many features of Gaia require the unity editor to be present to function properly, so it would not work in a standalone-server build to generate maps upon request.
In theory you might be able to remote-control an unity editor running on a server that generates a level, builds the level as addressable and then loads the new level in as an addressable into your game, but there would be a lot of programming outside of unity in additional tools necessary for that to function properly.
GeNa has runtime capabilities, but it is not fully featured enough to generate an entire terrain from it.

  • Thanks 1
Link to comment
Share on other sites

Hi Peter,

thank you for clarifying, i will mark this post as solved.

For me this is a major drawback though as i bought Gaia for the full price but now i found out that i can't use it for my game (because that requires pure random gen without human interaction). This is my fault, i should have checked more clearly before. It's just sad, as i just got warm with Gaia and i really love it and would like to continue working with it!

I believe generation by code is an essential feature when already having procedural generation,- many people (like me) chose procedural generation not only for saving time, but to have random maps without
human interaction needed. Is there any chance you can put this as Feature Request? Examples where games implement this: Rust, Minecraft, Vallheim, etc.

Feature Request:
Please allow generating of terrain by code.

Idea (maybe this could be possible?):
In your post you wrote that generation by code is very hard as settings are complex and rely on editor (i guess the mask curves are an example where this applies?). However, the 1st terrain generation step though relies on  just**  a few inspector settings, pointing fingers to the button that allows to randomize all stamp settings.
** it may be more complex at runtime / behind the scenes.

But If you could allow users to fire this "single click" on randomizing a terrain (only, no objects) by code, then this would open up wider doors for people, who want to develop games with random maps! I believe the true complications refer to object spawning, which can be a later or separate feature to solve maybe.

Thanks and Cheers!
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...