Mobile version not moving player to new room

I released a test of my game and, while it works ok on a Windows browser, it is not working as expected on an Android mobile. I have this set up:

Every turn:
	If the player has been in Esperregion for exactly 5 turns or the player has been in Esperregion for exactly 10 turns or the player has been in Esperregion for exactly 15 turns:
		Say "[one of]warning1.[or]warning2.[or]warning3 [stopping]";
	If the player has been in Esperregion for 20 turns:
		Now the player is in 100m.

(100m is a new room in a new region. Previously the room had a different name so I know this is not the fault of the room name.)

This is the code they are moved to:

100m is a room in Sub1. The unvisited_description of 100m is "[100m_long]".
	to say 100m_long: say "Long room description.".
The description of 100m is "[if unvisited][100m_long][otherwise]Short description.".

Every turn:
	If the player has been in Sub1 for exactly 1 turns:
		Say "There is static, and then a short silence before you hear a click. 'Hello.'".

After the 20th turn the player is moved to a new room in a new region. I’ve noticed on the mobile that this count of every five moves gets lost. Sometimes it comes in after seven moves. Eventually, all three warnings are printed but it never moves the player to the new region. It gets stuck on the last warning and repeatedly prints that after the 20th, 25th, 30th move etc.

I don’t know if this is a cache thing. I know javascript can be problematic in terms of browser cache, but has anyone else come across this problem? Could this be an issue with regions, since the above code only moves the player to a new room and makes no mention of the new region? I don’t see how this could be the problem since it works on the Windows browser.

It’s probably an interpreter issue and not a code issue, since as you mentioned it works on a Windows browser. I don’t have enough experience to tell you what the fix is, but (for others) can you provide:

  • the version of Inform 7 that you’re using
  • the interpreter you’re using on Windows
  • the interpreter you’re using on Android
  • any extensions you’re using

hI @Hidnook

Version: Inform 10.1.2.20220830
Interpreter Windows: Glulx
Interpreter Android: gblorb.js
Extensions: Locksmith by Emily Short, Basic Screen Effects by Emily Short, Conversation Responses by Eric Eve

Have you tried something like:

Every turn:
	if the player has been in Esperregion for exactly 5 turns:
		say "Warning1.";
	otherwise if the player has been in Esperregion for exactly 10 turns:
		say "Warning2.";
	otherwise if the player has been in Esperregion for exactly 15 turns:
		say "Warning3.";
	otherwise if the player has been in Esperregion for 20 turns:
		now the player is in 100m.

The result you’re getting suggests the Android interpreter is having trouble with the complex conditional and/or cyclical text replacement.

EDIT: You can also use “Every turn when the player is in Esperregion” to ensure those rules only apply in that one room.

It will be very strange if a Glulx game doesn’t behave the same on all interpreters; and even stranger if the browser version doesn’t behave the same. It’s not like the Android device has special code for handling Inform conditionals. It’s just running Javascript, which is extremely standardized.

Is it possible that your Android device had an older version of the game file cached? Sometimes when testing the web interpreters, I have to flush the browser cache to make sure that the game I just uploaded gets downloaded.

2 Likes