2D side-scroller games and wide screens, a big problem


I have been working hard on making it possible for the gameplay to be placed in the center of the screen regardless of the screen width (and keep the original ratio), the method I had "invented" to achieve this turned out to fail when adding the player camera T.T.

So I did some research and curiously I came across a question I had asked on reddit xD asking about the same problem LOL well, now that I have more experience I was able to understand the answer I had been given on r/godot


And now I'm using a viewport for the gameplay. In simple words, it's like a "second screen", like multiplayer games with split screen (it's the same method) and it seems to work very well, I did a test on android. And now you can place the virtual buttons taking advantage of the entire length of the screen you are running on.



I leave you a screenshot of how I have organized my scenes so that it is comfortable for me to create levels, basically it is a main scene where I add two scenes already prepared, one is the interface (hud, viewport) and the other where all the gameplay elements will be placed (characters, tilemaps etc) and then in the interface code I reparent all GameScenario so that it is inside the viewport.


Get Toziuha Night: Order of the Alchemists

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.