Skip to main content
itch.io
Browse Games
Game Jams
Upload Game
Autumn Sale
Developer Logs
Community
Log in
Register
On Sale:
Games
Assets
Tools
Tabletop
Comics
Indie game store
Free games
Fun games
Horror games
Game development
Assets
Comics
Sales
Bundles
Jobs
Tags
Game Engines
Viewing post in
SCRAPSHIP (Done!)
← Return to topic
40wattstudio
3 years ago
(+1)
2 JAN 2020:
I've long had a suspicion that the game lags when too many enemies and objects get on screen.
To prove and put numbers to this, I coded up a simple counter that keeps track of how many times the main game loop runs in 1 second. Optimal is 60 to 62, but I've seen it get down as low as 45 on very busy screens. Obviously this is not ideal.
To fix this, I've reduced some of the quantities of enemies and also optimized some of the code so it's not checking conditions that are irrelevant in the first place.
This will be my main focus for the rest of the week because there's no point creating more enemies and adding to the code if the game has lag issues.
But fortunately this is one of the "easier" things I'll have to fix, more time-consuming than anything.