Post new topic    
Liquid Metal Slime
Send private message
Autosave command on Android 
 PostMon Sep 14, 2020 4:11 pm
Send private message Reply with quote
The autosave command doesn't seem to be working in the Android version of Xoo: Xeno Xafari.

The Facts
    Whenever the autosave command is called in Xoo: Xeno Xafari, the game opens the save menu.

    When I select a slot in that save menu, the game saves, but calling the autosave command will open the save menu again instead of automatically saving in the same slot.

    I am testing with the Android debug apk linked here: https://rpg.hamsterrepublic.com/ohrrpgce/Making_Android_games. I'm also testing with a packaged apk of Xoo: Xeno Xafari that James made for me. I get the same bug in both places.

    The autosave works fine on the PC version of the game.

    The autosaving also works fine when I run the Alien Squatter .rpg file (one of my old games that also uses autosave) on the same Android debug apk I am testing Xoo: Xeno Xafari on.


This is pretty crazy bug, right?
Liquid Metal Slime
Send private message
 
 PostTue Sep 15, 2020 10:21 pm
Send private message Reply with quote
Alright, I created a very sample program to test this bug out and make sure that it's real.

If anyone wants to work on it, here is a link to my test .rpg file. http://files.andihagen.com/miscmedia/autosavetest.rpg

Here are the scripts. http://files.andihagen.com/miscmedia/autosavetest.txt

Basically, the test is very simple and should be self-explanatory. There is a script that runs when you start a new game that opens the save menu and asks you to choose a slot.

When you open the main menu and press save, there is a script that calls the autosave command.

On a PC this works fine. However, if you run this .rpg on the Android version of game.exe, the the autosave command will open the save menu and ask you to choose a slot instead of automatically saving in your recent save slot.

---

In the meantime, anyone know how to script a workaround? For instance, is there an easy way for me to store which slot the player saves in as a variable without scripting a custom save menu?
Liquid Metal King Slime
Send private message
 
 PostTue Sep 15, 2020 11:28 pm
Send private message Reply with quote
Ooh! A minimal test case. Wonderful! I will try it out and see if I can get to the bottom of it (might take me a few days to find time)
Liquid Metal Slime
Send private message
 
 PostWed Sep 16, 2020 12:41 am
Send private message Reply with quote
Bob the Hamster wrote:
Ooh! A minimal test case. Wonderful! I will try it out and see if I can get to the bottom of it (might take me a few days to find time)


Groovy! Can Detective James crack the case?

Here's another hint. This has not been a problem with past versions of the engine. Alien Squatter's autosave functions work fine. They even work fine when using the newest Android version of game.exe. Is this because Alien Squatter was created with an older version of the engine???
Liquid Metal King Slime
Send private message
 
 PostThu Sep 17, 2020 1:57 pm
Send private message Reply with quote
So this bug is not android-specific, it seems to affect all platforms.

This bug was introduced by a mistake in a fix that I made on 2020-06-28 ("Saving in a hidden save slot with a script will not move the default cursor to the very bottom of the save/load menu anymore")

I was incorrectly calculating the last normal slot on games where the player had never visited the save game options menu. The default of 4 would not have been initialized yet, and the number of allowed save slots would be set to 0 which would not affect the save picker, but was affecting the memory of the last saved slot.

That explains why this bug was not happening in other games, since if you changed the number of save slots, or even just looked in the menu that lest you change the number of slots, then the bug would be avoided.

I am guessing that on Windows you were using an older build than 2020-06-28. I think that is the only possible reason you would not have seen it there

Thank you very much for finding this bug! :)

I have fixed the bug, and it will be in tonight's nightly build. Let me know when you are ready for me to re-build the Xoo apk for you :)
Metal King Slime
Send private message
 
 PostSat Sep 19, 2020 2:44 pm
Send private message Reply with quote
(Would be nice if those details had been in the SVN commit message too! It left me wondering a few things, which your post here nicely answered.)
Display posts from previous: