Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi Yal !

I try to integrate the deltatime function to your engine (essential for an action game)
delta = 60/1000000*delta_time; (in obj_player's Begin_step)

What do you think is the most appropriate place to integrate him?

I've tried:
xspeed = median(-movespeedmax,movespeedmax,xspeed*delta + lengthdir_x(accel,direction))

But not very convincing...
Thanks !

It might be better to keep the internal speed computations as-is (measured in 60 per second), but have anything that changes x/y/z (e.g. "x += xspeed") take the delta into account instead ("x += xspeed*delta"). Changing the internal speed computations won't feel right until you change every acceleration, friction, maximal speed, etc... if you just change the "make speed affect coordinates" bit there's a lot less things that needs changing.

(+1)

Thank you very much for your valuable advice. The engine is well thought and it's relatively easy to add things