kittykatattack / ga

The world's tiniest, cutest and funnest game engine
451 stars 85 forks source link

Random stutter with ga.worldCamera #84

Open JulienCandy opened 2 weeks ago

JulienCandy commented 2 weeks ago

I've assembled a basic setup for a platformer game:

A map made of a tileset. A player sprite with walk animations. I can move the player left/right with the keyboard. FPS is set at 60 for the "world", 12 for the player. Camera follows the player. No other moving object. No set collisions.

Just by moving left/right, I get some random stuttering eventhough the FPS doesnt seem to drop (I've added a debug showing the FPS on screen).

No stuttering if the camera is fixed, so I assume it comes from the ga.worldCamera in plugins.js

Whats going on with that function that makes it perform so poorly?

Thanks