Sign in to follow this  
DjMaSh

what graphics api???

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this