Hello the coders !!
I start a new game.
I create the charts in 1080/1812
I place, therefore, all my sprites according to the vitual resolution 1080/1812.
Obviously, not all smartphones have this resolution. So I create a little routine to fit the background image and resolution according to each screen (SetVirtualResolution( x# , y# ))
How do you make the sprites positioned according to the virtual resolution?
For example, if in 1080/1812 I position a sprite in 300/300 how to make it keep its position on the screen if I reduce the virtual resolution?
I tried calculating like this:
x1=(1080*300)/(GetVirtualWidth())
y1=(1812*300)/(GetVirtualHeight())
But the sprite does not remain on the spot and descends diagonally
Help
I do what i do !!!