I am looking for an API that can provide simple, 2D graphics support. Since Direct3D wasn't directly made for 2D, I looked elsewhere, and saw an API called Direct2D by Microsoft. Can anyone point me to a good tutorial on this API. The one Microsoft provides is very overly complicated and hard to read. I just want a tutorial simple and basic, that explains what the code means, unlike Microsoft.

Can someone help me?

7 Years
Discussion Span
Last Post by PixelExchange

What about SDL? Never used it, but I've seen source code of fun games being just a few hundred lines using SDL :)
(that means simplicity)


I wouldn't recommend SDL because it may be simple but it is pretty rigid and if you want to give your game to a friend you have to include a whole crap load of dll files to make it work.

I prefer using OpenGL for 2D or 3D games but if you are looking for something optimized for 2D games then stick with Direct2D.

You were looking for documentation and the first thing that popped up when I googled Direct2D was the msdn documentation website. http://msdn.microsoft.com/en-us/library/dd370990%28VS.85%29.aspx


I believe Direct2D is very recent and only for the most recent operating systems, i don't think older systems can utilize it. Stick with OpenGL, it's simple and easy to learn and sfuo is right, you can easily give the application to a friend and know that they can view it (unless its a glut or other platform implementation).

Another often forgotten API for 2d graphics is Java2D. Do search for this as this is even more portable than OpenGL as Java handles the windowing!


With Direct2D you are limited to Windows boxes.
With OpenGL and Java you are limited to what OSes have OpenGL and Java support, but you will need to rewrite the OpenGL code depending on the platform.

Browsers such as FireFox support WebGL, which is based on OpenGL ES 2.0, so you might want to look into that..

It depends on what platform you want the program to run on, and how resource intensive it is.. Java is probably the best..


Or how about Python, using PyGame, or further that with PyOpenGL through PyGame?


I'm not sure if Win32 can be combined with OpenGL, but if it can, you could also just go with displaying bitmap images with BitBlt for your 2d stuff. A good display bitmap tutorial can be found on gamedev.com's website, inside of a tutorial called genesis. Just go to google.com, and type in gamedev genesis. That's all there is to it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.