Sign in to follow this  
MkChronix

[2D Game] C# Xna or C++ SFML

Recommended Posts

Stating that I'm hobbyist, until I'll go to an university in future, and my mind was only strict on C++ ( as in i only wanted to go for c++ ), I'm starting to open my mind over other languages as i feel i should really trust the fact that C++ gets hard later on without coding experience as most people say. Also I feel the need of something rewarding visually, but i dont know C#, i only know C++ basics.

So, I'd like to discuss with people who know more than me which way you would pick and why, one huge note that will avoid troubles : i dont care about speed. I dont care if this is fast or this is slow.

Also don't just say "C# XNA cause its easy" its rare for me to change my mind and im still wondering if i should "drop" ( not forever, but maybe for now ) C++.

I would like to discuss about this and if someone would be able to provide links like to tutorials to both of them to make me realize ( with the easiest tutorial ever ) which one is best fitting for me.


Thanks. Please this is not a language war or something. I'm underlining the fact that im one of those guys who wanted to learn C++ cause i have to admit im conditioned by mmos knowing they use C++ and such. But until i go to university i want to do something that gives results AND it is still profitting for C++ ( in a way, as in, if i ever know C#, if i go back to C++ will i feel experienced and that everything is easier? )

Thanks.

Share this post


Link to post
Share on other sites
I was where you are about 2 months ago, I have tried to learn c++ a few times and always got board because the fair share of knowledge needed to get something rendering on the screen. I had never once considered anything other then c++, but then I thought why not give it a shot. So I have been using c# since then and I most say using it with XNA has for me, been like night and day, compared to c++.

I would strongly advice you to at lest try c# for a week or two, and start by doing breakout. I haven't used any strict tutorials (only looked up specific things that I needed to do), so I can unfortunately not be of any help there.

Hope it helps and good luck! Edited by azorac

Share this post


Link to post
Share on other sites
With enough skill C++ will give a better result at the end (assuming you don't do things "the stupid way" in several places), by better I mean you can often achieve better performance/graphics/framerates or whatever.
C# however is as you mentioned, easier.

I don't know any C++ so of course I would go down the C# route.
If your intending to go to university and already have C++ experience then you might aswell stick with it, that said knowing more languages is still a valuable skill.

Share this post


Link to post
Share on other sites
If you decide to stick with C++ you might want to consider usind SDL. I haven't used SFML, but SDL is pretty simple. It might be getting outdated, but you will find a massive amount of documentation and tutorials available, while SFML seems to have little more explained about it than it's API reference. There is also SDL.Net if you go with C#, but XNA seems pretty popular in that area.

Share this post


Link to post
Share on other sites
Thats a point not mentioned. C#+XNA is windows, xbox, windows phone only. Theres also other graphics frameworks for C#, several of which work on mono aswell. Monogame aims to duplicate XNA using openGL(/ES) across all platforms supported by mono (it even works through monodroid and monotouch on android and iOS). Ogre3d has .net only bindings (Mogre) and outdated .net/mono bindings (OgreDotNet), its also had a full port to C# (although its an older version of mono) in the axiom project which I believe also works on both mono and .net although its performance is much lower (same demo averages 75% of the MOgre demo framerate).
SFML and SDL both have .net bindings (SFML is only .net, not mono. SDL I believe is mono and .net), you can use slimdx for direct access to directx instead of using XNA.
OpenGL has bindings in the Tau and OpenTK projects both of which support .net and mono.

I mention mono incase your not on a windows system but otherwise your probably best off sticking with .net rather than mono.

This does show another advantage of C++ though, most of these projects are wrappers around native C++ libraries, C++ already has access to the same libraries with increase performance (dependant on the binding it seems, MOgre I get 2 FPS difference from regular Ogre3d's C++ demo's, some bindings can be really efficient, a friend only got half performance on SFML for .net than he did using SFML with C++). C++ also gets access to tonnes more libraries and engines that havent been wrapped or ported to .net

Share this post


Link to post
Share on other sites
[quote name='MkChronix' timestamp='1342822094' post='4961489']
azorac, since you were in my same situation, which book/sites did you use that made you feel you had a good choice?
[/quote]
I am not quite sure that I understand your question, but I do not use any specific site/book. I had some basic c++ knowledge that I felt transfered over to c# and then when ever I want to do something, for example draw a square to the screen, I googled that specific part. Edited by azorac

Share this post


Link to post
Share on other sites
well since i said im "switching" from C++ to C#, you said you were in my same situation in the earlier post.

i think ill go for C# XNA, cause im on windows and dont really care about porting to other stuff for now so.. but yea, 6677, i guess about the libraries part your right but consider that i would be happy to know only one well enough to be able to do something decent

Share this post


Link to post
Share on other sites
Some pretty good stuff comes out of XNA, although I only played the demo I really enjoyed bastion and I play quite a bit of terraria. Neither are exactly crysis but good games regardless

Share this post


Link to post
Share on other sites

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