PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Question about SmartPhone

This is either a really stupid question or ... well, ok, I expect it's a really stupid question no matter what, but here goes anyway...

If I write a game for PocketPC, and I then compile it for SmartPhone, will it run as-is in terms of graphics? What I mean is, I don't know much about SmartPhones, but I think I know that the screen doesn't have a 240x320 resolution... So, will GD, or the GAPI implemenation for the device itself maybe, automatically resize my images to fit the screen, or would I have to have separate resources for the SmartPhone build and use the preprocessor to compile in the correct ones (or have them all externalized in the file system, then it's just a simple file swap)?

I've been trying to get the SmartPhone emulator to run so I could find out for myself, but it hasn't been working. I figured why not come ask this question before I put any more work into it because I'm suspecting my game isn't going to run unchanged anyway. Am I right?

As soon as you stop calling me an idiot to yourself, stop laughing and reply! :)
Pejo Software - Per · 30 Mar 2004, 17:17 UTC
:lol: :lol: :lol:
OK now I can stop!
You are right! You need to resize your graphics.
Argh... Hey Johan, I'll give you one guess what I wanted added to the 3.x wish-list ;)

Seriously though, ignoring the obvious performance implications, how hard would it be to set a percentage for downsizing (or upsizing) and have GD automatically resize all graphics accordingly?

DX does it for you on the desktop nicely, having that functionality in GD would make life even better.

Ah well, as for me, I'm not going to go off and tell my artist he has to do smaller versions of everything, especially since some of them are rather tiny now. My game's not going to make it to SmartPhone. D'oh!
I think it's best to resize everything before you send it to the smartphone.. You'll get a smaller game that way as well.

You can try to set the window size to 176x220 on your stationary PC (displaymode config) to see how your game would look on a smartphone. :)
Yes, true enough, and I didn't think of that. Good way to know what it would look like. And it even lets me calculate the percentage to downsize everything by.

The problem is that all my coordinates are still based on a 240x320 screen, and going through to deal with all that could be an absolute and utter nightmare.

No, I think I'm only going to be supporting devices with a QVGA display, with this game anyway.

Does that mean no Palm and Symbian as well, or do those devices have QVGA displays?
When it comes to Symbian the displays are 208x320 for UIQ devices (Sony Ericsson, Motorola) and 176x208 for Series 60 devices (Nokia and most others).
Well, there goes that idea too then :)

Eh, I guess I can look on the bright side... Less support issues :)
What about Palm by the way? GD needs Palm OS 5.0 or higher I think, right? What is the typical resolution of devices using that OS? Would I be safe in assuming it's at least QVGA?

If so, a Palm port is still at least a possibility for me.

(None of this is an especially big deal frankly because when I started K&G; Arcade, Palm, SmartPhone, Symbian and everything else wasn't even on my mind as possibilities, so I'm just looking at porting it retroactively).
All Palm OS5 devices I'm aware of run at least 320x320 pixel displays. You could support these devices simply by placing your screen to the left or to the top of the display.. :) Then you would have no issues with coordinate mappings etc...
Yep, that's exactly what I was thinking... I'd probably want to center it of course, 40 pixels of black on either side, and that's a lot less daunting because I could blit to a tempoirary surface in place of backbuffer and then just blit that where it should be. I know there's already a performance hit moving to Palm, so maybe that's not freally an option, I'd have to see.

Even putting it in the upper left-hand corner as you suggest, I'd still have to add some clipper settings because parts of my game rely on the default clipper clipping blts to a 240x320 screen, and I'd get overlap on a Palm with this approach. But that's not a big deal either.

In any case, it sounds like Palm is still an option for me, which is great news. I'm not going to touch that until the game is out for a few weeks though, give myself a much-needed break, aside from whatever support issues come up. Is there a FAQ anywhere dealing with what kinds of porting issues PPC-to-Palm work might face? I know it's been discussed around here before, but anything solid to look at? If not, is that planned by anyone?
Is there a FAQ anywhere dealing with what kinds of porting issues PPC-to-Palm work might face?


We are working on this as well.. :)
another thing you might want to bear in mind is that the upcoming QVGA MS Smartphones are probably the same physical size + aspect ratio as the current 176x220 (I believe)

which would mean that graphics designed for 320x240 would be slightly stretched

( either that or the new QVGA is going to stretch the older apps the other way )
I'm currently in the process of porting my latest game squish2004 to smartphone, and I can say it's a real pain. YES, you have to resize everything, unless you scale it and lose speed etc. The acpect ratio is not the same either... it's a real pain in the butt, it's 4 pixels out in the horz. So I've had to crop two vertical rasters on each side of my output. :-( (not that you can really tell).

There was no other way since my 16x16 tiles ended up being 12 x 11.6 or somthing stupid in same aspect ratio, looks better than going smaller and having 2 black bars down the side. I suspect a lot of games built on the 16x16 std are going to have issues. I resized to 12x11 (gives 180px (15x12px) on the horz. but its only 4px over. Leaving blank real estate on an allready small screen is not a good idea!