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

Re: AGS engine iOS port
« Reply #20 on: 03 Jun 2012, 22:01 »
I got to test my game with an adjusted version of this on my new ("unjailbroken"!) ipad. So the app is currently for iPhone only - and the "zoom" for iPhone apps on iPads looks really horrible. Will you make this an universal app in order to support a "clean" scaling for iPad resolution?
Also, the curor @ touch position doesn't work in practice for me one bit. You have the "move finger to move cursor" control (see e.g. scummVM or MI iPad version) in the Adroid version - will you do this for this too? Or can it be configured?
ca. 50% completed

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 #21 on: 04 Jun 2012, 21:33 »
I will make it a universal app. Up to now I wasn't sure if this had any benefit, but I guess it has.

The engine supports the same configuration file as the Android port. You have to create a file "ios.cfg" in the Documents/ags/ folder like this:
Code: INI
  1. [misc]
  2. config_enabled = 1
  3. rotation = 0
  4. translation = default
  5. [controls]
  6. mouse_method = 0
  7. [compatibility]
  8. clear_cache_on_room_change = 0
  9. [sound]
  10. enabled = 1
  11. threaded = 1
  12. cache_size = 10
  13. [midi]
  14. enabled = 1
  15. preload_patches = 0
  16. [video]
  17. framedrop = 0
  18. [graphics]
  19. renderer = 0
  20. smoothing = 1
  21. scaling = 1
  22. super_sampling = 0
  23. smooth_sprites = 0
  24. [debug]
  25. show_fps = 0
  26.  

Set "mouse_method = 1" for relative mouse movement.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

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 #22 on: 05 Jun 2012, 19:16 »
The app now has native iPad support. Please let me know if there are issues with it.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Grim

  • *Dreamer Of The Day*
    • Grim worked on a game that was nominated for an AGS Award!
Re: AGS engine iOS port
« Reply #23 on: 16 Jun 2012, 04:14 »
As for what's next? I think I am done platform-wise (unless someone donates me a PS3).

I have a spare PS3! If you can make my game run on that I'll let you have it (and buy you 10 more PS3s!).

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 #24 on: 16 Jun 2012, 15:08 »
Thanks for the offer! Don't mind if I take you up on it. I send you a PM.

It would mean that bigendian platforms will be actively maintained again, so this riddle would get solved. :=
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine iOS port
« Reply #25 on: 25 Jun 2012, 16:46 »
First off, holy shit, this is amazing. I stumbled onto AGS like two weeks ago and I'm continually impressed by the work people are doing with it. Also, holy crapcake, you've done a lot of ports.

I was wondering if anyone had a more detailed tutorial for how to use this little bugger to get any given game onto an iPad. I'm not entirely sure what game files need to be moved over and how (I did test the app and ran the rest gam and it worked wonderfully). I'd like to try and stick Gemini Rue on this thing and, from the specs listed above, it *seems* like it would work. Any help would be awesomepossum. (It's an iPad 1 on 5.01 and it's already jailbroken. I'm assuming I need to change some file permissions but that's about as far as I figured it out).

Thanks! <3

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 #26 on: 26 Jun 2012, 22:31 »
It would mean that bigendian platforms will be actively maintained again, so this riddle would get solved. :=
Just FYI, I made an experiment and simply put Steve McCreas's "big end" read and write functions into use by disabling ALLEGRO_BIG_ENDIAN macro there. They seem to work nicely for Windows version (functions they use are actually std file routines, which are redefined for big-end case only).
I had to write my own implementations for little-endian getshort and putshort, however, but later I found they were already written in wgt2allg unit.
At the moment there are only few places where I cannot just plain "merge" Steve's code into default code, namely in compress.cpp and also in wfnfontrenderer implementation where you (or tobihan?) used psp_get_char function in little-endian version. I mean, it should certainly be possible, but I haven't tried yet.
Also in some cases there was big-end read/write functions prepared for a struct, but for some reason they weren't actually used; GameSetupStructBase struct for instance.

I guess CJ and Steve were couple of steps away from implementing endianess-independent code to the engine, but just did not finish this job.
« Last Edit: 26 Jun 2012, 22:34 by Crimson Wizard »

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 #27 on: 26 Jun 2012, 22:50 »
Legba, the game files go into /var/mobile/Documents/ags/game/

The main game file ("Gemini Rue.exe") has to be renamed to "ac2game.dat". You can take a look at the sample game files to get an idea.

The file permissions for the "ags" and all subfolders must allow writing by a standard user.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine iOS port
« Reply #28 on: 27 Jun 2012, 20:11 »
Figured it all out. Honestly, I should have tested some tinier games first to figure out what I did wrong before bothering you. Super thanks for taking the time to respond anyway. It works brilliantly (and significantly faster than the wine wrap I did to run it on my mac).

For anyone else concerned about how to right-click: It takes a little getting used to but you tap with one finger and then tap a second finger to bring up the menu. The trick is to bring down the first finger on the object which you which to right-click on and then immediately bring and adjoining finger down (i.e., so the second finger quickly falls right next to the the location of the first).

I've run this on 11 different games of varying size and I've had zero flaws. The key (for me, at least) was using iFile to set the permissions properly and make sure to wipe all the old files in the /games directory before putting a new one in.

Ascovel

  • Mittens Serf
  • The eyes of Rooster Cockburn
    • I can help with story design
    •  
    • Ascovel worked on a game that was nominated for an AGS Award!
      Ascovel worked on a game that won an AGS Award!
Re: AGS engine iOS port
« Reply #29 on: 28 Jun 2012, 15:47 »
Are all AGS games resolutions supported and working at decent speed? I wonder how would Snakes of Avalon work.

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 #30 on: 28 Jun 2012, 16:15 »
All game resolutions are supported and they are scaled to the screen size as necessary.

Speed of course goes down with higher resolutions. On my iPod 4g Snakes of Avalon still gets > 35 fps with the OpenGL renderer in the bar. The downside is that the OpenGL renderer does not yet support tinting of sprites and plugins that draw to the screen (like the D3D renderer on Windows).

Also the memory consumption goes up a lot with the resolution so it is possible that a hires game runs out of memory.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Ascovel

  • Mittens Serf
  • The eyes of Rooster Cockburn
    • I can help with story design
    •  
    • Ascovel worked on a game that was nominated for an AGS Award!
      Ascovel worked on a game that won an AGS Award!
Re: AGS engine iOS port
« Reply #31 on: 28 Jun 2012, 20:09 »
Thanks for the info. Shame about the resolutions as I've been meaning to focus on much higher resolutions in the future. Then again, maybe there will be already a new gen of iOS hardware before I'm ready to release.

Re: AGS engine iOS port
« Reply #32 on: 29 Jun 2012, 21:05 »
Interesting. So literally everything works perfectly except for one problem I've run into.

A few games require navigation through keyboard inputs and, unfortunately, sometimes they require keys that aren't present on the iOS onscreen keyboard. Gemini Rue, for example, requires you use the CTRL key during combat and there's no CTRL key on the keyboard. There's actually a point where you have to hit CTRL or else you can't continue in the game, effectively making the game unplayable on iOS.

Trying to see if there's a tweak out there to allow you to remap the keyboard so as to use other keys to send the CTRL command or if there's something I can put into the ios.cfg file referenced above. Anyone have any ideas?

EDIT: I also tried hooking up a bluetooth ipad-specific keyboard that had a CTRL key and still didn't work. The only keys that work on the physical keyboard are ones that exist on the onscreen keyboard as far as I could tell.
« Last Edit: 29 Jun 2012, 21:19 by Legba »

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 #33 on: 29 Jun 2012, 22:24 »
This is a problem the engine would run sooner or later, since it wasn't made with having portability in mind.

Unfortunately my only suggestion is rather for the future versions of the engine - to implement totally virtual controls that could be rebound from game setup, for example.

JanetC

  • Mittens Serf
Re: AGS engine iOS port
« Reply #34 on: 13 Jul 2012, 19:35 »
A few games require navigation through keyboard inputs and, unfortunately, sometimes they require keys that aren't present on the iOS onscreen keyboard. Gemini Rue, for example, requires you use the CTRL key during combat and there's no CTRL key on the keyboard. There's actually a point where you have to hit CTRL or else you can't continue in the game, effectively making the game unplayable on iOS.

Heh, that's why I'm overhauling the Gemini Rue control system right now so that we can port it to iOS. :)

Joseph DiPerla

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: AGS engine iOS port
« Reply #35 on: 14 Jul 2012, 07:28 »
This is a problem the engine would run sooner or later, since it wasn't made with having portability in mind.

Unfortunately my only suggestion is rather for the future versions of the engine - to implement totally virtual controls that could be rebound from game setup, for example.

Much how c++ has a way to check which OS its executing an app from, can AGS do the same? Perhaps a script function that checks which platform its running under, and if its running under a mobile OS, functionality can be customized to work with that platform right from within the game. For older games that did not do this, maybe the engine for ports such as Android and IOS can have a default custom keyboard that implements shift/CTRL/ PG up or dwn, Home, End, F1-F12 keys, etc...?
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

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 #36 on: 14 Jul 2012, 07:41 »
AGS has a script function to check for the underlying platform. But at the moment it returns "Windows" on all mobile platforms because I noticed that games make assumptions based on the reported operating system that don't hold true (e.g. that plugins are not available).

Both Android and iOS ports have a way to invoke the standard system keyboard and to press the function keys and ESC. Adding more buttons is a bit difficult and in the end action scenes like in Gemini Rue will be difficult to play on them anyway. What would be possible is adding customizable buttons that are overlaid over the game and that can be bound to any key. If someone wants to implement that, be my guest.


Edit: Just for reference, this is how the iOS virtual keyboard looks like in AGS:

« Last Edit: 14 Jul 2012, 08:04 by JJS »
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine iOS port
« Reply #37 on: 03 Aug 2012, 15:52 »
Just curious - is the only thing holding this back from working on non-jailbroken devices the cost? Nice work, man.
Space Quest: Vohaul Strikes Back is now available to download!

JanetC

  • Mittens Serf
Re: AGS engine iOS port
« Reply #38 on: 16 Aug 2012, 15:12 »
Just curious - is the only thing holding this back from working on non-jailbroken devices the cost? Nice work, man.

Yep. I've got it working on non-jailbroken devices, it was easy enough. You just need to give Apple $99 to get a developer account!

Re: AGS engine iOS port
« Reply #39 on: 27 Aug 2012, 12:13 »
Can anyone confirm if the recently released 'Resonance' works properly on the Ipad 3 using this AGS port? Thanks!