Hi All
I have a question that on the surface, would appear to be quite valid, however, I've not been able to find an answer to it for well over a year!!
I really hope someone could point me in the right direction!!
I'm developing a 2d game based on Surfaceview and basically all I would like to know is now do I move a sprite so it moves the same speed on all screen dpi's/resolutions?
What I mean is:
I use an explicit value (say x=x+1) then after 240 cycles, on a 240x400 screen, the sprite would have moved the whole width of the screen. But, on a 800x480 screen it would only have made it halfway (thus appearing slower).
My sprites are scaled and appear on the screens OK (ie, they looks the same size relative to the screen / ratio they are being displayed on).
The above was just an example - I'm not using an explicit value, I'm using a value based on the DPI of the screen , but this isn't working either and I'm wondering if anyone knows how it's meant to be done?
Someone recently tried to explain to me that it's done with calculations based around the delta-time but I don't seem to be able to get that to work - I really would appreciate someone pointing me in the right direction or explaining it in (very) basic steps!!h
Thank you sooooo much!!
I have a question that on the surface, would appear to be quite valid, however, I've not been able to find an answer to it for well over a year!!
I really hope someone could point me in the right direction!!

I'm developing a 2d game based on Surfaceview and basically all I would like to know is now do I move a sprite so it moves the same speed on all screen dpi's/resolutions?
What I mean is:
I use an explicit value (say x=x+1) then after 240 cycles, on a 240x400 screen, the sprite would have moved the whole width of the screen. But, on a 800x480 screen it would only have made it halfway (thus appearing slower).
My sprites are scaled and appear on the screens OK (ie, they looks the same size relative to the screen / ratio they are being displayed on).
The above was just an example - I'm not using an explicit value, I'm using a value based on the DPI of the screen , but this isn't working either and I'm wondering if anyone knows how it's meant to be done?
Someone recently tried to explain to me that it's done with calculations based around the delta-time but I don't seem to be able to get that to work - I really would appreciate someone pointing me in the right direction or explaining it in (very) basic steps!!h

Thank you sooooo much!!
