vincetiu8 / covid-tower-defense

https://github.com/Invincibot/covid-tower-defense.git
1 stars 0 forks source link

Optimize game #269

Open vincetiu8 opened 4 years ago

vincetiu8 commented 4 years ago

Please add anything we could optimize to this thread. I'd like the game to run a little faster than it currently does.

Things we could do:

Graphcalibur commented 4 years ago

Enemy explosions should be optimized better as well. Game lags even when there are only a few happening at the same time.

vincetiu8 commented 4 years ago

Capp Here is the current profile of the game. I think if we can reduce the number of times we use scale and blit then the game will be optimized enough.

vincetiu8 commented 4 years ago

I was thinking since our current draw method for the game goes like draw images onto surface -> rescale surface to 720p -> rescale surface to proper resolution we could cut out the middle part and optimize it?

Graphcalibur commented 4 years ago

Sure. We can also do the "blit all images onto one surf then rescale" for the level select menu. Also, I don't think players would zoom in a lot on the level select menu so we can reduce the number of zoomed in body images we have to store and thus reduce the memory usage.