Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing a 2D RTS game in C#: graphics library options?

Tags:

c#

.net

graphics

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?

like image 885
RCIX Avatar asked Dec 05 '25 17:12

RCIX


2 Answers

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).

like image 104
Grant Peters Avatar answered Dec 08 '25 05:12

Grant Peters


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

like image 32
Sander Avatar answered Dec 08 '25 06:12

Sander



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!