I am considering writing a 2D RTS in C#/.NET and i was wondering what options are available for a graphics library aside from XNA. What are they?
Going straight to DirectX is a perfectly valid option, although for only 2D, you probably need to know a bit too much about 3D graphics to effectively use it.
Back when I was into game development, I was quite fond of the Artificial Heart graphics engine, which was somewhat basic but incredibly easy to use. Unfortunately, the website appears to have been replaced with a parked domain. Perhaps the company went out of business. If so, it is a shame.
For a more extensive catalogue, take a look at the DevMaster game engine database
Hi, If you are looking for opensource community supported library, you can try
- SlimDX
- TAO framework -- opengl bindings for .Net framework
But am not sure if they are matured enough.. but its worth giva try..
Cheers
Ramesh Vel
I'm sure there are other options out there, but you can also take a look at SDL.Net, a .Net implementation for SDL.
To make the most of today's computers' hardware and to keep up with the graphics of other 2D games, I would go with a 2D-in-3D solution, based on DirectX or OpenGL. You would render sprites as so-called quads (two polygons combined to make a square.)
I personally think OpenGL is much more appropriate for a 2D game. You should definitely read through the NeHe tutorials (they're for C++, but the OpenGL parts are still valid. You can find a C# conversion of the code at the bottom of the page of each lesson.) as they are an awesome resource for getting started with making a simple graphics engine for your game.
Furthermore, a lot of the articles on GameDev have helped me a lot when developing games. They've got all sorts of articles that will help you along, ranging from adding lighting effects to your games to adding simple physics.
The answers posted so far (apart from SDL.NET) have all just said to use OpenGL, DirectX or some variant of the 2. Personally, I wouldn't use either of these for a 2D game when you already have XNA. XNA already has some classes for doing 2D graphics (the main one being the SpriteBatch).
If you do use XNA, not only can you make a game that runs on Windows, but also one for XBox, Zune and Silverlight as well (Zune and Silverlight require that you don't use the 3D part of XNA though, but that shouldn't worry you). Basically, XNA will save you the trouble of writting all of the low level management code that DirectX or OpenGL need (such as handling window switching and a plethora of other problems).
I haven't used SDL at all, so I can't give you any personal opinions on it, but I have heard it is quite good for 2D graphics, so I'd recommend looking into SDL.NET or just going with XNA, the other suggestions here require a lot more work with little advantage (most people just want to make the game and not worry about the HAL interfaces and getting everything to play nice with the OS).