AGS engine iOS port

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

Previous topic - Next topic

JJS

I just uploaded an initial port of the AGS runtime to iOS (for jailbroken devices only at the moment).

Installation:
Add my repository to Cydia: http://jjs.at/cydia
You can then download the engine, midi patches and a test game (just a default "new game") if you want to see Roger walking around on your iDevice.

You can also get a build of the engine as an IPA file from here: http://jjs.at/daily . This will probably be updated more often than the Cydia repo, but there is no guarantee that every version found there will work.

At the moment only a single game can be played. It has to be placed into "/var/mobile/Documents/ags/game/". The main game file has to be named "ac2game.dat". The game folder must have write permissions for a standard user.

A file "ios.cfg" can be placed into "/var/mobile/Documents/ags/" to configure the engine, e.g. change the mouse control method or switch the renderer. There is no ingame way to change settings yet. The file has the same options as the Android configuration file.


Controls:
- The mouse cursor moves to where you touch down on the screen
- A short tap issues a left click
- A longer press (0.7 - 1.5 s) keeps the left mouse button pressed (for dragging things and verbcoin GUIs)
- A long press (> 1.5 s) opens/closes the onscreen keyboard (includes F1-F12 and ESC)
- Right clicking is performed with a two-finger tap

What does work:
- AGS games with version >= 2.50
- Sound and midi playback (download the patches for that)
- Accelerated theora video playback
- Software and hardware OpenGL rendering
- Snow/Rain, Flashlight and AGSBlend plugins are built into the engine (this is important in case the engine goes into the app store because its policy forbids loading external libraries)


What does not work:
- There is no way to press the ESC or F1-F12 keys -> now included in the onscreen keyboard
- Only one game can be played
- No ingame menu or settings


The source code is as always on gitorious: https://github.com/adventuregamestudio
It contains an Xcode 3.2.6 project. The custom build step is for fake-signing the package so that it can be debugged through the IDE. You have to change that to accomodate your setup.


I have only tested on the simulator and on an iPod touch 4g with a jailbroken iOS 4.3.3. Performance on that is about as good as on my Android HTC Desire (maybe a little faster).
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

AJA

Wow, great work! Worked really nicely on my iPod Touch 2g, iOS 4.2.1. I tried out a couple of my games:

- How Many: FadeOuts didn't seem to go all the way to black. Pixel hunting was a bitch. Performance was very good.

- By the Numbers: Crashed once at the very beginning when I turned the screen to horizontal mode. Everything is out of sync since the framerate is only 20 fps. Talking heads run at about 15 fps, making what little there is of the game totally not fun to play. Raw drawing stuff seems to be working correctly, though. File access and 8bit colours, too.

- Barrier: 640x400 @32bit and with some big damn objects, runs even slower, at about 13-15 fps. A big full screen iris in/out animation dropped the framerate to about 6 fps. Other than that it worked great all the way through.


Very very awesome, JJS!

Igor Hardy

Wow, that's awesome. I don't have an Android device to test my games on, but running them on my iPhone would be amazing.

Joseph DiPerla

Wow. I do not own an iPhone, but I am still psyched that you got a port over to it though. AMAZING. OK honestly, what else are you going to try to port AGS to next JJS? You seem to be incredible at this. I would suggest a Dingoo A320. But thats just me. :)
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

uswin

omg omg omg omg, this is sick, JJS, you are GOD  :-D :grin:

AGS community surely does have a good future starting from this.

Please consider a donate button on the project man or maybe a kick-starter campaign perhaps, no push though, its up to you.

Brilliant jobs jjs.

JJS

Thanks guys!  :-*

Unfortunately the hardware of the iPhones < 3GS and iPod < 4g (or < 16 GB 3g) is pretty low spec, comparable to first generation Android devices I'd say. So performance is not that great.

Porting to a new platform actually gets easier every time. The starting point was already good with the Linux port in the original engine, then a lot of drawing issues got tackled on the PSP. All touch related issues basically are solved through the Android version. Therefore iOS was probably the easiest port to date. As for what's next? I think I am done platform-wise (unless someone donates me a PS3).
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

QuestingHero

Just tried out Quest for Glory 2 ASG remake on my iPad2, and it ran great. been playing Qfg2 on my HTC Evo 3D and now I have options. Thank you so much JJS for all your hard work.

Dave Gilbert

Well holy crap!

This is something that Janet and I were going to tackle after we released Resonance next month, but it looks like you beat us to it! We'll definitely be picking your brain about this.

subspark

I knew you'd deliver the goods here my friend. Nice going. You are pioneer of multiplatformobility here!

Kudos and congratulations.  :wink:

JJS

Update time!

- Added F1-12 and ESC key to the keyboard
- Loading indicator now stays centered when turning the device
- Mouse works correctly with the hardware renderer


Known issues:
- There is a race condition when turning the phone which can cause the screen to freeze
- Going to the desktop can cause the game to terminate (also a race condition)

Plans:
- Move the game screen upwards when bringing up the keyboard in portrait mode so that it is fully visible
- Menu for choosing games (if I can figure out how to change views :-\)
- Settings, either rolling my own or integrated into the system settings


The update should show up in Cydia.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

JJS

Another update...

The game screen now moves out of the way when the keyboard is shown in portrait orientation.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Joseph DiPerla

I do not own anything with IOS, but you rock regardless!
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

cianty

#12
Most interesting! However, I'm not keen on jailbreaking my iPad... any hopes in being able to create normal .ipa/.app(or whatever) soon?
ca. 70% completed

Creator

#13
This is brilliant. My games run perfectly on my iPhone 3GS running 5.1.
Pity I can't use it on my iPad 3 until the jailbreak is released.

Edit - Ah, slight problem when downloading the Midi patches. My phone keeps saying "Hash Sum mismatch" when it gets to "Done: AGS Midi patches". I don't know if this is a problem with the download or the file and if you can fix it or not.

Edit 2 - Thought I'd edit this post to say that it works perfectly on my iPad 3 running iOS 5.1.1. It runs like a regular iPhone app, running in a small screen, but allowing me to upscale it by pressing the 2x button.

JJS

Download of the test game and midi patches should work again.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Creator

Yep, that fixed it. Thanks JJS.  :-D

Joseph DiPerla

JJS, I know you said you wouldn't work on any more ports, and I am sure you have some more work to do with the IOS port, but I do have a request. Its for my brother and a few others actually. Its for a WebOS port. And I know how they feel because I used to have a Palm Pre and it was awesome. I let it go because I hate what HP is doing to it (Dropping it). But it will be licensable to other companies, so it will rise again, I am sure. It is actually my favorite mobile OS right next to Android Ice Cream Sandwhich. Anyway, I want to request a port to WebOS if its possible.

From what I hear, programming for WebOS is similar to Android (Haven't really tried it). A few sites to check out are www.precentral.net
https://developer.palm.com/content/resources/develop/cross_platform_development_part_2.html
http://www.webosnation.com/openmobile-working-hp-make-android-apps-webos-reality
http://forums.webosnation.com/webos-development/314546-our-experience-porting-android-enyojs-phonegap.html

Apparently, they have a very simple solution for porting Android Apps to IOS and WebOS (So I hear). Plus, WebOS has a windows emulator that one can use to test the apps out as well as a RAD IDE on the web(Browser based) that one can use to design GUI's. So, its a possibility to port. You think you would be able to check it out after you are done with the IOS port? My brother would be very grateful since he owns an HP Touchpad. :)
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

Joseph DiPerla

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

Joseph DiPerla

OK last link. (BTW, I hope I am not breaking rules by posting in a new post rather than editing the prior ones. I just feel that then this thread would not be recognized as being updated).

This link is a tutorial that shows you how to convert an Iphone app to a webos app in ten minutes using phone gap. I am not sure if this would work with the way you have the iphone port set up or not. But thought I would post it anyway:

http://www.youtube.com/v/wWoJfQw79XI?autoplay=1
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

trothmaster

So awesome!   Do you think apple would ever approve this in the app store?
Bik - Eat some sandwiches and save the galaxy!
www.bikgame.com

SMF spam blocked by CleanTalk