DirectX vs. SDL vs. Allegro

Started by
11 comments, last by Strider81 21 years, 4 months ago
Hello, i''m new to this community. I have been programming for a few years now (i''m on comp sci 3rd year). I know fairly well how to program in C/C++, Java. However I''ve never really made anything with Graphics involved. A short while ago i tried making a game using SDL. However, it seems that most people recommend directx. just out of curosity why is this? i tried learning DirectX (from that windows game guru book which i personally think sucked), but it seems overly complicated. There is tons of code just to open up a simple window! and to be honest i don''t quite understand all of it. My other question is does anyone know a good place to start learning how to program using directx (please don''t recommend any books by andre lamothe, i don''t think i shall purchase any of his books again)...thanks =D
Advertisement
Start Here
Here
Here


[edited by - Machaira on December 12, 2002 2:09:58 PM]

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

What? No ''vs. OpenGL''?
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Windows programming unfortunately does involve a lot of basic things in order to set up a window but on the good side you can keep that code and rarely change it. Once that is out of the way I would suggest you to download the SDK from microsoft and follow the tutorials there. Do them all it is important, then repeat. After that it should be fairly easy for you to expand your knowledge by reading the reference and look through the samples as well as making your own small programs. Expect it to take some time, this is not something you will learn in a month or even three months.
Officially you can draw a triangle with DirectX 8 in about 200 lines (or so i''''ve heared).

Take my advice and use OpenGL, but hey, don''t listen to me i''m kind of biased.
--------<a href="http://www.icarusindie.com/rpc>Reverse Pop Culture
If you''re asking, as the title would suggest, about the best API in which to do 2d graphics work...
Back during DX7 I probably would have said DirectDraw. When they mutated all the DXGraphics together in DX8, DD got corrupted and made a lot harder than it needed to be.
I''m playing around with SDL currently, and I have to say it''s quick, relatively simple, and efficient. I give a vote in this route.
And I have never in all my days tried the Allegro libraries, though many people have positive comments about them.

-Ryan "Run_The_Shadows"
-Run_The_Shadows@excite.com
-The Navidson Record! The best film you''ll never see!
SDL is good if all you want is some basic functions that can do the setup, handle blitting, palettes, surfaces and loading bmp''s. It also does input handeling.

Allegro on the other hand contains a lot more stuff for image rotation, fonts etc as well as a datafile mangement thing. To choose between the two it depends on what you like doing.

I personally like doing fairly low level things so I choose SDL and code my own font handeling, datafile mangement etc. However if you hate writing stuff like that go for allegro as it allows to concentrate on the actual game more
I was just wondering since i have the direct x8.1 sdk, where can i find the tutorials that come with the documentation. I know there are sample programs that come with the sdk but it is quite difficult to work out what is going on by just going through the code.

Having had a look through some of the documentation i know that there is a section on direct graphics but nothing on direct draw.

How about them apples?
How about them apples?
If you want the DirectDraw documentation you need to get the DirectX 7 help files. You can get them here.

[edited by - yq713 on December 12, 2002 11:32:39 PM]
"How can they meet us face to face till we have faces?"-C.S. Lewis
cool thanks for the link yq713. I have actually been looking for these but could not find them.

thanks again.

How about them apples?
How about them apples?

This topic is closed to new replies.

Advertisement