Movement speed

Blitz3D Forums/Blitz3D Beginners Area/Movement speed

The problem is, while your logic will be able to make it move framerate idependently at a constant speed, it will become jerky if you move it EG. 1.58 Pixels per frame.

so if you use Blitz3D, you should think about to jump on the "pseudo-2d by 3d" bandwagon. You will use sprites or quads that are facing to the camera instead of simple 2D images. There are several Sprite Systems that will act as a 2D emulation. Now when you move such a 2D-3D-Sprite by say 0.25 pixels, it won't be limited to full pixel steps as in 2D. Additionally you will get antialiased contours.

No matter if you use 3D-2D or real 2D, you need to use Floats for the positions as well as to time the motion with realtime information EG:

mon_ms#=1000.0 / 85.0
t=millisecs() - mon_ms#
xstep#=1.0

while not keydown(1) ; game loop
 t2=t
 t=millisecs()
 delta#=float(t-t2)/mon_ms#
 ...
 pic_x#=pic_x# + (xstep# * delta#)
 ...
 flip
wend