Does anyone know how to add/remove layouts via events?

Get help using Construct 2

Post » Mon Mar 10, 2014 11:50 pm

I was thinking of creating a sandbox/space/exploration game, with procedurally generated planets (I don't need help on that, trust me) when it hit me: if the universe is infinite, I need to create multiple layouts with events, but after looking at System's Layout and Layers events, there was no "Create Layout" function. Does anyone know how to do this, or maybe know of a plugin that can create layouts via events?
Posts: 38
Reputation: 3,447

Post » Tue Mar 11, 2014 12:45 am

Not possible. And you don't really need other layouts anyway.
A layout is an abstract concept that is mainly important when you edit your game (when you make the level manually for instance)
The only thing that matters in your case is displaying something on the screen. Whether it's in one layout or another is irrelevant.

If you want an infinite universe, you just have to know what you have to display according to your data representation.
And if you want to have on part of your came representing the entire space and another part where you actually land on a planet... I would just have a Space layout and a Planet layout. When you enter a planet you just have to go to the Planet layout and generate the corresponding planet.

If you worry about persistency (going back to the same planet should generate the same random one), you have to use some nifty seed hierarchy. But I trust you know about that =)
Posts: 1,486
Reputation: 16,565

Return to How do I....?

Who is online

Users browsing this forum: newt and 10 guests