Comments (12)
Yes, that's quite normal. Your phone is very busy to render all the assets on the screen. A lot of tower defense have this problem.
from android-anuto.
You could look into profiling the app to see if the framerate drop could be avoided until a bigger number of enemies are on screen. Then you could open either issues or pull requests about specific issues that you find. But this one is just too broad as @Almtesh pointed out.
from android-anuto.
I think there are two ways to address this problem:
- Optimizing the game engine (any hints are much appreciated! Like @mvdan pointed out, profiling would probably be the way to go)
- Altering the gameplay like limiting the total amount of active waves (maybe reduces the fun factor but would basically limit the total amount of enemies in game)
from android-anuto.
Note that another strategy would be skipping frames. As in, make the game drop FPS instead of lag to render always the same number of frames per in-game second.
I don't know what the current FPS is, but perhaps you could make the app accept a range like 15-60. At best, it would do 60 frames per second, and at worst 15. You don't want it to drop to something like 4 frames per second.
from android-anuto.
Otherwise, you have large delays in waves
from android-anuto.
You're losing the bonus if you do that. Maybe a button to do faster wave will be great too. Around wave 6X it's reeeeeaaaaaaally long.
from android-anuto.
You should consider to use lengthsquared whenever possible. Sqrt is quite expensive. Maybe save the actual towerrange once (for displaying purposes in the popup) but calculate the squaredrange once and compare to that.
from android-anuto.
I heard about it too. It's a trick to save lot of time. I don't even know how to compute a square root.
from android-anuto.
I think a lot of computing power must be used in tallying all of the damage done by all of the projectiles (tens of shots per second by each Gatling tower) to all of the hit counters (one for each enemy). I have a pretty robust phone, and it gets HOT playing this game. Is it really harder for the processor to render the graphics than it is to keep score?
I agree that most Tower Defense games that I've played slow down at some point, even on a computer. The only way to stop it from happening for sure seems to be to make the enemies stronger so the game ends earlier.
from android-anuto.
I've replaced some distances with squared distances and it doesn't seem to make a big difference. What I see while profiling with lots of enemies, is that there are tons of calls to iterator methods like LazyIterator.hasNext, SmartIterator.fetchNext and similar.
I'm having problems running Android Device Monitor to further analyze the trace so I leave two useful trace files in this zip here.
from android-anuto.
I've run the current version of the app in the emulator with +1000 enemies and it doesn't seem to lag. Is anybody still having lags?
2000 enemies now and still smooth. At 8x, however, it starts to drop frames, but who cares.
Edit: I'm sorry, it seems the emulator was pretty fast. On a physical phone, it still lags.
from android-anuto.
Moving to #141.
from android-anuto.
Related Issues (20)
- Flyers no longer immune to Glue Weapons HOT 2
- [Permission] Add comments to strings.xml files HOT 1
- [Permission] [Knowledge] Add new maps HOT 3
- Increasing Scroe after Game Over! HOT 2
- Crash when loading, other tines
- Incresing crashes as levels progress HOT 1
- Export saves ? HOT 1
- Screenshots for F-Droid
- misspelling in app/src/main/res/values/strings.xml
- Display issues (occlusions) on the enemy status page HOT 1
- Towers do not always aim at correct target. HOT 2
- Crashing HOT 3
- Attempt to read from field 'android.graphics.Paint ch.logixisland.anuto.entity.effect.TeleportEffect$StaticData.mPaint' on a null object reference HOT 2
- Can't move the weapons HOT 1
- Anuto in a blockchain? HOT 1
- This is my favorite game. Excellent. HOT 1
- Add monochrome app icon for Android 13 HOT 1
- Credits & Language Select HOT 1
- What does the pink circle mean? HOT 2
- Not full screen
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-anuto.