C++ or C#?

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

Post Reply
Blue Dream
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 7
Joined: Sat Aug 24, 2013 4:42 pm

C++ or C#?

Post by Blue Dream »

I started programming when I was younger and I started with C++. It was a big mistake, I was so lost and eventually gave up. Then I started working with LUA to make add-ons for a server on Garry's Mod. I wanted to get back into actual programming so I decided to learn C#. From the knowledge I learned from the little bits of C++ and LUA I did it turned out to be super easy to learn C#. But now I am wondering if I should go back to C++ and work with SDL or stick with C# and work with XNA... What do you guys suggest?
Blue Dream
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 7
Joined: Sat Aug 24, 2013 4:42 pm

Re: C++ or C#?

Post by Blue Dream »

What do you mean by "no longer supported"? I heard that they don't update XNA anymore but that just means that it won't be updated for future gaming technology, or so I thought. The newest version of XNA (4.0) is all I would really need to make a 2d Side Scroller. Correct me if I'm wrong.
User avatar
Nokurn
Chaos Rift Regular
Chaos Rift Regular
Posts: 164
Joined: Mon Jan 31, 2011 12:08 pm
Favorite Gaming Platforms: PC, SNES, Dreamcast, PS2, N64
Programming Language of Choice: Proper C++
Location: Southern California
Contact:

Re: C++ or C#?

Post by Nokurn »

Blue Dream wrote:What do you mean by "no longer supported"? I heard that they don't update XNA anymore but that just means that it won't be updated for future gaming technology, or so I thought. The newest version of XNA (4.0) is all I would really need to make a 2d Side Scroller. Correct me if I'm wrong.
"Won't update anymore" means a lot. If there are bugs, they won't be fixed. It won't be updated to take advantage of new technology, meaning newer versions of DirectX won't be used. If a future version of Windows drops support for Direct3D 9, XNA will not function on that version. You won't be able to publish on Xbox One using XNA. There is essentially no reason to use XNA at this point unless you have a substantial existing codebase written against it. If you're set on using something XNA-like, you can use MonoGame, which is open source and will be actively developed for the foreseeable future.

As for "C++ or C#," I am completely biased toward C++. It's my first language, it's my language of choice, and it's the language I am most fluent in (probably more so than English). I think that anyone intending to do any serious game development or work in the game industry as a career should focus entirely on C++. If you're just doing hobby projects, obviously, you can do whatever you want--write your games in brainfuck if you want. If you intend to operate exclusively on the "indie" side of things, what really matters is that you use whatever is most familiar to you. Notch wrote Minecraft in Java--IMHO, a subpar language, particularly for performance intensive applications like games--because it was what he knew best and he was able to develop quickly and effectively.

tl;dr: Use what you know best. If you're entirely open to suggestion and want access to a massive number of existing resources for game developers, use C++.
Blue Dream
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 7
Joined: Sat Aug 24, 2013 4:42 pm

Re: C++ or C#?

Post by Blue Dream »

Well that's a real bummer. I guess it won't be hard to go back to C++ but that means I'm going to have to re-write my whole game...

Would it be ok to stick with SDL for C++ then? I already know a little bit of SDL.
User avatar
Nokurn
Chaos Rift Regular
Chaos Rift Regular
Posts: 164
Joined: Mon Jan 31, 2011 12:08 pm
Favorite Gaming Platforms: PC, SNES, Dreamcast, PS2, N64
Programming Language of Choice: Proper C++
Location: Southern California
Contact:

Re: C++ or C#?

Post by Nokurn »

Blue Dream wrote:Well that's a real bummer. I guess it won't be hard to go back to C++ but that means I'm going to have to re-write my whole game...

Would it be ok to stick with SDL for C++ then? I already know a little bit of SDL.
If you have a game going already, don't rewrite it. It's more important to finish it. Just try C++ on the next one if you're serious about it. Language experience really comes second to completion. If you're going to try to develop professionally, you want to build a portfolio.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: C++ or C#?

Post by dandymcgee »

You do realize that using C# doesn't mean you have to use XNA, right? You can use DirectX. You can use OpenGL. You could even write your own C# wrappers for SDL (or use the ones here this).

Personally, if I was going to write a game in C# I would use SFML. SFML.Net is written specifically for using SFML from a .Net language and is part of the official project: http://www.sfml-dev.org/download/sfml.net/. I prefer C# over C/++ for rapid prototypes because it's a million times faster to get things done. C/++ is great when you need to start worrying about performance (CPU and memory usage are quite difficult to control from C#) and system compatibility issues.

I haven't fiddled with SDL 2.0 at all, so I can't compare it to that.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: C++ or C#?

Post by Falco Girgis »

C++.
Blue Dream
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 7
Joined: Sat Aug 24, 2013 4:42 pm

Re: C++ or C#?

Post by Blue Dream »

Falco Girgis wrote:C++.
/thread
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: C++ or C#?

Post by dandymcgee »

Falco Girgis wrote:C++.
With SFML or SDL 2.0. Using SDL 1.2 and limiting yourself to software rendering would be a pretty dumb thing to do at this point (assuming you're not writing your own OpenGL).
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply