Sign in to follow this  

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

This topic is 3596 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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



Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

This topic is 3596 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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