Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize resource allocation and requirement #131

Closed
hyiltiz opened this issue Aug 4, 2018 · 3 comments
Closed

Normalize resource allocation and requirement #131

hyiltiz opened this issue Aug 4, 2018 · 3 comments

Comments

@hyiltiz
Copy link

hyiltiz commented Aug 4, 2018

About after Wave 40 (most definitely Wave 60), my Nexus 5X struggles to render the game properly at 4x speed, and interestingly 1x speed is smoother, and as a result, faster than 4x speed at that point. I assume that although the visuals are faster at 1x there, the game logic still happens faster.

For the game to be functional, it should also be playable late in game. There needs to be quite some optimizations (batch rendering, batch game logic updating comes to mind) should help reduce this resource requirements with huge and fast mobs with tons of bullets everywhere.

@mjaun
Copy link
Owner

mjaun commented Aug 5, 2018

Strange, for me the game is easily playable to level 100 with similar hardware, at least at 1x speed. That the game is smoother at 1x if the device is running near its limit is understandable. But I actually can't imagine how it could run faster. With 4x speed the code which is executed is the same, but rendering is triggered each 4 logical ticks. Could you provide a screenshot and a debug log dump for this?

Of course suggestions for optimization are always welcome. I'm not familiar with the techniques you mentioned. So how would you apply them in this context? Keep in mind that the game uses a simple Android Canvas as graphics API. So far I think the most efficient (but expensive) way to optimize performance is to switch to OpenGL or some framework (and maybe even write the game logic in C++).

@hyiltiz
Copy link
Author

hyiltiz commented Aug 6, 2018

Oh, I just assumed you used opengl. About lags and smooth gameplay experience, I think the difference in our gameplay style is the key. I played the official released game 0.4-1 by putting as much towers as possible first then enhancing them then upgrading them one by one if necessary. In this gameplay, about 60% of the default map is utilized; most mobs travel deep into the map then die. This makes it laggy. I also played a game where I compiled the game in debug mode with infinite credits and upgraded everything right away. Until about Wave 90, no mobs ever started moving vertical; they almost never really ventured into the map. This gameplay was extremely smooth. So it is about the number of entities being rendered. So if we need to optimize, we might want to monitor that, and do something about it.

@mjaun
Copy link
Owner

mjaun commented Sep 24, 2018

Moving to #141.

@mjaun mjaun closed this as completed Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants