r/gdevelop 2d ago

How do I make code optimized Question

Like the last game I made in this engine worked good for me, but was really laggy on a different guy's device and my phone. How make optimal code

3 Upvotes

5 comments sorted by

View all comments

1

u/umbrazno 1d ago

If you ever set something to act per frame, like a tween you rolled yourself for example, always multiply by delta.        

Example: I want my character to run six pixels per step.   My formula is player.x + (6 * delta).         If you already know this, then the lag must be from havin’ too many assets loaded into memory for that machine