SDL vs. DirectDraw (2D games) C++

Started by
7 comments, last by firefly28 16 years, 2 months ago
Hello, I'm thinking of starting to make games in C++, and my goal in programming "career" is to make a mmorpg in 2D (rectangular). I'm thinking on games similair to Tibia or Phobos online. Even if I'm new to win apps, I want to use the choosen one all the way to my goal, is that smart to do? So, what should I use? SDL or DirectDraw (DirectX)? (Or do you have any other opinion what I should use?) Thanks for reply, bless!
Advertisement
Between the two, you should probably use SDL. DirectDraw hasn't been updated in years, and as a consequence people who remember how to use DirectDraw are getting thin on the ground. However, you can also do 2D graphics in Direct3D, so you might want to consider that if you're not interested in supporting non-Windows computers.

You also might get a different answer depending on your programming language. It's easier to work with SDL in Python than it is with Direct3D. On the other hand, using Direct3D is pretty easy in C#. And in C# you might want to give XNA a try.

You're also not limited to traditional programming languages. Dofus, a 2D MMORPG, is done in Flash for the client.
Oh! I'm so sorry!
I'm using C++

And thank you so much for your reply! =)
I'd say SDL is the better option for 2D. It is also platform independent so you can port your game to OSes other than Windows. But since you can also do 2D with a 3D API you could also use OpenGL which is still platform independent in contrast to DirectX.
Speaking of which, I started learning SDL instead of Direct3D mostly because I could hardly find anything about doing 2D games with Direct3D.

There's this article on this site:
http://www.gamedev.net/reference/articles/article1972.asp

But does anyone know of any other good places to learn 2D game programming with Direct3D?
Thanks again for your opinions!

One more question, I'm not thinking about beginning with this now, ....I think..
I know the basics in console apps, what should i do now? start with win apps or start learning about SDL right away?
Quote:Original post by Sean_Seanston
Speaking of which, I started learning SDL instead of Direct3D mostly because I could hardly find anything about doing 2D games with Direct3D.

There's this article on this site:
http://www.gamedev.net/reference/articles/article1972.asp

But does anyone know of any other good places to learn 2D game programming with Direct3D?


Toymaker has some good reference for using D3D9 in C++, and goes through the basics of D3D's 2D capabilities. I'd also made a sample app a little while ago showing some of the basics of handling sprites in D3D9, although I think I may have made some questionable decisions in the design. I really should update that one day...

Regardless, the important point is that ultimately your method of rendering/drawing should be quite separate from the rest of your game logic. You should be able to get most of your information from existing tutorials, even if they don't mention anything about D3D.



Quote:Original post by Iderik
I know the basics in console apps, what should i do now? start with win apps or start learning about SDL right away?


If you're going to use SDL, then just skip normal Windows applications and just do the SDL stuff.
Im going to be attempting to use directx for 2d soon. I ordered a quite expensive book and what worrys me is the whole direct draw in regards its out of date. Im hoping that once going through the book I will know enough to be able to use more up to date methods.(Actually I hope the depreceated code works :-(, just to at least let me see some base game working as I hate doctoring code in books , especially expensive ones lol )

Im trying to pull together as muuch directx resources as possible atm for when the book arrives(The book is "Programming RPG games with directx")

If you folks pull any good resources on creating 2d apps with dx + mixing 2d 3d please put in the thread if possible :)

This topic is closed to new replies.

Advertisement