I am making a breakout clone for mobile and was wanting to make the ball speed to be related to the screen size. Larger screen would mean faster speed.
Right now I have it set like so:
My reasoning for this is that 320x480 is iPhone resolution so I figured it would be a good base to start at. For the record, it actually runs pretty well on iPhone setting.
Then for the actual movement I just add
dir to the appropriate direction.
The problem is if I change to a device with a larger screen resolution, the ball is crazy fast and is very jumpy.
Is some kind of formula that I can use to multiply to the
random that will make the speed appear uniform across devices?