Godot version 3.2 BETA 1
I am trying to find a way to scale the movement of a KinematicBody2D so that it behaves the same on different screen sizes. Currently, I am finding that a KinematicBody2D moves at different speeds depending on the screen size.
For example, I am creating a pixel art game where my "game" resolution is lower than the screen resolution. My game is 288w x 512h (portrait). On a mobile screen of 1080 x 1920, my artwork needs to be scaled up by 3.75 times. I could do this by simply scaling the viewport, but I find this gives choppy movement since the object is moving in steps of 3.75 pixels (maybe 4 with pixel snapping). Instead, I have chosen to scale the artwork and maintain the screen resolution. This gives really smooth movement, but the results are inconsistent.
I thought that simply multiplying the vector by the scaling factor would result in moveandcollide behaving the same on all screens but it does not. A test object moving from one side of the screen to the other, is significantly faster on the 288x512 window within Godot, than the 1080x1920 mobile device screen.
In essence, I need the object to move 3.75 times faster on the mobile test device, than it does in the Godot test window because it has to cover 3.75 times more distance in pixels. If anyone has any thoughts on how I can do this, or has an idea where I may have tripped up, I really would appreciate it.
Thanks for taking the time to read this essay! :)