Android Version

The biggest trouble I’m having right now is extremely long load times when starting the game (10 min or more), and sometimes when accessing the map in game (on the order of a minute or more). Success results in very large explored areas / save files I guess.

Would be nice to have that improved at some point. I do have a fairly high end Android.

Meanwhile I may have to play some shorter games 8)

I guess we should go with balancing Android version in a way that player characters would die early.

1 Like

Ha ha, let’s just say I’m planning a series of very very bad days :wink:

how do you get that awesome isometric view

Game work great on my android.

In case you havent figured it out, you need to use one of the iso tilesets like chesthole_iso or hodders_iso or something like that.

Gonna try this on me note 8.
From what I read its ram dependant on android so seeing as the note 8 has 6GB of RAM i should be able to run some dead guys tile set and sound pack no problem?

I’m able to run the latest APK (0.C-8401) with Chesthole soundpack on my HTC One M8 (Android 7.1.2, 2GB RAM) without issues.

I’d love to know your specs, specifically your device and Android version. Sounds like an issue specific to your device, I just gave latest APK a test on my HTC One M8 and Xiaomi Mi 6 and load times for a new game were under a minute, all seemed to behave as I expected. Could it be some other software interfering with the apps IO performance perhaps?

Sure, I have a Galaxy S8 running Android 8.0.0. No ideas on what software might be interfering. It’s fast running new games, just the ones with big save files that get slow.

What memory card do you use in your phone?
or is the game stored on the phones internal memory?

Internal. 4Gb, about half of that free.

hmmm there pretty good phones so no idea why it would be slow

Thanks for the specs @Unawares, yeah an S8 should run very well in theory! A few more questions:

  • Does this slowdown happen consistently on creating a new game, or only on a larger save if you’ve been playing for a while?
  • Does it happen when you quicksave/autosave? Or only when loading a save?
  • Have you noticed the slowdown on any other apps/games outside of CDDA?
  • If the issue only presents with bigger saves, feel free to zip up a save file from your device and I’m happy to test it out on my hardware and see if I can reproduce it.

In the interim you can try deleting the app cache and data (this will delete your saves though, beware!) as well as potentially running the phone in safe mode and seeing if the slowdown persists: https://thedroidguy.com/2019/01/samsung-galaxy-s8-started-running-slow-update-troubleshooting-guide-1073515

Edit: Oh one other thing you might want to try is disabling Samsung’s Game Tools (or equivalent) if it’s running: https://www.reddit.com/r/TheSilphRoad/comments/95w383/performance_fix_im_on_a_galaxy_s789_lemme_save/

There’s a huge optimization to map memory coming soon-ish, this should make the android version run noticeably better

4 Likes

Hi, thanks for taking time to look at this!

  1. The problems don’t occur at all on a new game. They became progressively worse on my game with lots of save data as I continued to explore and increase the save file size.

  2. I just ran a test loading the game. Character is several layers underground in a lab, not sure if that matters. About 9 minutes to load the game this time. Immediately looked at map, quick response, and quick response loading the other underground levels, but the surface map took about 56 seconds to appear. I took a few steps and quicksaved, quick saves are taking about 16 seconds.

  3. I haven’t noticed slowdowns anywhere else.

  4. I have the save zipped, 36 MB. I’ve shared it using Link Sharing.
    https://s.amsu.ng/HIkhJaRa4ogN
    (Expires: Jan 12, 2019)

Thanks for the other suggestions, I’ll play around a bit more and if I get something to work (or help) I’ll let you know.

Much appreciated!

Ah brilliant, thanks for replying in such detail! I grabbed your save game and was able to reproduce what you’re seeing on my Mi 6, so this indicates to me that this is a legit performance issue with the game on Android as save games get huge. I’ve got some time this weekend so I’ll debug it and see what’s causing the long delays. Sounds like it may be related to map memory, though as there’s slowdowns in several parts of the game, it’ll likely be a few issues compounding together. Thanks again!

Yeah as @dissociativity guessed, the save game long loading times appear to be caused by deserializing map memory from the save game data on disk - here’s a grab from the Android Studio profiler with the callstack:

It appears the short stall before displaying the surface level of the overmap is a similar issue - slow json read times for a large amount of data - seems serializing in monsters is taking the lion’s share, probably as there’s simply a lot of monsters:

I wasn’t able to get a capture of the quicksave lag before it exits back to the main menu, but I assume it’s a similar issue.

At a glance, I think a potential fix to this problem across the board might be to adjust the json data loading so that it always loads from a string buffer in memory (ie. the JsonIn class in json.cpp/h takes whatever std::istream object is passed into it in its constructor, immediately streams the contents of that stream into a std::string buffer in memory, then does the rest of its processing using a std::istringstream that reads from the string buffer) rather than operating directly on a fstream, since it seems file seeking using a std::fstream is causing quite a performance hit. Some of the code may already do this, but it would be great if it was default behaviour for all JsonIn streams. Not sure how much of an issue this is for the desktop version as file IO seems to be pretty fast, but wouldn’t be a bad idea for scalability and would definitely improve Android performance. At least I think that will work anyway.

Edit: just tried playing around with the solution I suggested above and it doesn’t seem to make much of a difference to load times unfortunately! I think IO streams are just rather slow in C++ across the board. Oh well, back to the drawing board.

3 Likes

My pleasure, glad you can reproduce it. Thanks for all your work on this!

Is there a way that we can have the ability to assign show/hide keyboard and show/hide quick shortcuts to the two fingers swipe gestures? I want to play this game in immersive mode (hiding the Android navigation bar) but would still need a way to toggle the keyboard and quick shortcuts on and off.