PocketMatrix forums

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

GD for Palm

First of all, I'd like to let everyone know that if you've been using GD for your PPC games, it won't be that hard (at least) to port it to Palm using the GD version. :) Great work GD team!

However, we ported our game Traffic Jam to Palm using the original 240x320 lay-out and graphics (as you can see from the pic below), and somehow, the height did not reach the entire screen when its supposed to be. You can notice the black border below the main traffic jam screen w/c indicates that the screen size is still larger than the 320-pixel height of the game? Did we forget something that's why its not full screen? Johan, you're also using a T3 right? Hope you can help us on this.

- Erick
Attachments:
palm_port.jpg
I don't believe the closed resolution is 320 x 320.

"while the case is closed the visible screen includes a 320 x 320 pixel program area plus an ever-present task bar."
http://www.infosyncworld.com/reviews/n/4129,2.html

Sounds like that's the area that would normally have that blue task bar.
Marc: That's it. We removed the "always present" blue task bar. :)

Erick: Great work by the way with Traffic Jam!! :D
Ok I get it. Is there a way we can use that blue bar space for our games? Also, what if we want to display the bluebar, is there a flag we have to set w/in GD? Displaying just a black border below the game screen is rather annoying. :)

You should try Warfare Inc.'s Palm version and you'll see that they were able to do maximize the bluebar space. PDAMill's games didn't use that part too but I reckon there must be a way? :)

- Erick
Um. Are you sure you cannot use it? What's the size of the display if you call GetHeight() ? Check the sample apps, they use the full screen...
Yes the space is actually there, it's just a pain to use the extra space in a real game. You have to fill that space with *something* that looks good, and only on some screens.

Probably the best solution is to ensure that all your game screens can be extended the extra pixels, and do so accordingly. Alternativley, it seems not uncommon to just ignore the extra space.
We added a fix to this in GapiDraw 3.01 RC1. Set the flag bHandleScreenSizeChanged to FALSE in gdappconfig and the display size will always be 320x320 (FALSE is now the default mode in RC1)...
Johan wrote:We added a fix to this in GapiDraw 3.01 RC1. Set the flag bHandleScreenSizeChanged to FALSE in gdappconfig and the display size will always be 320x320 (FALSE is now the default mode in RC1)...


I find that whichever way the flag is set, the backbuffer is blanked to black when the slider is changed. Shoul d that still happen?

This means, since I only draw dirty rectangles, that I must dirty the screen when the screen size changes? Is that required even when we don't want the screen size to change?
I find that whichever way the flag is set, the backbuffer is blanked to black when the slider is changed. Should that still happen?


Yes, depending on the current rotation the backbuffer in some cases must be reset (if you rotate the display 90 degrees the pitch value would change). But this should be no show stopper - simply override OnDisplaySizeChanged and redraw the entire backbuffer.

Is that required even when we don't want the screen size to change?


Um. If you do not want the screen size to change nothing should happen to your backbuffer if the display is resized, since the application simply will not receive the event.
Johan wrote:Um. If you do not want the screen size to change nothing should happen to your backbuffer if the display is resized, since the application simply will not receive the event.


Unfortunately, when we did some tests, whenever we pull the T3's slider and stretch the screen, the game becomes blank and you will need to tap anywhere on the screen to refresh it. Anyway, we'll have to do some more tests and let you know.
It seems the backbuffer blanks to black when the T3 slider is changed, whether we have set or cleared the flag to handle screen size changes.
Thats strange, it does not do that when I try on our T3. I modified the minimal example so that ProcessNextFrame only draw stuff to the backbuffer once. It worked just as expected, it did not clear the backbuffer if the flag to handle screensizechange was set to FALSE.
We'll take another look at it. I don't actually have a T3 so there is a turnaround time for me to test it.
Johan: Is there a way we can just show the blue toolbar below the T3's screen while a GD game is running? And is there a way we can let the users use the "home button" to quit the game? Are there any events we can use to trap this? Because most Palm users still prefer the "traditional" way of quitting Palm apps and games.

I hope you can shed some light on this issue. Thanks in advance.

- Erick
On some 480x320 devices, we aren't getting the entire 480 width. For example, on Clie UX50, the status bar is present and takes up some room. (See the attached image.)

On Clie NX80, the status bar does the same thing. The virtual graffiti area can also take up more room.

Should GapiDraw for Palm be disabling these on-screen controls, like it does for the Tungsten T3 status bar? If not, can it be an option?
Attachments:
25756.jpg
Additionally, on some Palm devices GapiDraw seems to override system settings for orientation, and on others it seems to respect it.

(Although maybe those devices/programs are manually rotating the screen in some sort of virtual display; I don't have full details yet. If this is the case, can GapiDraw detect it and somehow override it?)

So at this point it looks like GapiDraw overrides some status bars (e.g. T3) but not others (e.g. UX50), and obeys some system orientations (e.g. T3) but not others (e.g. T3 with ZLauncher).

This makes it fairly complex for the application to handle. Is there any way we can get more consistency out of GapiDraw?

Actually, the most preferable behaviour is for GapiDraw to obey any system preferences for display orientation when it starts. Is this possible?
Hi,

I'll try to answer the last three posts simultaneously.. :)

Is there a way we can just show the blue toolbar below the T3's screen while a GD game is running? And is there a way we can let the users use the "home button" to quit the game? Are there any events we can use to trap this?


All the code GapiDraw uses to hide the blue toolbar is in GapiApplication.cpp. You can modify that to your liking (if you want to show the toolbar etc).

On some 480x320 devices, we aren't getting the entire 480 width. For example, on Clie UX50, the status bar is present and takes up some room. (See the attached image.) On Clie NX80, the status bar does the same thing. The virtual graffiti area can also take up more room. Should GapiDraw for Palm be disabling these on-screen controls, like it does for the Tungsten T3 status bar? If not, can it be an option?


Unfortunately we don't have access to any Sony Clie Palms.. But since all the code is available in GapiApplication it shouldn't be that hard to implement support for disabling it, given you have access to the Clie SDK (which I assume is necessary).

So at this point it looks like GapiDraw overrides some status bars (e.g. T3) but not others (e.g. UX50), and obeys some system orientations (e.g. T3) but not others (e.g. T3 with ZLauncher). This makes it fairly complex for the application to handle. Is there any way we can get more consistency out of GapiDraw? Actually, the most preferable behaviour is for GapiDraw to obey any system preferences for display orientation when it starts. Is this possible?


Unfortunately since every Palm licensee have to add custom code to support e.g. a status bar code has to be added that supports all licensee operating variations. In fact, not even Palm OS 6 is compatible with Palm OS5 when it comes to the status bar (they changed the entire event model for the status bar in OS6). And it is not backwards compatible (at least not in the Palm OS6 simulator).

I talked to Mikael and it appears that the orientation issue (where GapiDraw supports the correct rotation on the T3 but not T3 + ZLauncher) was due to performance reasons. For example, if the Tungsten display is rotated 90 degrees (using the status bar), the display is running in some sort of emulated mode which had a significant impact on performance. So we therefore reset the display rotation to portrait on the T3 to avoid this performance issue.

Palm development is quite the mess, to say the least...
I'm confused about how OnScreenSizeChanged works.

If the screen is not square (e.g. 320x480), and the display mode changes (rotating the screen), is this function called?

And is width then the height, or does it remain the width? (It seems to me the width doesn't change when it should.)
Where can I find out exactly what image formats are supported on Palm? (The Palm Readme doesn't seem to say.)

I'm trying to make a font using a 16 color BMP, it works, but it looks wrong. Is this supported?

Will the documentation be more complete by next release? It's still sketchy in important areas.
I'm confused about how OnScreenSizeChanged works.


Hi Marc,

OnScreenSizeChanged is only called when the PHYSICAL screen size is changed, such as when the display is resized on the T2 and the T3. Not when you rotate the display. The reason is that you probably do not have to recreate all your surfaces if the display size is changed.

Where can I find out exactly what image formats are supported on Palm? (The Palm Readme doesn't seem to say.) I'm trying to make a font using a 16 color BMP, it works, but it looks wrong. Is this supported?


16-color BMPs are quite non-standard and I would avoid them whenever possible. In fact, the BMP format does not mention 16-bits at all. GapiDraw supports 1, 2, 4, 8, and 24-bit BMPs.

We are working on improving the documentation right now.. :)
Johan,

Is there anyway we can activate the functionalities of the T3's (and Zodiac) toolbar while the GD game is running? It's a matter of preference for Palm OS users because they wanted to "traditionally" quit the game by using the built-in Palm's home button instead of the "Exit" button w/in the game.

Thanks.

Erick
Johan wrote:
I'm confused about how OnScreenSizeChanged works.


Hi Marc,

OnScreenSizeChanged is only called when the PHYSICAL screen size is changed, such as when the display is resized on the T2 and the T3. Not when you rotate the display. The reason is that you probably do not have to recreate all your surfaces if the display size is changed.


OK.

True I don't have to create surfaces, but we're talking about OnScreenSizeChanged, not CreateXXXMemSurfaces.

From the application's perspective, if you rotate from 320x480 to 480x320, I can assure you that the screen size has indeed changed.

Right now in this case I have to manually call OnScreenSizeChanged and pass it the correct parameters.

Johan wrote:
Where can I find out exactly what image formats are supported on Palm? (The Palm Readme doesn't seem to say.) I'm trying to make a font using a 16 color BMP, it works, but it looks wrong. Is this supported?


16-color BMPs are quite non-standard and I would avoid them whenever possible. In fact, the BMP format does not mention 16-bits at all. GapiDraw supports 1, 2, 4, 8, and 24-bit BMPs.

We are working on improving the documentation right now.. :)


OK good.

I still don't understand. Last time I checked, 4 bits is 16 colours. Does this mean 16 colour BMP fonts should work? I don't get an error, but they seem to look wrong to me, like they aren't blitted correctly or something. I can make out the text, but barely.
1 bit BMP = black / white
2, 4, 8 bit BMP = color palette indexed
24-bit BMP = RGB

Is there anyway we can activate the functionalities of the T3's (and Zodiac) toolbar while the GD game is running?

I know Mikael looked into this, and there were some issues involved with it. But since all the code is in GapiApplication you could try messing around with it yourself. I don't think to remember that WarFare kept the blue toolbar visible, but I could be wrong...

Right now in this case I have to manually call OnScreenSizeChanged and pass it the correct parameters.

We'll look over the OnScreenSizeChanged to see if we could make the use of it more streamlined in the next release. :) I promise...
I have another strange Palm question.

In all my GapiDraw Palm applications, when a reset dialog appears (e.g. from a call to ErrDisplay), it says reset but doesn't draw the button outline. I can't click the onscreen reset button, instead I have to use the hidden reset button on the back of the device.

This is quite annoying, and I'm also worried about eventually wearing out that button. Is it just me, or can anyone else confirm this? What is the cause?