What do you think is a good api.

Started by
21 comments, last by snyp 19 years, 11 months ago
right know im learning dx but i heard that sdl and opengl are ok too, what do you think?
Actual Linux penguins were harmed in the making of this message.
Advertisement
To prevent a flamewar from arising (and since you posted this in the DX forum, obviously answered will be baised towards DX), each API has it''s own pros and cons. However, to me, D3D seems to be the better API.

For a better, un-biased explanation, check out this article.


Dustin Franklin
Mircrosoft DirectX MVP
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
SDL is fun!
OpenGL and SDL are quite a bit easier, but DirectX has so much to offer that it''s worth the extra work in my opinion.
A good API is one that you''re comfortable using. Obviously we know nothing of your ability level, so we can''t help you there.

SDL does something different from Direct3d and OpenGL, SDL is basically a wrapper library which makes things easier for programmers who want to use fullscreen or direct software or opengl rendering.

Whereas Direct3d of course, you have to make your own "wrapper" to set up windows, input handling etc (I''m sure there are zillions of pre-written ones, and they are all identical).

Mark
It depends..

If you''ve never heard of anything else than Windows, and you like to have official documents, go for DirectX.

If you''re a do-it-yourself-er, and like to search and have alot of time. Go for OpenGL/SDL. There are actually quite alot of articles on those 2, although you have to search for yourself.

I went for DirectX because it seems so ready-to-use. Everything you want is in it, don''t have to search much farther than the documents that come with it.
OpenGL on the other hand, has a lot of extensions, and the system.. Me personally, don''t like that system. One download, one package, one document. DirectX.

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
My opinion of a good API is one that I can use for rapid prototyping and tuned high performance release code. So I chucked Direct3D for that reason, I feel like I''ve just gone the cheating way out by going with OpenGL due to the simplicity I find in using it over Direct3D. I will eventually have to learn Direct3D at some point if I was to ever get anywhere in games programming. But for now, I''m going to stick with OpenGL.

note: I use SDL, SDL_net, fmod/SDL_mixer for the other stuff.

"You are in a room. You can see a cow."
">look at cow"
"It is a cow."
.:Cubicle2:.
If you were wondering about my knowledge, I'm really confident with DirectX, hoping to make a game engine, generic.
But I was wondering, is SDL or OPENGL really that easy, if it is, I'll start making cross platform games, but still use DX.


[edited by - snyp on May 9, 2004 9:14:24 AM]
Actual Linux penguins were harmed in the making of this message.
I don't know what you know about SDL, but it stands clearly out from the other two. It's a very simple 2D library that's easy to learn, and offers some powerful features once you've learned the basics. However, the same game made in SDL and Opengl/D3D will probably be much faster in Opengl/D3D. Also, going for SDL, you'll miss out on features such as image rotation and scaling. Sure, you can write a zoomer/rotator for SDL, but it wouldn't be near as fast (not to mention good-looking) as in Opengl or D3D.

Don't get me wrong, SDL is great for beginners who want to make simple 2D games, and do it with a small amount of code lines. If you use SDL with OpenGL, it's great for window creation (a couple of function calls does the trick), and as a bonus you'll get platform-independent code.


Edit: Forgot to mention that SDL provides you with some easy-to-use features such as multithreading, audio, CD-ROM controlling, keyboard- and mouse input, and with some additional libraries, networking and text output.

[edited by - Goldfish on May 9, 2004 9:40:43 AM]
2 + 2 = 5 for extremely large values of 2
Lets put it like this:

If you understand C++ then you can choose both.
If you''re just starting with programming, and never read about classes, you might *think* that OpenGL is easier because it''s ''just functions''.

MicroSoft works on DirectX so I''d go for OpenGL. NOOOOT!! That''s the best reason to go for DirectX. MicroSoft never loses. (But not always wins. Sony.)

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..

This topic is closed to new replies.

Advertisement