Author Topic: AGS engine iOS port  (Read 59405 times)

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: AGS engine iOS port
« Reply #40 on: 27 Aug 2012, 14:38 »
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!

Re: AGS engine iOS port
« Reply #41 on: 27 Aug 2012, 16:47 »
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.

« Last Edit: 27 Aug 2012, 17:20 by zaphod_beeblebrox »

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: AGS engine iOS port
« Reply #42 on: 27 Aug 2012, 18:18 »
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

  • looking to turn semi-pro
Re: AGS engine iOS port
« Reply #43 on: 27 Aug 2012, 19:39 »
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

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: AGS engine iOS port
« Reply #44 on: 27 Aug 2012, 20:34 »
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.

Re: AGS engine iOS port
« Reply #45 on: 04 Sep 2012, 17:09 »
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.
« Last Edit: 04 Sep 2012, 17:37 by zaphod_beeblebrox »

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine iOS port
« Reply #46 on: 04 Sep 2012, 18:43 »
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

Re: AGS engine iOS port
« Reply #47 on: 19 Oct 2012, 12:15 »
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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine iOS port
« Reply #48 on: 19 Oct 2012, 14:27 »
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

  • Mittens Serf
Re: AGS engine iOS port
« Reply #49 on: 07 Dec 2012, 19:04 »
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.

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

JanetC

  • Mittens Serf
Re: AGS engine iOS port
« Reply #50 on: 07 Dec 2012, 19:17 »
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

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: AGS engine iOS port
« Reply #51 on: 08 Dec 2012, 15:19 »
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.
« Last Edit: 08 Dec 2012, 15:22 by Crimson Wizard »

Re: AGS engine iOS port
« Reply #52 on: 29 Dec 2012, 03:33 »
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
« Last Edit: 29 Dec 2012, 03:41 by zaphod_beeblebrox »

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine iOS port
« Reply #53 on: 29 Dec 2012, 08:49 »
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
  1. [misc]
  2. config_enabled = 1
  3. [sound]
  4. enabled = 1
  5. threaded = 0
  6. cache_size = 10
  7. [debug]
  8. show_fps = 0
  9. logging = 0
  10.  
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

Re: AGS engine iOS port
« Reply #54 on: 29 Dec 2012, 19:03 »
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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine iOS port
« Reply #55 on: 29 Dec 2012, 19:07 »
Can you verify that the config file is actually read by setting
Code: INI
  1. [sound]
  2. 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: Adventure Game Studio
  1. /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
« Last Edit: 29 Dec 2012, 20:17 by JJS »
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine iOS port
« Reply #56 on: 29 Dec 2012, 22:04 »
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.

Quote
CrashReporter Key:   1e746dd56093146ba201ba9cfcb78862c9d8ae1 0
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
« Last Edit: 30 Dec 2012, 00:22 by zaphod_beeblebrox »

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine iOS port
« Reply #57 on: 30 Dec 2012, 13:46 »
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

Re: AGS engine iOS port
« Reply #58 on: 31 Dec 2012, 01:14 »
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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine iOS port
« Reply #59 on: 31 Dec 2012, 07:18 »
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
  1. 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.
« Last Edit: 31 Dec 2012, 07:26 by JJS »
Ask me about AGS on PSP, Android and iOS! Source, Daily builds