Click here to Skip to main content
15,881,248 members
Articles / Mobile Apps / Windows Mobile

Games with GameDrawNet.dll

Rate me:
Please Sign up or sign in to vote.
2.67/5 (4 votes)
10 Jul 2008CPOL4 min read 18.5K   156   13   3
For games on Pocket PC, you shouldn't use GDI+. One solution: Gapidraw!

CSharpGapiDrawNet/image1.JPG

Foreword

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 www.gapidraw.com/. 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...

Introduction

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
Image 2

Background

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 www.GapiDraw.com, 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 www.intuitex.com/ppcdev.html. 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.
CSharpGapiDrawNet/2008.5.3.151512_1_.png

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

Support

I can't explain every detail, because that will be too much work, and all the information you really need can be found on http://www.gapidraw.com/docs/gapidraw/. 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.

History

  • July 10, 2008 - Original post

License

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



Comments and Discussions

 
QuestionFull implementation? Pin
superkm22-Jul-09 1:22
superkm22-Jul-09 1:22 
AnswerRe: Full implementation? Pin
User 226147422-Jul-09 13:05
User 226147422-Jul-09 13:05 
GeneralRe: Full implementation? Pin
superkm22-Jul-09 21:27
superkm22-Jul-09 21: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.