iPod Touch/iPhone Port?

Subforum for discussion and help with ScummVM's iPhone port

Moderator: ScummVM Team

Post Reply
ruudboy
Posts: 6
Joined: Tue Oct 23, 2007 5:42 pm
Location: London, UK
Contact:

Post by ruudboy »

Psyco: I was struggling more because I was trying to balance my video camera on my shoulder whilst taking the video :-) It's decidedly easier to play when you've not got a video camera on your shoulder.

Sadly, I do admit that using your finger to press buttons is sometimes prone to error. It might be worth investigating adding a virtual mouse, a bit like the Keyboard-Mouse support in the SDL backend. Perhaps a virtual mouse that could be turned off/on, so if you had a fiddly bit to do in a game, you could use the virtual mouse to do it, then turn it off afterwards.

Got audio running now too. It even manages to run Full Throttle.

sev- Yes, I'd love to join the development team and contribute my changes. I'll need to sync up to the latest SVN code and get it running again there and then I'll post my patches.

Regarding load & save, I realise ScummVM handles that already. I was more talking about hooking up the application suspend & resume messages to tell ScummVM to save & load your game.

I don't know much about adding save game loading to the launcher. Haven't looked at that yet.

I'm debating whether it would be worth adding a native Cocoa-based launcher to the iPhone version. Anything thoughts? Would that be frowned upon? It looks like the Windows CE version does it.
User avatar
PsYcO
Got 2 warnings
Posts: 511
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

excellent, can't wait for the release candidate(hopefully ill be able to get my hands on one shortly there after)

so what game requires the most processing power, out of the current library of games? would rock if you could get that working.

how would the virtual mouse be useful though(maybe more for tracking?)? and how would one go about turning it on and off, i assume there would/will be a side bar of some kind. containing multiple functions? keyboard, mouse, options and/or save functionality.

any eta on when a beta will be available?
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

@ruudboy: Excellent work! :) I suggest you come to the #scummvm channel in IRC :)

I'm not sure what will be the benefits of creating a native Cocoa-based launcher... What do you think are the advantages of creating such a launcher? I believe the Windows CE version uses the "default" launcher (with low res graphics, of course), but I could be wrong
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3525
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

ruudboy wrote: Regarding load & save, I realise ScummVM handles that already. I was more talking about hooking up the application suspend & resume messages to tell ScummVM to save & load your game.
Hmm... That may be tricky. Game engines don't always allow saving at arbitrary points during gameplay. It's possible that a "forced" savegame like that won't work properly.

I don't know for sure, though.
User avatar
DrMcCoy
ScummVM Developer
Posts: 595
Joined: Sat Dec 17, 2005 1:33 pm
Location: Braunschweig, Germany
Contact:

Post by DrMcCoy »

At least in Gob games, there are places where the game doesn't allow saving and doing so anyway will corrupt the save (i.e. the game will be unplayable after loading such a save).
User avatar
aubin
Posts: 14
Joined: Sun Mar 12, 2006 6:46 am
Contact:

Post by aubin »

eriktorbjorn wrote: Hmm... That may be tricky. Game engines don't always allow saving at arbitrary points during gameplay. It's possible that a "forced" savegame like that won't work properly.
Rather than saving, is it possible to suspend the game engine and resume it? I could have sworn that such a thing was possible in the DS port.

I suppose the most brute force way to do this would be to dump the memory onto the disc and check for the "memory dump" when the user clicks on the ScummVM application on the phone.

That said, it's very likely that the iPhone already has a method of doing so, seeing as many of the other applications seem to retain state though I haven't seen it in any third-party stuff yet.
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

aubin wrote:I suppose the most brute force way to do this would be to dump the memory onto the disc and check for the "memory dump" when the user clicks on the ScummVM application on the phone.
This is a method commonly employed in console emulators -- brute, but very fast and effective. Even if this weren't necessary to making a quicksave when a call comes in, it'd still be a darn nice feature ;-)
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

TomFrost wrote:
aubin wrote:I suppose the most brute force way to do this would be to dump the memory onto the disc and check for the "memory dump" when the user clicks on the ScummVM application on the phone.
This is a method commonly employed in console emulators -- brute, but very fast and effective. Even if this weren't necessary to making a quicksave when a call comes in, it'd still be a darn nice feature ;-)
That would be... tricky :). Emulators can do it since the games basically run in a virtual machine with its own seperate memory space. In ScummVM everything is native, all you could do is do a full memory dump of the whole application and somehow restore that afterwards. Which won't work :P

Letting the engines provide hooks for saving and loading save state is all you can do. And since as mentioned already they may not always be in a state where a save is possible (Kyra also has this problem, I believe), there won't be any guarantee that you'd end up with a save (the engines have to be able to veto the operation, so to speak). But, even with those caveats I think it'd still be a nice feature, and probably handy for other ports as well (Symbian and Windows CE especially, where phonecalls can interrupt things).



But for the port: Looks like this is progressing very nicely (and is saving me some work :P ). Looking forward to getting it into the repository, and I'd be glad to help with anything that's needed (since I already have the toolchain etc set up).
User avatar
aubin
Posts: 14
Joined: Sun Mar 12, 2006 6:46 am
Contact:

Post by aubin »

Vinterstum wrote: That would be... tricky :). Emulators can do it since the games basically run in a virtual machine with its own seperate memory space. In ScummVM everything is native, all you could do is do a full memory dump of the whole application and somehow restore that afterwards. Which won't work :P
Ouch, I didn't realize that. The real question is to whether it is possible to do this with the UIKit functions. There is UISuspendInfo.h which may be the Apple-supplied stuff to accomplish this.

setRestoreOnResume() sounds like it might help but I can't claim to have ever used it.
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

aubin wrote: The real question is to whether it is possible to do this with the UIKit functions. There is UISuspendInfo.h which may be the Apple-supplied stuff to accomplish this.

setRestoreOnResume() sounds like it might help but I can't claim to have ever used it.
Yeah I'd expect some events that will get sent when the application should pause/resume itself to handle phonecalls, etc.

Which may also be something not all our engines can handle (pausing in general) but worth looking into. Just switching off screen updates may be enough.
User avatar
sev
ScummVM Lead
Posts: 2277
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

ruudboy wrote:Regarding load & save, I realise ScummVM handles that already. I was more talking about hooking up the application suspend & resume messages to tell ScummVM to save & load your game.
Yes, I had that in mind too, just engines have to tell your backend which functions are for save and load so you could call them.
ruudboy wrote:I'm debating whether it would be worth adding a native Cocoa-based launcher to the iPhone version. Anything thoughts? Would that be frowned upon? It looks like the Windows CE version does it.
I don't recommend this. Better write a theme for our GUI. It's fully customizable, just there happened no more efforts besides simple color changing to add some other look and feels.


Eugene
bramvandijk
Posts: 25
Joined: Tue May 30, 2006 9:41 pm

Post by bramvandijk »

If the whole saving and loading gives problems, why not tell a game to pause? I'm not sure whether each engine has a pause option, but it should be valid:

Get a call
->pause game
after the call
->unpause game
User avatar
aubin
Posts: 14
Joined: Sun Mar 12, 2006 6:46 am
Contact:

Post by aubin »

bramvandijk wrote:If the whole saving and loading gives problems, why not tell a game to pause? I'm not sure whether each engine has a pause option, but it should be valid:

Get a call
->pause game
after the call
->unpause game
The problem is that I don't think the iPhone backgrounds the application when you click the home button, it seems to close the process outright so any maintenance of state has to be done in software.

As far as I can tell (by watching the processes) other than a few programs (Mail, iPod) most programs do not run simultaneously.

Pausing is probably a good idea, but only if there is a way to suspend and resume the program where it is, as opposed to restarting it.
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

Looking at the code for Apollo IM, Chat, IRCm, or Colloquy (iPhone edition) may help. They all seem to have found a way to continue processing while not active.
lowjob
Posts: 3
Joined: Wed Sep 05, 2007 10:54 am
Location: Queensland, Australia

Post by lowjob »

The Pedometer program is a perfect example of this. Once started, you can press the Home button and it continues counting steps in the background. You can also run any other program and when you go back into the Pedometer, its still counting your steps.

Great work by the way guys!
Post Reply