The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
problem with velocity in sdl.1
elel


Joined: 02 Jul 2015
Posts: 1
hi!
am tring to make a fonction that moves pacman with sdl.1 it was tested and it works correctly but the problem that pacman moves very very fast i want to make it move slowly i find some tutorials about how to use timer and sdl_getticks sdl_delay but it doesn't work :/
so am wondering how can i fix the problem and make it move slowly thnx for ur help Smile
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
A simple way would be to calculate the difference between SDL_GetTicks in one frame and the previous frame.

Therefore, you'll need to check your ciode and get it to work!