Click here to Skip to main content
13,259,976 members (51,385 online)
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 10 Jul 2008

Games with GameDrawNet.dll

, 10 Jul 2008
Rate this:
Please Sign up or sign in to vote.
For games on Pocket PC, you shouldn't use GDI+. One solution: Gapidraw!



First I would like to start with saying that this is my first article. So you can flare all you want but please realize I can't use that kind of information to make the article better. I didn't post this article for you to learn anything from it, just for me to share something so you can have some fun with it and learn in the process.

Second, while I include the GapiDraw.dll, DO NOT USE THIS IN COMMERCIAL APPLICATIONS. You can't. Buy the product at I use this library for hobby only and while hobbies can cost a lot, I don't like to spend so much on a library anyway. The reason I use it is simple, it's fast and easy and you can use it in non-commercial applications except if you don't mind the startup banner. Also my apologies for somewhat strange use of language.

And finally, I would like some response about... well anything.

With that sad...


I noticed that here at CodeProject that there are a couple of games for compact framework, but some of them are really slow and that is expected with some of them using GDI+. On a device with only 400MHz, you need a better solution.

Example Image:
Note: This framerate is lower on the emulator. On my device this scene was running with 15 fps


I bought a PocketPC a couple of month ago. I really liked the device because of several reasons. However one reason I really didn't like it is, that there are no platform games for the thing! None. At least none fun enough that I know of. And if you find one (emulator or some kind), you will see that playing it is a crime. However I would like to play it anyway.

And so I decided to build my own game. This article is not about the game at all, but how I use GapiDraw for the game with C#. GapiDraw is a nice toolkit for game programming for pocket PC and a couple of other platforms like Symbian. In case you would like to learn more about GapiDraw, than I am not your man, go to, and read for yourself. However it is used meanly with C++.

However I don't use C++, so I couldn't use it. So I searched for a wrapper but could only find the somewhat out-dated version on I used that version as a base and made it GapiDraw 3.6 compatible. (And it seems to work just fine with 3.8).

Well, I also noticed a couple of people on pocketmatrix asking for a wrapper, but they didn't have one, so why not share it in a change to improve it in the process.

Example Image
Note: image of my buggy game editor.

Using the Code

You should be used to importing references and you must be somewhat used to programming on pocket PC. You can't use relative paths for example. However GapiDrawNet does this for you! So you can just call a bitmap in the same folder as the executable. For all other stuff you need to load in the game, like XML, you can use my simple IOManager. It just has one function and it returns the path of the running executable, so combine that string with your files relative of the executable and you can't go wrong.. well at least with some trying.

Included with this Article

  • The wrapper and the non-commercial version of GapiDraw.dll (v3.8)
  • My sample test application
  • VGA Font. I resized the build-in version so I it is more readable with VGA.
  • FMOD 3.75 Wrapper and my wrapper around that


I can't explain every detail, because that will be too much work, and all the information you really need can be found on The description tells enough but perhaps it helps if you can read C++ (it always helps btw, except if you used to brainf*ck :)). And feel free to ask anything.

Points of Interest

I hope I have some people interested because I would like to see more pocket PC games, and I just can't bear the framerate I have with some of the GDI+ application games out there.


  • July 10, 2008 - Original post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Marijn Stevens
Software Developer (Junior)
Netherlands Netherlands
My name is Marijn Stevens. I am born in the Netherlands.
I use C# to write most of my applications and most of the reasons I program something is just plain fun, learning to make games and stuff. Most of my experiments are weird and more toward OS programming.

That was all...

(dutch) my personal website.

You may also be interested in...

Comments and Discussions

QuestionFull implementation? Pin
superkm22-Jul-09 2:22
membersuperkm22-Jul-09 2:22 
AnswerRe: Full implementation? Pin
Marijn Stevens22-Jul-09 14:05
memberMarijn Stevens22-Jul-09 14:05 
GeneralRe: Full implementation? Pin
superkm22-Jul-09 22:27
membersuperkm22-Jul-09 22:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171114.1 | Last Updated 10 Jul 2008
Article Copyright 2008 by Marijn Stevens
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid