API alternatives for 2D game programming

Started by
10 comments, last by Ivyn 20 years, 11 months ago
I''m working on some 2D games and I was wondering there are any other APIs out there besides DirectDraw. Two reasons I have for not wanting to use DirectDraw are... 1. It requires the user to have DirectX, since we target casual and computer illiterate users I don''t want to force them to download a huge DirectX 8/9 when I won''t even be using most of those features. (Yes I know Win2k and XP come with DirectX) 2. Microsoft has made DirectDraw obsolete. It can be independant or whatever, just there has to be some other API out there suited for 2D games.
-- Ivyn --
Advertisement
Microsoft has NOT made DirectDraw obsolete. What made you think that?

Anyways, if for some reason you don''t want to use it, try SDL. I''m pretty sure it uses DirectDraw on the back end.

How appropriate. You fight like a cow.
SDL still uses DirectDraw. I want a custom API that I can release with my applications. If something of the such exists.
-- Ivyn --
When you release your application, you can include the DirectX runtime libraries which the user can install on their computer. Basically, any API you use has either OpenGL or DirectX at it''s core.

tj963
tj963
quote:Original post by tj963
When you release your application, you can include the DirectX runtime libraries which the user can install on their computer. Basically, any API you use has either OpenGL or DirectX at it''s core.

tj963


GDI doesn''t.
other sdl libraries

Anton Karlsson
Klingis Entertainment
Games with silly humor
What about OpenGL? Doesn''t M$ Window$ include OpenGL by default?

I know it''s meant for 3D graphics, but 2D would be a pre-requisite, right? Don''t know for sure, as I am still learning DirectX at the moment - will try OpenGL later.
Yes, you can use OpenGL for 2D rendering. In fact, it''s probably the best route if you want to use some "advanced" stuff like alpha blending excessively.

cu,
Prefect
Widelands - laid back, free software strategy
You could try allegro:

Advantages:

1. Simple to learn.
2. Active community (see www.allegro.cc).
3. Lots of add on libs. Eg. AllegroGL can be used to combine allegro and openGL.
4. Cross platform.

Disadvantages:

1. Bloated. Its a games programming library in general. Therefore there all sorts of input, sound, datafile etc functions that you''ll probably never need.
2. Blending function are a bit crap. Although fblend and allegroGL can improve this situation.
3. Ditto 3d functions. Don''t use these unless for really simple things(all done in software, no hware accel).
4. No support for alternative colorspaces to RGB.
Allegro is a great, very easy to use library. And I wouldn''t call it bloated, since you aren''t forced to link everything. Just compile it without the added options.

And actually DirectDraw is somewhat obslolete, since there is no directdraw interface for version 9.0. In order to get a directdraw objet, you have to use a lower version, which is available in every higher version since it is COM.

This topic is closed to new replies.

Advertisement