PocketMatrix forums

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

GapiDraw on TabetPC - Anyone??

I'm developing a game using GapiDraw 2.0.5. The speed seems to be fine on my Standalone PC (desktop PC) that has a good processor and video card. When I try it on my tabletPC, which is really the goal, it seems ok at first.. then it slows down sporadically. I track the stylus as it moves and I notice at times the cursor will lag behind terribly, and it will keep it up for several seconds. Then it goes back to normal, then back to lag again, etc, etc.

My game is a pretty simple puzzle piece game..I have it set at 30 fps and 1024x768 fullscreen. I'm using SYSTEM memory wherever possible for all surface creation, etc (including the GapiDisplay backbuffer).

To make it worse, its INCREDIBLY slow when I use the tabletPC's pen instead of the built-in mousepad.

Is it possible that too much logic is going on between every ProcessNextFrame() call? I repaint the entire background and game elements with each ProcessNextFrame() call.

Again, on my Desktop PC, it works fine..I see no lag at all. But on my Acer C110, with admittedly poor videocard, and slow 1GHz processor, its quite bad. That said, I run other commercial games on the Acer and the speed seems very fast.

Any help is appreciated.
Thanks.
Are you sure that it is best to use system memory instead of storing your surfaces in video memory? If your surface operations are hardware accelerated (see documentation of CGapiSurface) you can gain quite a bit of speed by this.

//Erik
CapesDev: Hi! Um.. 1024x768x30fps.. With 16-bit graphics that means that you have to move 46mb from system memory to the graphics card each second simply by copying the backbuffer to the display..

As ruis says, if you go above anything higher than 640x480 you really need to use video surfaces.. Check the document at http://www.gapidraw.com/doc/205/doc-videohw.htm for details.

//Johan
I developed a kiosk app for a client (SafeCracker) using GapiDraw 2.01 that exhibits the same problem you describe. On the TabletPC, move events really hammer the device, causing occasional stutters in sound playback and stylus response. It is inherent to the device much in the same way dragging the stylus will slow the framerate on some pocket pc devices - the event handler is being flooded by stylus events.
Thanks all for the replies...

My biggest concern: Johan you mentioned moving that much memory (1024x768 30fps) from system memory to the graphics card is going to be overwhelming. I originally tried using video memory for the backbuffer, but it was very, very slow (due likely to the fact the tabletPC video RAM is only 16Mb and the video chipset is poor).

However, I'm a bit disheartened because I have other fullscreen 1024x768 games, such as the full version of Bejeweled that runs super-smooth on my tabletPC with nice animation and music all the while.

I'll see what optimizations I can make to the logic and gfx calls that I perform in each 'process-next-frame' loop. If that doesn't work, I guess I'll drop the frame size down to 640x480. I really want the game to run on 'lowest common denominator' of machines out there today (e.g., 1GHz processor max, minimal video card).

As for the slow-down when using the Pen stylus, I guess thats a fact of the tabletPC functionality and can live with that.

-Jeff
CapesDev: Some optimization tips. If you use alpha blend on any surface, store it in system memory. If you perform alpha blends on the back buffer, try to do it first in system memory if possible and then BltFast the result to the backbuffer. You should also investigate LockVideoSurfaces...