I am trying to create procedurally generated levels. To do this, I would need to be able to choose different layout widths at the start of the layout. Is this possible? I don't see it as an option in the available system events. Thanks, Morgan.
Develop games in your browser. Powerful, performant & highly capable.
Nevermind - it's choose canvas size.
Actually, "set canvas size" only changes the window size of the particular layout, I'm actually wanting to be able to set the layout width to a random value. Does anyone know how to do this?
You can't change layout size on runtime. Use unbounded scrolling instead.
shinkan - thank you. I tried that but then the player's avatar goes off of the screen all together. That's too bad that the size of the layout can't be changed at runtime. Do you think that would be a good feature? It would help me easily create randomized levels.
Unbounded scrolling set to Yes lets you make you levels no matter how big or small they are. When you turn it on it will center viewport on XY: 0,0 coordinates, so you need to scroll it to your player avatar position.
I am using the scroll to behavior with the main character's avatar but it isn't centering on it. Any idea what the problem may be?
Maybe you could use something like this.
https://www.scirra.com/tutorials/747/zone-based-camera-movement
And scale that area to the size of the actual map.