AGS engine iOS port

Started by JJS, Sun 13/05/2012 16:41:09

Previous topic - Next topic

Dave Gilbert

Most any AGS game can run using the iOS port, although I wouldn't say Resonance is terribly touch-screen friendly. We'll get to that one sometime next year!

zaphod_beeblebrox

#41
Quote from: Dave Gilbert on Mon 27/08/2012 14:38:14
Most any AGS game can run using the iOS port, although I wouldn't say Resonance is terribly touch-screen friendly. We'll get to that one sometime next year!

Hi Dave, I know this is a digression from this thread, but I have to say thanks for the excellent job you and your team are doing at Wadget Eye! I recently bought and completed Gemini Rue (was sold on it after playing the demo). Being a fan of the adventure genre since the early 90s and having played almost all of them, Gemini Rue stands up with the best of them, and has easily the best story, atmosphere and puzzle-integration I've seen in a long time. Hats off to Joshua and the rest of the team that supported him in making this masterpiece. Can't wait to see what Joshua does next.

Coming back to Resonance, I've only played 15 mins of the demo so far on my Mac (using Crossover) but I haven't noticed anything particularly bad about the interface that would make the game not touch-screen friendly? Can you be more specific - is there something that prevents the game from being completed using a touch screen interface? I'm thinking of buying the full version. Would love to play it on my Ipad instead of the Mac though.


Dave Gilbert

It's mostly that there are a lot of sections and puzzles that rely on mouse hovering in order get through them. With a bit of fiddling, it's possible, but it's not very user-friendly. We're going to make an iOS port one of these days. We're working on Gemini Rue right now. If it works out, we'll do the others.

Edit: And thanks. :)

amateurhour

I'd be grateful if you'd post a process on converting GR to iOS, especially what you ended up having to change to make it more tablet friendly in addition to the general porting itself.
Co-Founder of Pink Pineapple Ink Pink Pineapple Ink
Creator of the online comic Trouble Ticket Trouble Ticket

Dave Gilbert

That's up to Janet, unfortunately. She's the one working on the port, due to the fact that she's much smarter than I am.

zaphod_beeblebrox

#45
I installed AGS on my jailbroken Ipad3 and copied over Resonance as per JJS instructions (i.e. copied game files into /var/mobile/Documents/ags/game and renamed Resonance.exe to ac2game.dat) and the game worked fine right off the bat! Thanks JJS :) I even saved a "test" game at the start and reloaded it and it worked properly.

I still have one problem -- I copied over my old save games from my Mac where I am running Resonance using Crossover (and have already completed about half the game), into the same folder as above (i.e. /var/mobile/Documents/ags/game) as I noticed that is where AGS saved my initial "test" game. After doing this, all my Resonance save games from my Mac now appear properly in the load menu on the game running on my Ipad. However, when I try to load one of these saves, the app immediately crashes to the Ipad home screen without any error message. Any ideas? Is this a Resonance issue, AGS-general issue or AGS-IOS port issue? I tried tinkering with the save game file permissions but that didn't help.

JJS

The modified engine for iOS (and the other ports) cannot usually load savegames from other AGS versions. If you want a Windows engine that is compatible with the iOS savegames, use one from the daily builds: http://jjs.at/daily/. It works like on the ports, just put it into the game folder with Resonance.exe renamed to ac2game.dat. This still doesn't allow you to play the old savegames but you can at least share the new saves between the iPad and the PC.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

robbo007

Hi there,
Sorry for the lame question guys. How do I get the keyboard visible when playing QFG2 VGA?? I'm running ipad 3 jailbroken.

Thanks,
Rob

JJS

Hold down one finger for more than a second. It gets closed the same way.

Not sure how good it will be for playing the game though, it might not have all required keys.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

JanetC

Quote from: zaphod_beeblebrox on Tue 04/09/2012 17:09:00I still have one problem -- I copied over my old save games from my Mac where I am running Resonance using Crossover (and have already completed about half the game), into the same folder as above (i.e. /var/mobile/Documents/ags/game) as I noticed that is where AGS saved my initial "test" game. After doing this, all my Resonance save games from my Mac now appear properly in the load menu on the game running on my Ipad. However, when I try to load one of these saves, the app immediately crashes to the Ipad home screen without any error message. Any ideas? Is this a Resonance issue, AGS-general issue or AGS-IOS port issue? I tried tinkering with the save game file permissions but that didn't help.

I think it would be very unlikely that saved games from one platform would work on another, sorry :(

JanetC

Quote from: amateurhour on Mon 27/08/2012 19:39:47
I'd be grateful if you'd post a process on converting GR to iOS, especially what you ended up having to change to make it more tablet friendly in addition to the general porting itself.

Most of the code change was in the GRUE scripting, which I did on PC as normal in the AGS editor. The largest amount of time was involved in just making hotspots/buttons/icons/dialogue fonts etc bigger and other small changes to make it play better. I also added a new system of icons to compensate for no keyboard being available in the combat and box-pushing sections. I also removed all gameplay elements that needed a right-click.

On the engine side, on the Mac, I changed the way that tapping works from the default, which is designed to enable users of jailbroken devices to play PC games. I didn't need to worry about the engine being compatible with all out-of-the-box AGS games, just Wadjet Eye's games, so I altered the touch-screen controls for the way Wadjet Eye's games play. I also exposed some minor internal stuff in the engine to the scripting language (so that, for instance, the script can now tell whether we are on an iPad or not.)

I've just built a beta version of the game and sent it to testers, so fingers crossed it works on more than just my iPhone and Dave's iPad!

Crimson Wizard

#51
Quote from: JanetC on Fri 07/12/2012 19:04:28
I think it would be very unlikely that saved games from one platform would work on another, sorry :(
They will. We are working on this :).
Although the games saved with some intermediate port version may still remain incompatible. But if that's really needed, I guess there could be a savegame conversion solution.

zaphod_beeblebrox

#52
The AGS app on my IPad 3 keeps crashing. This has happened with both games I've tried playing - Tale of Two Kingdoms and Blackwell Convergence. The games start fine and I can play them for a bit, save/load games etc as well, but then all of a sudden, the app crashes and I return to the home screen. I've tried closing all my other memory intensive apps/games from the background but I keep experiencing this issue. I havent had a session that has lasted more than 20 mins.

Any ideas? Thanks

JJS

I updated the port to the latest source version. Please try with that, it potentially has a fix for the crashing. Unfortunately it doesn't happen for me (ipod 4) so it is a stab in the dark.

If this does not help with the crash, please place a configuration "ios.cfg" into the game directory ("/User/Documents/ags/game/ios.cfg") with this content:
Code: ini
[misc]
config_enabled = 1
[sound]
enabled = 1
threaded = 0
cache_size = 10
[debug]
show_fps = 0
logging = 0
You should notice that sound starts stuttering on room changes but it probably also removes the crashes.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

zaphod_beeblebrox

Thanks JJS for the quick response. However, both options didn't work - I got the latest update, and when that didn't stop the crashing, I tried with the ios.cfg file and that didn't help either. FWIW, I didn't notice any stuttering of sounds when changing rooms like you mentioned. Any other config changes to try? Out of curiosity, what seems to be causing the problem - memory, sound?

JJS

#55
Can you verify that the config file is actually read by setting
Code: ini
[sound]
enabled = 0

This should disable sound completely.

I was under the impression that the crash is sound related but if that config file doesn't make a difference, it must be something else. No idea what it would be though. But since you can reliably reproduce the crash we should be able to figure it out eventually ;)


Edit: Ok, maybe I know a way to find out more about the crash. Since you have a jailbroken device, can you get me the crashlogs from the device? They are stored at this location with a plist extension:
Code: AGS
/var/mobile/Library/Logs/CrashReporter

Because they have to match the debug symbols that I currently have, I would only need the crashes from today.

Edit2: Actually it looks like the crash reports get synced by iTunes, so depending on your situation it might be easier to get them from the PC. A guide is here: http://www.trilinkee.com/crash_logs.html
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

zaphod_beeblebrox

#56
Yes, it is reading the ios.cfg file properly - I set sound enable=0 like you said and that disabled the sound in the app. So that's good.

I looked at the crash logs on my iPad in the folder you mentioned and found several from the ags app today. Here is a fragment of the latest one that might be useful. If this isn't helpful, perhaps I can attach a complete one. (Also, not sure why I need to sync with my Mac/iTunes)

[EDIT] As you can see in the stacktrace below, the problem seems to be in the thread involving AQClient. Googling this, I found a possible soltion involving the autoreleasepool - see: AQClient Issue. Hope this helps.

QuoteCrashReporter Key:   1e746dd56093146ba201ba9cfcb78862c9d8ae10
Hardware Model:      iPad3,1
Process:         ags [4321]
Path:            /Applications/ags.app/ags
Identifier:      ags
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2012-12-29 14:08:38.064 -0500
OS Version:      iPhone OS 5.1.1 (9B206)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000da66
Crashed Thread:  5

[...skipping some threads here...]

Thread 5 name:  AQClient
Thread 5 Crashed:
0   ags                             0x001dcb9a 0xe6000 + 1010586
1   ags                             0x001dd694 0xe6000 + 1013396
2   ags                             0x0020256a 0xe6000 + 1164650
3   AudioToolbox                    0x345f5296 0x34577000 + 516758
4   AudioToolbox                    0x345f6e6e 0x34577000 + 523886
5   AudioToolbox                    0x345f5174 0x34577000 + 516468
6   AudioToolbox                    0x345a2e9a 0x34577000 + 179866
7   AudioToolbox                    0x34598cdc 0x34577000 + 138460
8   CoreFoundation                  0x37f5651c 0x37ec9000 + 578844
9   CoreFoundation                  0x37f564be 0x37ec9000 + 578750
10  CoreFoundation                  0x37f5530c 0x37ec9000 + 574220
11  CoreFoundation                  0x37ed849e 0x37ec9000 + 62622
12  CoreFoundation                  0x37ed8366 0x37ec9000 + 62310
13  AudioToolbox                    0x345f1b28 0x34577000 + 502568
14  AudioToolbox                    0x34578c9c 0x34577000 + 7324
15  libsystem_c.dylib               0x3313572e 0x33127000 + 59182
16  libsystem_c.dylib               0x331355e8 0x33127000 + 58856

Thread 5 crashed with ARM Thread State:
    r0: 0x0000da66    r1: 0x00000000      r2: 0x006d3300      r3: 0x00006d33
    r4: 0x003d3730    r5: 0x0d39cd98      r6: 0x000002cc      r7: 0x053fba34
    r8: 0x00331e5c    r9: 0x31000000     r10: 0x000027a7     r11: 0x00007f7e
    ip: 0x00800000    sp: 0x053fba10      lr: 0x0807f000      pc: 0x001dcb9a
  cpsr: 0x00000030

JJS

Thank you for the log!

The crash happens in the audio callback but I think it is for a different reason than in the stackoverflow thread. I updated the port, maybe it cures the problem.

If it still crashes, I probably have to look at the full crash report. I suppose the crash always happened the same way as in the crash you posted?

You can post new logs using the {code} tags so that they use less room or send to my email jjs@jjs.at.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

zaphod_beeblebrox

Great work JJS! I got the latest update of the port and it fixed the crashing problem! I've been playing a game on it for more than 2 hours now and it hasn't crashed even once. Moreover, if I temporarily close the app and go to the home screen, or switch to another app and then come back, the AGS game resumes from its earlier state, instead of restarting like it used to do. So whatever you changed in this latest update, seems to have done the trick.

I'll keep you posted if I run into any new issues. Thanks again for all your help!

ps. I'm still using the ios.cfg like you said earlier. Not sure if I need to or not with this latest version

JJS

#59
Sounds good :-D

I uploaded another update. It is essentially the same but with a further change for task switching. The config file should not be necessary, ideally the game would run without it or when setting
Code: ini
threaded = 1

in it. So for testing the setting should be set back to this default value.

It is interesting that you don't see a sound stutter. The ipad 3 is probably fast enough so that this does not become a problem usually.

E: All changes are now pushed to the source repo.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

SMF spam blocked by CleanTalk