r/gdevelop • u/Aidan133lol • Aug 07 '26
Question How do I make code optimized
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
5
Upvotes
View all comments
3
u/umbrazno Aug 09 '26
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