This site is no longer active and is available for archival purposes only. Registration and login is disabled.

PocketFrog vs GapiDraw


Postby fast_rx » Jan 31, 2004 @ 5:12pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Presto » Feb 1, 2004 @ 7:41am

There are probably hundreds of reasons why you'd want an intermediate surface, but I'll name a couple:

I've used it heavily for keeping track of fog-of-war. Each side has its own surface created the same size as the real battlefield. A black pixel on that surface means they haven't seen that pixel on the real battlefield, grey means they have, but can't anymore, and white means they can see that pixel right now. Using PF's shader, I can just blit that image on top of the composite image of the battlefield with all of the units on it, and the fog-of-war is complete. It's quite fast, but not fast enough that it could be run each frame.

I use intermediate images in Dr. Pocket as well. First, I load up the possible backgrounds, which are also used randomly as backgrounds for the menu screens. But for the play screen, I take the background selected by the user, darken parts of it, add the bottle, score/high-score box, time box, etc. and have the new play screen background all stored on a temporary surface. It saves A LOT of time to just blit that one full-screen image each frame, rather than blitting a full-screen background, darkening about 75% of it, and then applying an almost-full-screen overlay on top of that each frame. (That doesn't count the actual data, like viruses, pills, scores and time.)

You may want one image file/resource/etc, and pre-render other images based off of it for speed/memory efficiency. For example, pixel shaders... Do you want to modify the original image with them? Probably not, and you probably don't want to run the pixel shader every frame in realtime... Solution, blit the original image to an intermediate surface, use the pixel shaders on that surface, and then use that new surface when you blit to the backbuffer. These are games. Speed is important.

In any case where you want to have a flexible image on hand, and it doesn't come from a resource or file (hence it being flexible), most likely you'll need to have it stored on an intermediate surface... unless you want to bloat the installation package with all of the possible image combinations... which of course none of us want to do.

Hope this helps,

-John
User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby StephC » Feb 1, 2004 @ 12:05pm

Stephane Cocquereaumont / Game Developer at <a href=http://int13.net>int13 production</a> (code monkey)
User avatar
StephC
pm Insider
 
Posts: 442
Joined: Jun 12, 2003 @ 10:41am
Location: Bordeaux - France


Postby fast_rx » Feb 1, 2004 @ 5:25pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby mlepage » Feb 1, 2004 @ 5:40pm

But you can blit to other surfaces using GapiDraw. I sometimes compose images into another surface before I blit that surface (and more) to the backbuffer.

Maybe I lost the conversation somewhere but isn't this something you can do in both PF and GD? What were we saying was better in which?
www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby Pejo Software - Per » Feb 1, 2004 @ 9:39pm

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby Johan » Feb 2, 2004 @ 7:07am

Johan Sanneblad, M.Sc, Ph.D
GapiDraw Systems Architect
[]
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Kzinti » Feb 2, 2004 @ 8:21am

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Pejo Software - Per » Feb 3, 2004 @ 11:23am

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby mlepage » Feb 3, 2004 @ 4:39pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Previous

Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum