Original Post
Many years of programming and I never actually used a proper elapsed time functionality, which promises to run and move game objects in pixels per second rather than pixels per frames.
My question is where do you actually add elapsed time to? Is it every single object that you move? (which sounds like something you will eventually miss) or is it only on the main loop?
My example...?
[Engine] -> Game(delta) -> Player(delta) -> moveRight(delta) - > x += speed*delta;
[Engine] -> Game(delta) -> Enemy(delta) -> jump(delta) - > y -= jumpValue*delta;
[Engine] -> Game(delta) -> BackgroundManager(delta) -> moveBackgrounds(delta) - > for each(bg in bgList) bg.x -= speed*delta;
Am I thinking correctly or..?
Any interesting tutorials someone can link me to?
My question is where do you actually add elapsed time to? Is it every single object that you move? (which sounds like something you will eventually miss) or is it only on the main loop?
My example...?
[Engine] -> Game(delta) -> Player(delta) -> moveRight(delta) - > x += speed*delta;
[Engine] -> Game(delta) -> Enemy(delta) -> jump(delta) - > y -= jumpValue*delta;
[Engine] -> Game(delta) -> BackgroundManager(delta) -> moveBackgrounds(delta) - > for each(bg in bgList) bg.x -= speed*delta;
Am I thinking correctly or..?
Any interesting tutorials someone can link me to?