what graphics api???

Started by
8 comments, last by HopeDagger 17 years, 5 months ago
Hi. Im just getting into making games and there seems to be so many api's out there to use. I looked at directX and it looks pretty hardcore, but at the same time, extremely flexible. Then theres openGL which I have used before, and some other ones I have seen mentioned like SDL. I really do not know where to start. My aim is to make a fairly complex 2D game. I want to make this project benefit me as much as possible in the future. Any guidance on this would be much appreciated. Thanx
Advertisement
You've probably been told this before, but it depends what platform(s) you want to develop this game for. As this is your first game, you probably aren't interested in going cross-platform yet [smile]. Personally, I would recommend DirectDraw. I notice you say 'DirectX or OpenGL'. DirectX and OpenGL can be used together; however, I wouldn't recommend using directDraw/3d with OpenGL [smile].

You could use OpenGL to render the graphics while using DirectSound/DirectMusic to integrate sound into your game. I even bought a book that guides you through your first game engine using the Win32 API! But I wouldn't recommend using that particular API for serious game development (it was pretty enlightening though).

I've never personally used SDL, but I've heard good things about it. It all comes down to what you're most comfortable with.

If you want this project to benefit you in the future, I would recommend commenting your code wherever necessary and making it as modular as possible so that you can add on to it later.

I hope this has helped you, even a bit [smile].

-Chris
I actually disagree with DirectDraw. It is deprecated and is not being updated anymore. If you are going to do 2D and your using DirectX, then go ahead and be strong and learn Direct3D with 2D. it's not that hard at all to get 2D up and going in Direct3D.

Although, I don't suggest it yet. I suggest you get to know 2D first. That is where I suggest SDL. SDL is a very good 2D Cross Platform API that is VERY simple to learn. Since you said you have used OPenGL before, after you have became fairly good with SDL, you can use SDL and OPenGL together and get the Hardware Accelerated speed from OpenGL, while still using the simplistic design of SDL, without diving into the win32 API.


That is just what I suggest.


Chad
Sweet thanx.

Ill probably use SDL just to get the feel for how game engines work without getting down and dirty with the hardware.

Thanx again.
Quote:Original post by chrisparton1991
I even bought a book that guides you through your first game engine using the Win32 API! But I wouldn't recommend using that particular API for serious game development (it was pretty enlightening though).


Off topic: just curious, what book is that? I've been doing a lot of reading on Win32 lately, and am planning to start doing some basic games, and perhaps do a simple engine after that. So I've gone through a lot of resources on the web, and wouldn't mind looking at printed materials either...

Grant Palin
Use Direct3D to do 2D, it's not too hard.
If you've used OpenGL before, I'd say stick with that.
On DirectDraw: Although it used to be the standard way to do things, it has been deprecated as mentioned above. Because of advances in graphics cards, and the Direct3D engine, Microsoft recommends replacing your sprites with textured quads. It's just more efficient with your hardware, and after hacking a few basic routines, you can use them virtually the same way.

I learned initially using DirectX, and it was a bit cumbersome, but once you get past those first few frustrating projects, it's very easy to use an keep up with. After that, I learned OpenGL, and I found it to be much easier, things don't keep changing on you, and your code is usable on more systems. OpenGL seems both cleaner and clearer to me, but that's just an opinion (I suppose that's what you're here for anyways). In the long run, I would recommend experimenting with both, if only for your development as a coder.

I've never used SDL, but I've talked to plenty of people who learn it and never feel the need to learn anything else, so it must be effective. A lot of beginners find it easier to stick to, and feel that it gets them the best of both worlds: a stable API, a robust library that handles most of their games' needs, platform compatibility, and ease of use.

Currently, I use a variety of different libraries that I find most suited to my tastes, the winner in the graphics library is OpenGL, with DevIL for images.
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
I like OpenGL because it's portable and has a good set of tools surrounding it. I use SDL to start my OpenGL contexts and handle input, image loading, threading and timing.
If you're aiming for 2D graphics, and don't need the extra benefits (and challenges) of hardware acceleration (via 3D graphics) then I unhesitantly recommend Allegro, an extremely fast/powerful 2D gamedev library that'll get you on your feet many times faster than OpenGL or Direct3D (in this author's humble opinion [smile]).

Good luck!

This topic is closed to new replies.

Advertisement