Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | anbarasu chinna |
I have created simple 2D Arcade game for mobile device. Where as player can move left and right to avoid obstacles that is coming from top to bottom. My obstacles are sticking around the left and right edges of the mobile screen. This is a simple prototype, also It is working file.
The problem with this approach is all obstacles are added at run time with some logic. Also I have to perform some calculation on obstacles to fit on different screen size of mobile screen. The runtime math calculation on obstacles goes really big.
To avoid this I planned to go for the second solution But don’t know how to achieve this in godot engine.
Here is my second solution
Instead of creating Obstacles at runtime and attaching it to the edges of the screen, I want to create a new scene that includes all the Obstacles placed inside of it as ready made one. In need I can attach this obstacles scene as a child of the main scene so that player can play around. But HERE COMES THE PROBLEM.
How can I create obstacles scene separately that can fit for different screen size?
Note [ Portrait is the only mode for mobile device]
You actually have not described what problem you are facing in the second solution. No mindreaders around today
Reloecc | 2020-09-15 07:04
I am new to Godot and GdScript. Creating things dynamically itself is difficult for me but somehow I can manage creating things with editor. I am looking for runtime solution with easiest way.
anbarasu chinna | 2020-09-15 12:48
If so, maybe you just may change a stretch mode of your whole application in [ Godot > Project > Project settings > Display > Window > Stretch > Mode | Aspect | Stretch ]
Reloecc | 2020-09-15 13:04