-
Notifications
You must be signed in to change notification settings - Fork 101
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
Casting spells too fast on Android causes crash #113
Comments
I'm seeing similar crashes on desktop now that I've implemented basic combat. I worked around the issue by returning valid values from the problematic function calls, but these should be reverted when this issue is resolved. I believe this issue is related to having a dynamic number of directions based on animation. Changing animations should copy the current directions, so it looks like this is happening for invalid directions (who should default to closest direction, or |
Yea... after looking into it a bit more, I'm pretty confident this is the issue. Far less apparent on desktop due to I/O speeds being way faster. Due to how animation layers are streamed, some layers may not have the same number of directions (or frames) as needed at the time of drawing. This can be fixed in a few ways, potentially the easiest would be to simply clear the old layers when the cof changes, but what I want to try also is using bit flags to know when required layers are loaded. I/O speedups could also alleviate this issue. I'm sure I will probably want to cache certain animations later (especially on android), but that is an optimization that I am leaving for another time when I have a better understanding of what assets are required. 6 small changes work around this issue for now to hide it. |
|
Casting spells too fast on Android causes crash. I think that android I/O is too slow which is causing a crash if too many spells are casted in succession. Requires more investigation, because there should be an I/O block until the asset is loaded, but the app is pushing on ahead and getting an IOOBE.
The text was updated successfully, but these errors were encountered: