The Dink Network

Redux on Mobile - game response slows right down

Pilgrim's Quest

May 11th, 09:25 PM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
Testing the Redux version of PQ on an iPad Pro 2016, after a while of wandering around the village and back down in the purple catacombs the graphics update time seems to slow down as if Dink and the game's speed is set to really slow mode.

Playing the previous version of PQ - 1.44d - I don't get this, at least not so far and I've gotten past the point of getting ice armour and talking to the Soul Man, which is further than I have in the Redux version.

The biggest difference at this point between these two versions is the script attached to each screen which adds the little sprites of the new stats down in the bottom left hand corner of the screen. This script uses only 4 internal variables, but does generate 19 sprites, 18 for the 3 digits for each of the PQ stats and 1 for the sprite covering up the old bar. And on my old iPad Pro there is a noticeable lag in drawing these sprites that I don't get when using the Desktop version on a PC. (Thinking about that 19th sprite, I probably could lose that, as I have replaced the original stat-xx.bmp to what that patch does). Maybe the iOS version doesn't get rid of graphics in memory or something, but looking at the log in debug mode provides no clues - just a message "killing sound cache".

This performance lag is not noticeable playing DinkHD on a PC.

Unfortunately there is a bug right at the end of ver 1.44d in which the whole frog-bot thing stops working, and/or difficulty in deactivating a frog-bot with Skard when playing on an Android device as I've had two people reach out to me about this. As there is no way I know to include save games on mobile versions, or have the ability to add/replace previous save.dat files (or whatever their mobile equivalent is) between DMOD versions, it is hard to test this.

There probably is a way to run an Android emulator on a PC, so maybe I can look into that.

If any-one else is trying to play PQ on a mobile device, I'd suggest switching if you can to a Desktop, at least until I can figure out how to get around this.

May 11th, 10:09 PM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
I believe DinkHD will always run smoother on a PC, due to limitations with system resources on mobile devices compared to PC. I also remember Seth stating that he had to rework DinkC to use less stack memory which does cause a noticeable slowdown I think when doing complex DinkC stuff but at least makes the game play-able. I politely begged him to keep that stack hack out of the windows build, since it doesn't need it to run (unlike DinkHD for mobile), which he agreed. Which is good otherwise windows build would also have the slowdowns. I guess this means Seth has to use different builds/versions when on mobile compared to PC which is probably annoying but at least people have the option to play at full speed on Windows so hopefully he keeps it that way.

This is at least how I understand it, I have no idea about the exact differences, only Seth knows that, but you can maybe read more about it here: Stack hack discussion for mobile
May 12th, 05:50 AM
seth.gif
Seth
Peasant He/Him Japan
 
Ha, I completely forgot all of that stack hack stuff. I'll have to do some tests and see if that's the slowdown problem mentioned and if I can get rid of the hack now or what, even if only for iOS.
May 12th, 08:22 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
So I had a test on a different iOS device, a newer one than my 8 year old, 2016 iPad Pro, and so far I haven't been able to reproduce the error on my iPhone SE (2022 model) by playing up to the same point in the DMOD.

Seth has given me a way to add a save.dat file, via iTunes, to the DMOD on an iOS device, which I'll test out tomorrow. To see if the frog-bot error is still there on iOS.

I'm curious if the save.dat method works via iTunes, would there be a similar method using Google Play for Android? I know nothing about Android as I've never had a device using it.
May 12th, 01:12 PM
goblins.gif
drone1400
Peasant He/Him Romania
C# nerd 
What the heck?! Getting a save.dat file on an iOS device via iTunes?! Isn't iTunes an app for music? This all sounds weird as hell to me...

On Android, you'd probably just connect your phone to a computer with a USB cable and copy the file in the right folder on the phone... Or I think you can use bluetooth to transfer files from a computer to a phone. Or I suppose just download the file directly from the phone browser and put it in the right place using whatever android file manager you might have?
May 12th, 08:17 PM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
Well iTunes is probably the way you can go to connect an iOS device to a Windows based PC.

On macOS now, it is all done via the Finder, so you can see the apps on an iOS device just like any other storage media, although only to a limited level it seems. No real structure of where the DMOD files are saved.

Shame you can't embed images on this forum...

Anyway, I can see the app on my iPad via the Finder on my mac mini, and I can install a dmod directly by dragging a .dmod file onto the app icon which is cool. Combine that with Martridge which packages save games I'm going to see if that works as well to let me test a saved game from PC to mobile.

Your points about Android are probably spot on, just need someone to test it.
May 12th, 10:55 PM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
After some more testing, in which I have the script that adds the new stats sprites to the screen check if on iOS and then exit before adding these 19 sprites, it didn't help.

It seems at some point on iOS you reach a "killing sound cache" loop - at least that's as far as I can tell looking at the debug log file via the on screen display.

As I'm currently testing why the "F" key fails to change Dink into a frog-bot after successfully defusing one on mobile, I've found you can transfer autosave.dat files between a PC version and a mobile version via packaging up using Dfarc 3 on the PC, copying the .dmod file directly into the app file (which I'm doing on a macOS system via Mac Finder) as a clean install of that version of the DMOD. (Seth put me onto this ability to install a dmod on iOS without having to use URLs or the DN.)

Unfortunately I had no success packaging up via Martridge and then using this drag and drop to the iOS app. The Martridge package is copied across, and the iPad tries to install a 0 K sized file, then just runs the original game.

++++++++++++++++++++++++++++++++++

EDIT
Another little thing Seth mentioned is that on iOS you can send a saveX.dat file to the mobile version from the PC by renaming the saveX.dat to saveX_dmodFolderName.dat - then drag and drop onto the DinkHD app on the Files view on the mobile device. I've achieved this by using my own install of PQ as a test "pqrdx201", not sure what folder naming structure the .dmod files here have exactly.

Not sure if this works on Android, would be nice if it did.

As for extracting a saved game from an already existing DMOD on a mobile device, no such luck it seems.

====================================

EDIT AGAIN

Latest version of Martridge packages up successfully for drag and drop onto iOS App, with added bonus of any saved games coming across!