PocketMatrix forums

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

gapidraw for a desktop game

What do you think about using gapidraw to create simple pc (desktop not pocket) games? Any good reasons why I should or could not do this?
Hi Randy,

GD is used for desktop as much as mobile development. I compile my games on the desktop and just test it every now and then on an actual device so I can say I use the desktop counterpart more often. So yes, you can use it for desktop games as well. :) Hope this helps!
OK... but would it make sense to use GD if I am only interested in making a desktop game?
I would say it makes total sense. It allows you to abstract away the complexity of DirectX and just worry about your game. Not that DX is horribly difficult, but GD is certainly easier.

My only question would be if it's possible to do a full-screen desktop app with GD... I'm not sure. Even if it's not, doing a 640x480 windowed game may not be a problem for you.

I don't think you lose anything performance-wse, and I don't think you lose anything in terms of what you can actually do.

So, I really can't think of a single reason why it's not a good idea.
Randy: There are several advantages in using GapiDraw:

(1) GapiDraw on stationary PCs only require DirectDraw 7.0 and higher, and has been tested on numerous Win95/98/98SE/ME/2000/XP Machines. If you want to do it yourself, you would have to consider issues such as 555/565 blitting (some PCs use 555 16-bit graphics), or restricting your game to only work on newer Direct3D-enabled machines.
(2) There's more to creating a game than calling blit operations in DirectX. GapiDraw provides an application wrapper that behaves very well on all PCs, collision detection and much more. Also, some operations such as rotation fallback to software if not supported by hardware.
(3) Debugging. It's really a good idea to run your game in "debug mode" using software-rendering in a window. GapiDraw lets you do just that, and switches to hardware-accelerated rendering once you run full screen.

You can try running the "MFC" or "TileDemo" sample applications shipped with GapiDraw in fullscreen mode to try the performance.
Great! Seems like you all agree that using GD to create desktop games is an ok idea. I too see many advantages in using the library, however I haven't seen any strictly desktop games out there.



One more question.... :?: Can anyone suggest a good sound library that abstracts DirectSound and adds MP3/WMA capabilites? Thanks.
PocketWar by MetalShard is shipped as a desktop executable using GapiDraw for one example...
I can't suggest a library that supports MP3 and WMA... FMod I think supports MP3, but I don't think WMA. However, you may want to look at Hekkus. I always recommend it as I really think it's fantastic. It won't give you those two things, but you might be able to live without them after looking at Hekkus. For my game K&G; Arcade, I actually did all the music as ADPCM-compressed WAVs. If it was a desktop build I could have done even more with that because memory wouldn't be much of an issue then. To me, that's a decent way to go.

On a related note, in case anyone's interested... The music for K&G; was composed with a product I discovered called Super Duper Music Luper. It's actually meant for kids!, but it makes creating music so damned easy I couldn't resist! I found that I had about 10 CDs full of loops from my days as a prog rock band member, and they worked perfectly with the program (although ironically I wound up using only loops that came with the program). I picked this thing up for $3.99 at one of those miscellaneous discount stores everyone's got near them (here in the states anyway). It renders to WAV, so I didn't lose the composition. This worked amazingly well for what I needed. Obviously, WAVs for large pieces of music isn't a good idea, but if your looking for relatively short loops (I think my theme is about 30 seconds before it actually loops), it's a great little tool I highly recommend.
gapidraw is expensive if you only plan to make a pc game.
directx is free....
Yes, it may be expensive it you are not classified a hobbyist (and $100 for a hobbyist might be expensive for you anyway).

But I think the question you need to ask is how much longer and more difficult is it going to be to do your game with just DirectX?

If you have to spend time implementing much of what GD does for you with DX anyway, at what point is DX now costing you more than GD? I mean, you DO value your time, right?!? I certainly value mine... If I can save myself a couple of days' work using GD instead of straight DX, it becomes worth it pretty quickly (I'm worth alot ;) ).

As with all things though, it's a cost-benefit analysis each person needs to make. You may be able to list some very good reasons for going with DX instead of GD (i.e., your doing a custom engine where you want to have as little between you and the hardware as possible maybe, or you know that your game won't require most of what GD offers, or you just flat-out prefer working with DX's object model).

To me though, GD saves me time, and that makes it worth it, as a hobbyist-class developer anyway.
A few days ago I stumbed across something called ClanLib which is a freeware game API for Windows and Linux. It contains interfaces for display (Targa, PCX, JPEG, PNG, BMP), sound (Wav, MikMod, Ogg Vorbis), input and networking, and it even includes a complete set of widgets and built-in signal/event handling.

It seems to me that it's got the whole thing covered, and looking at the tutorials it looks pretty easy. Going for a strictly desktop game, I would definitely take a closer look at ClanLib.

John
Xenopi · 11 May 2004, 17:07 UTC — Gapidraw for Desktop
Hi,

We're just wrapping up a game made for desktop pc's with gapidraw (developed on 2.05, but will release using 3.0). We decided on gapidraw because we wanted the option of doing a PDA version (Pocket PC or Palm or whatever..). But our primary release platform is PC. Here are some of my thoughts:

1) Incredibly easy to use.
2) Can do full screen (at various resolutions - we chose 800x600, but you can choose other resolutions) or windowed. Unfortunately, I have not found out how to make a game that can dynamically switch between windowed & fullscreen (without exiting and restarting). This will be a feature request from us for future versions of Gapidraw.
3) Limited keyboard support - from what I have been able to find - Gapidraw only allows 8 different (and pre-defined!) keys to be detected... This is a BIG limitation for a PC game (luckily, most of our game is mouse driven, but still, that kind of sucks if you want to have general text entry..) This will also be a feature request from us for future versions.
4) Good performance - our game runs on pretty low end systems without noticeable slow down.
5) If you want to maintain cross-platform support, then Hekkus sound system is the obvious choice, but it doesn't support anything more advanced than MOD format, which is tough for composers (MIDI support or at least S3M would be a godsend).. but hey, it's cheap, and easy to use too... So i'm not complaining!

Eric
Xenopi wrote:3) Limited keyboard support - from what I have been able to find - Gapidraw only allows 8 different (and pre-defined!) keys to be detected... This is a BIG limitation for a PC game (luckily, most of our game is mouse driven, but still, that kind of sucks if you want to have general text entry..) This will also be a feature request from us for future versions.


Keep in mind that if you're using the CGapiApplication framework you can easily add support for additional keypress events by modifying WindowProc.
Xenopi · 13 May 2004, 19:55 UTC — scratch that... Figured it out (I think)
Well, after some tinkering, I figured out how to switch between fullscreen & windowed dynamically. It's quite easy actually, just CloseDisplay, change config, then OpenDisplay.. Duh... :lol:

Thanks for the tip about just digging into the WindowProc, but that kind of strikes me as perhaps less than elegant since everytime I update my license of Gapidraw (yep, I'm an official licensee! :) with a new download, my changes will get torched.... (not a big deal, but if the keyboard support were included in the GapiApplication to begin with...)

Really though, I'm happy with Gapidraw (especially since I found out how easy it is to take care of my small nitpicks..)

Eric
You could always simply override the WindowProc method. =)
I don't understand, I believe on PC you get all the key presses. At least I do.
ppcStudios wrote:You could always simply override the WindowProc method. =)


GR: I know this thread is rather old but I've been playing with the rest of GD's features lately and also wanted to convert a desktop app from windowed to full screen in real time, can you share some sample code on how you were able to do this?

Xenopi: Can you also share how you used Close/OpenDisplay() to convert your game from windowed to full screen and vice versa?

Thanks!

- Erick
Hi Erick,

Sorry if my replies in this thread were confusing, but it was Xenopi that said he had been able to switch between windowed and fullscreen modes on the fly. I've not tried it, so I'm not sure that his method works. --GR