C# 2D Vector Graphics Game using DirectX or OpenGL?
Asked Answered
D

7

6

So it has been a while since I have done any game programming in C#, but I have had a recent bug to get back into it, and I wanted some opinions on what configuration I should use.

I wanted to use C# as that is what I use for work, and have become vary familiar with. I have worked with both DirectX and OpenGL in the past, but mostly in 3D, but now I am interested in writing a 2D game with all vector graphics, something that resembles the look of Geometry Wars or the old Star Wars arcade game.

Key points I am interested in:
• Ease of use/implementation.
• Easy on memory. (I plan on having a lot going on at once)
• Looks good, I don't want curve to look pixelated.
• Maybe some nice effects like glow or particle.

I am open to any and all suggestions, maybe even something I have not thought of...

Thanks in advance!

Dahna answered 15/5, 2010 at 6:12 Comment(0)
B
11

If you're just starting out again and already have a C# background, why not try XNA? You'll definitely be able to leverage your C# skills here

http://creators.xna.com http://creators.xna.com/en-US/downloads

Bayly answered 15/5, 2010 at 6:28 Comment(2)
+1. XNA has vast support out there and plenty of books to to offer more support.Headship
And in addition, if you use XNA you'll immediately have a place to put it for people to try it with only minimal additional effort: XBox Live Indie. Unlike other publication methods, it requires a very minimal amount of functional guidelines to follow, and in exchange you hit tons of potential people to try it out (if you're into getting people to try it!) You also get access to much more than just graphics APIs with XNA. you get sound, input, file access... everything that you need to think about when making games.Touristy
C
3

I use SlimDX for C# graphics programming and I prefer it to XNA.

http://slimdx.org/

Cradle answered 15/5, 2010 at 15:49 Comment(1)
+1 esp. with XNA no longer getting active development SlimDX seems a very good OpenSource alternativeFossil
N
1

TBH it doesn't really matter what you use. OpenGL, SlimDX, or XNA. They'll all be about as complex (or not as the case may be) as each other.

Namaqualand answered 15/5, 2010 at 7:0 Comment(0)
H
1

You might consider using the Axiom engine, which is a C# port of Ogre3D. It's enough higher level that you can have it render your graphics via XNA or OpenGL with little or no change to your code. It can also handle keyboard and mouse input (which are normally separate -- e.g., via DirectInput on Windows or SDL on Linux).

Hydrophobia answered 15/5, 2010 at 14:39 Comment(1)
Axiom is no longer in development.Caribou
H
1

You also might consider using TAO Framework which is OpenGL based and quite nice. But you have to write the 2D Engine all by yourself tho. It also works on Mono!

Heymann answered 15/5, 2010 at 15:46 Comment(1)
This has been superseded by OpenTK, afaik.Exhaust
N
1

I create my OpenGL engine with a C# wrapper because I like C# a lot too. Sadly managed languages are very slow when it comes to graphics and that's why I always make my OpenGL part in C++, compile it as a DLL and get it from C# using interop. If you by any chance dislike DirectX than I suggest you stay away from XNA. Everybody I know is very dissapointed about it and switched back to C++(OpenGL) + C#.

Nutritious answered 17/5, 2010 at 19:40 Comment(0)
S
1

Since you already know C# I'd use XNA or Unity. While there are faster languages and middlewares, they're probably plenty fast enough. Both frameworks would have the necessary features you require.

Salutation answered 21/10, 2010 at 7:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.