• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Kixdemp

C++ or C#?

51 posts in this topic

Hello everyone! I'm making a multiplayer game, style of Soldat and the new Liero clones... But I'm stuck, I don't know if I should do it in C++ or C#... I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#? Thanks! [grin] PS: I meant C Plus Plus, but it doesn't let me display the pluses...
0

Share this post


Link to post
Share on other sites
Couple things, firstly, there was a thread just a couple hours ago by the title of "C# or C++?". Before that, there have been quite litterally hundreds of threads addressing this same issue. Searching is a Good Thing.

Secondly, you've already answered your own question. You prefer C# by a large amount. Use it. Just go ahead and use it.
0

Share this post


Link to post
Share on other sites
I'd say unless you are making some AAA title where you need to eek every last bit of performance out the machine by hand coding memory management and SIMD code .. go with what you like. For the style game you are trying to make, C# is more than enough. Going with what you are comfortable with and actually getting something done is much more important than getting a few more fps.

-Dranith
0

Share this post


Link to post
Share on other sites
Sorry 'bout that... I would never have imagined that was such a popular topic... [embarrass]

But yeah, I Googled it a bit, thought about it, and yeah... C# [cool]
Thanks! [grin] (and sorry for being teh n00b)
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.


Are you TRYING to start a battle?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Surg
Quote:
Original post by Promit
Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.


Are you TRYING to start a battle?


Nope, but as it looks like he can handle c# much better than c++, the chances are big that he get better performance out of his c# work, than his c++ work. not to say, chances that he actually get the work done are much bigger then, too.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Surg
Quote:
Original post by Promit
Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.


Are you TRYING to start a battle?

Why would he be starting a battle? All he did was answer the question perfectly. The OP already knows the C# language and anticipates difficulty in some areas of C++. Right there alone should tell you that performance wise C# would be the ideal language to use. The only people that would say otherwise are not software engineers, they are language evangelists.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
He asked. I answered. (And answered truthfully, I might add.)
And also in a way which is sure to get counterarguments. You seem to love defending C#, mr. Microsoft fanboy.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
You seem to love defending C#, mr. Microsoft fanboy.
At least I have the spine to be somebody and to have views. I don't need to hide behind anonymous posting, and I don't need to sugar-coat reality for the sake of political correctness or whatever the hell it is that people seem to expect these days.
0

Share this post


Link to post
Share on other sites
To build upon what has already been said: C++ is not a magic wand that makes your program run faster. On average, the two languages are equivalent, with C++ coming out ahead in a significant way only in the hands of experienced programmers who took the time to optimize bottlenecks in their code.

If you are not an experienced C++ programmer, you should not and cannot expect any kind of automatic performance gain: on the contrary, you might achieve worse performance with C++ because you are not used to its idioms and the language does not take care of certain optimizations for you.

You can choose to learn C++ thoroughly and then spend additional time optimizing the game, but this will probably triple or quadruple the time that you will spend creating your game.
0

Share this post


Link to post
Share on other sites
I think you've already got this, but you should use C# since you clearly prefer it and are therefore likely to be much better at writing good code.

If you want to take on C++ at some stage that would probably be a good thing, but you shouldn't do a big project like a decent game in a language with which you don't feel comfortable.
0

Share this post


Link to post
Share on other sites
One note: I've never fooled with C#, but I understand that it's harder to write cross platform code with it. I'm not sure though. Will someone either back me up or shut me up?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
Original post by Promit
He asked. I answered. (And answered truthfully, I might add.)
And also in a way which is sure to get counterarguments.


I've not seen any actual counterarguments yet. Those counterarguments need only be addressed should they be raised. There's already been enough argument in favor of C# that no further elaboration is needed.

Quote:
You seem to love defending C#, mr. Microsoft fanboy.


Kind of like how you seem to love circumventing (IP) bans, Mr. AnonJavaDev?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by NIm
One note: I've never fooled with C#, but I understand that it's harder to write cross platform code with it. I'm not sure though. Will someone either back me up or shut me up?
It's not harder per se, though there are areas of the framework that you may have to avoid. (System.Windows.Forms is one of the sketchy parts.)

What sucks, though, is that the dev tools are not that evolved, especially on Mac. Doing C# work on OSX was a miserable experience. Sure the programs compiled and ran and even rendered, but it was akward, to say the least.
0

Share this post


Link to post
Share on other sites
Quote:
Kind of like how you seem to love circumventing (IP) bans, Mr. AnonJavaDev?

LOL.

Yeah, I'll do it in sharpie, and when I feel I'm ready for plusieplusie, I'll do it in that. [wink] (plusieplusie - I sound like a girl... [razz])

Thanks you all for your replies! [grin]
0

Share this post


Link to post
Share on other sites
Quote:
Original post by NIm
One note: I've never fooled with C#, but I understand that it's harder to write cross platform code with it. I'm not sure though. Will someone either back me up or shut me up?
Incorrect, compiling with Mono will give you an executable file that you can use on all Mono-compatible platforms (Linux, Windows, Mac, etc). Mono has implemented most of both .NET 1.1 and 2.0.
0

Share this post


Link to post
Share on other sites
Question about Mono from a Mono newbie.

An app compiled with mono can be run as-is on other platforms? As in, I compile a Mono app in windows, I can run that executable in OSX, Linux, other mono supported platforms? I don't have to recompile or anything? The target platform just needs mono installed? Just trying to clarify if thats what you mean. Thanks

J
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.


While I understand why you answered the way you did, I think the way you said it merely will cause massive arguments. If he prefers C# a million times over, of course his C# code will wind up being better than his C++ code. But the way you said it sounded as if you were implying that C# is a (significantly?) faster language in general, which is where all the fighting will come in.

I'd consider being a little less vague about your commentary. It'll make these kinds of topics a better place to be in and not one to avoid.

I love both languages really, but I never really liked Managed DirectX that much. (mainly because it's so similar yet so different from Unmanaged DirectX, leading to confusing moments)
0

Share this post


Link to post
Share on other sites
When I said "Are you trying to start a battle" I was talking about how saying things like that without explaining yourself often start battles.

Oh, and look what happened.
0

Share this post


Link to post
Share on other sites
"C# is faster than C++". That seem pretty bold to me

It would seem with all the "expert engineers/programmers" someone would confirm that C# is faster than C++ by publicly posting their testing environments for scrutiny. When the hypothesis that C# is faster than C++ is proven, it would no longer be considered irresponsible to make such a claim.

It seems like there are plenty "C# is God's native tongue" people with an agenda so I don't see any lack of motivation to prove their point. However, I have seen no effort to do so.
0

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  
Followers 0