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 »

I've got a full-blown port working.

Instead of using the SDL backend, I've written an iPhone backend which uses CoreSurface for rendering. The CoreSurface buffer is then attached to a LayerKit layer, so I've got scaling, aspect ratio correction, and automatic rotation between portait and landscape rendering when you rotate the phone (ie hold it sideways).

I've also got the mouse working, and am currently working on keyboard support.

I'll post a video this evening, and will post my code hopefully by the weekend.
User avatar
aubin
Posts: 14
Joined: Sun Mar 12, 2006 6:46 am
Contact:

Post by aubin »

ruudboy wrote:I've got a full-blown port working.

Instead of using the SDL backend, I've written an iPhone backend which uses CoreSurface for rendering. The CoreSurface buffer is then attached to a LayerKit layer, so I've got scaling, aspect ratio correction, and automatic rotation between portait and landscape rendering when you rotate the phone (ie hold it sideways).

I've also got the mouse working, and am currently working on keyboard support.
Whoa! Nice work! That's better than I could have hoped for with the SDL layer.
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

ruudboy wrote:I've got a full-blown port working.
Nice! Looking forward to seeing it :).
ruudboy wrote:Instead of using the SDL backend, I've written an iPhone backend which uses CoreSurface for rendering. The CoreSurface buffer is then attached to a LayerKit layer
That's basically what the iPhone SDL port does :P. But yeah I had reached the conclusion to use the same approach, even if it did mean including some Objective C code.
ruudboy
Posts: 6
Joined: Tue Oct 23, 2007 5:42 pm
Location: London, UK
Contact:

Post by ruudboy »

User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

Dude. That's seriously slick. Nice work :) Looking forward to a release!

Future iPhone-specific ideas:
* An under-the-finger magnifier, much like what you get when moving your cursor in a text area in any other iPhone program. Since many games involve tapping a very small group of pixels, being able to put your finger on screen, see a closeup of what's under it, move to the specific area, and release would be extremely beneficial. This could be turned on and off.
* Game suspension. If a phone call comes in or you have to hit the home button to check something quickly, it would be great if the game would suspend to pick up where it was left off next time you select the icon. Being forced to go into an interface to save first would be a deal-breaker for many.
* Control Buttons. The iPhone will need a way to access save/restore menus. Taking a page from NES.app, these buttons could appear while the iPhone is in the vertical position since there's room there, and disappear when the phone is horizontal and the game takes up the whole screen.

Just some ideas for the future -- looking great so far!
User avatar
DrMcCoy
ScummVM Developer
Posts: 595
Joined: Sat Dec 17, 2005 1:33 pm
Location: Braunschweig, Germany
Contact:

Post by DrMcCoy »

TomFrost wrote:Since many games involve tapping a very small group of pixels, being able to put your finger on screen, see a closeup of what's under it, move to the specific area, and release would be extremely beneficial.
How about using one of these fake pen thingies? (However they're called)

But another point: A way to move the cursor without clicking would be nice (and actually essential for the Gob games).
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

DrMcCoy wrote:(However they're called)
Stylus.
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

Unfortunately, a stylus wouldn't actually work. Not unless you carved one out of a hot dog. The iPhone screen doesn't detect pressure or heat or any of that, it detects electrical conductivity much like a touch-lamp. Whatever you're using on the screen has to be organic/hold an electrical charge, much like your body. Or a hot dog.

If anyone goes into business making hot dog styluses, I want in :D

I agree, though -- making a way to move without clicking would be fantastic. It's essential in a lot of games to hover over an object to see what it is. Perhaps moving your finger a certain distance from where you first put it on screen before releasing would allow you to release without sending a click? That would work, but it's hard to predict how cumbersome that might feel. Having a second finger touching the screen to denote a mouse move without a click may work too.
Last edited by TomFrost on Tue Oct 23, 2007 9:52 pm, edited 1 time in total.
ruudboy
Posts: 6
Joined: Tue Oct 23, 2007 5:42 pm
Location: London, UK
Contact:

Post by ruudboy »

Sadly a stylus won't work with the iphone. The touch sensor is capacitance -based, which means it only senses when you touch it with your finger.

The magnifier is a great idea, though. Should be possible to draw something similar to the loupe used for repositioning the cursor in text fields.

I'll definitely be working on saving & restoring the state of your current game. It's pretty boring to wait through the intro sequence every time you want to play. :-)

Control buttons are a valid request too. I do indeed plan to present a toolbar. Possibly if you tap in a specific corner of the screen, or as you suggest, only make the toolbar visible when the screen is vertical (as we have vertical screen space to spare then anyway.)

Thanks for the kind feedback :-)

--
Ruudboy
Tobot
Posts: 3
Joined: Tue Oct 23, 2007 10:08 pm

Post by Tobot »

Great work guys! I've been watching this forum for a couple of months now waiting for an iphone port. If you need any help with graphics such as icons, buttons and whatnot. Please let me know. :D
Tobot
Posts: 3
Joined: Tue Oct 23, 2007 10:08 pm

Post by Tobot »

Another magnify idea:
Doubletap to zoom in and out. Move the game area with one finger. Kind of like in Safari?
ruudboy
Posts: 6
Joined: Tue Oct 23, 2007 5:42 pm
Location: London, UK
Contact:

Post by ruudboy »

Handling a double-tap is easy-peesy.

The problem is how to disambiguate that from an actual message that should be sent to ScummVM, as two clicks for example.
User avatar
aubin
Posts: 14
Joined: Sun Mar 12, 2006 6:46 am
Contact:

Post by aubin »

ruudboy wrote:Video:

http://www.youtube.com/watch?v=lbsc4JWT3qU

--
Ruudboy
Very impressive work.
User avatar
sev
ScummVM Lead
Posts: 2299
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

ruudboy wrote:I'll definitely be working on saving & restoring the state of your current game.
Every engine already has that implemented. What you will need is:
  • Make engines provide save/load hooks to backend
  • Implement possibility to load savegame from the launcher
But those 2 options require more discussion, and you are certainly welcome to join ScummVM Team in order to make your port official and discuss all implementation details on scummvm-devel.


Eugene
User avatar
PsYcO
Got 2 warnings
Posts: 511
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

nice, very nice indeed. however it looks like your struggling with the whole touch screen thing, probably more of a hardware problem, but very nice indeed.
Post Reply