C# better than C++ for me?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.

C++ or C#

C++
11
79%
C#
3
21%
 
Total votes: 14

LizardGamer
Posts: 83
Joined: Fri May 28, 2010 8:59 am
Location: Perth, Australia

C# better than C++ for me?

Post by LizardGamer »

I'm wanting to make games, I want to learn a programming language but I don't really want to become a full time programmer (I actually want to go to Uni in a couple of years to do 3d modeling). And then I thought because C++ is going to take a while to learn :shock: , why don't I learn to use something much simpler (like C#). :D

I myself think this can be a great idea, but I just want to ask because I know that C# can be used on Windows, Linux, Mac, Xbox 360 etc. but also can C# be used on Android or Iphone (or any other I-Product), because I know that Unity (programmed with C++ and C#) can be used on Iphone and Android.(And yes I know I would need to implement OpenGL ES :cry: ).

So what do you think?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Post by hendu »

Do you really want to limit yourself to Windows and xbox360?

Mono is available on linux, mac, android, wii etc, but it is not the full-featured stack you will likely be programming on.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I recommend Python. It's even simpler to learn, can be used on many platforms and has a wide range of uses (including coding scripts for Blender - which might interesting for you if you want to do modeling).

C# is certainly a great language, but personally I don't like betting on a platform that isn't completely open and is controlled by a single company.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Post by Luben »

C#. You will have a much, much higher probability of actually getting things done, won't be hampered by the language nearly as much and it'll probably be more rewarding. You can always transition to another language at a later time if you feel like it. You say you don't want to become a professional programmer, so there's no need for you to learn more than you need to. If C++ is a spork(You could take over the earth with a spork, given enough time and dedication and more time and some more time), C# is an intergalactic multitool, like the one Alyx uses to magically 'hack' stuff with in HL², or the ones found in Deus Ex, etc.
And you'll learn to develop general purpose programs in C#. Fast. Considerably faster than it'd take for you to make the same programs in C++. C# will become an asset for you, where C++ would become luggage until it'd been dragged along with you for longer than you'd wish.

If you really (really really) want to develop for iphones and/or androids, i'd say to go with Java, Java and/or Java, or don't go at all. ;)

(I'm not saying that you don't want to learn C++ though. It's great, setting all bad things aside, and given enough time. Well actually it's not that great, but more like a long-long-term investment which might pay off, maybe)
If you don't have anything nice to say, don't say anything at all.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

C++ is hardly any slower to program in than C#. In all honesty, C# isn't a whole lot simpler than C++. You could take a look at some of the xna examples (which would be more than likely the library you'd use with c#) and compare them to irrlicht or something like SDL to see which seems more intuitive. You could also try writing a few simple programs of your own in each language to see which one you're most comfortable with.
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

I'd use C++ for game programming because you can use it on all platforms and it's the basic language imo. It is easy to learn other languages after you learned C++. The only bad thing is that learning C++ takes long and it's hard to understand everything at first.
I don't like Python very much (I just did it at school) because everyone who want to run your program must have python installed. But it's very easy to use (so we did it at school ;)).
I use C# just for tools or other little programs because it's easy to use and I just work on windows.
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Post by Luben »

Lonesome Ducky wrote:C++ is hardly any slower to program in than C#
If you know what you'r doing. In real life, most people don't. Specially guys who are just starting out. Have you ever had problems with cyclic header dependencies, wierd compiler-implementation-defined behaviours, linking errors, linking errors as a result of order if linked libs, packing different runtimes into the same executable, using libs and dll's compiled with different compilers, had problems because of dll tls initializations, using pointers to things that've gone out of scope, had problems because of pointer packing in ints, had problems because a file didn't end with a newline, problems caused by the preprocessor such as a mostly harmless macro having side-effects, had hard-to-track-bugs because of inconsistencies in object files, had problems because of unspecified order of function parameter evaluation, had problems because of differently sized types (sizeof(int) == 4?), had using #pragma start emacs, ...
The list goes on. None if these problems are very easy to overcome if you'r just starting out, and some are hard even when you've been coding for a really long time. And i do include the time spent on idiocies when i speak of the speed with which i program.
If you don't have anything nice to say, don't say anything at all.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

I found c# even harder c++ when I started my programming journey. And now I still don't seem to want to do anything in c#, just can't make myself to do that, and maybe because I code on linux :P
Working on game: Marrbles (Currently stopped).
ChaiRuiPeng
Posts: 363
Joined: Thu Dec 16, 2010 8:50 pm
Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..

Post by ChaiRuiPeng »

serengeor wrote:I found c# even harder c++ when I started my programming journey. And now I still don't seem to want to do anything in c#, just can't make myself to do that, and maybe because I code on linux :P
same. i downloaded msvc because it seemed like a good tool to create "first newbie projects" on. but when i switched to codeblocks and gcc it made so much easier.

sure it was a bit of a shock to have to do so much, but i like it better because i feel more in control and once you get up the sharper learning curve you have much power.
ent1ty wrote: success is a matter of concentration and desire
Butler Lampson wrote: all problems in Computer Science can be solved by another level of indirection
at a cost measure in computer resources ;)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Sir_Hans wrote: I don't like Python very much (I just did it at school) because everyone who want to run your program must have python installed.
You can use py2exe to avoid that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

Oh, nice! Didn't know that. I tried a few things which said you can do that but they didn't work for me. I'll test it later...

EDIT: works for me :)
Last edited by Sir_Hans on Tue May 03, 2011 6:28 pm, edited 1 time in total.
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

Sir_Hans wrote:Oh, nice! Didn't know that. I tried a few things which said you can do that but they didn't work for me. I'll test it later...
Also you may use http://shedskin.googlecode.com - pure binary out.
Ravi08
Posts: 249
Joined: Thu Jul 17, 2008 12:25 pm

Post by Ravi08 »

Hi, i would suggest C#, i found it easier and quicker to learn than C++ and if your gonna develop for the Iphone and Android like Luben said go for Java. It was the first language i ever used/learnt and from my experience i found it very easy to learn and very easy to adapt to a new language like C++.

Hope this helps.

PS if you do go with C++ check this link to get a powerpoint to start you off.

http://hnlk.wordpress.com/2007/08/27/in ... actical-c/

The file is called "practical-c.ppt" and should be located under the first paragraph. I would highly recommend having a read though but its down to you.
"Hey Baby Wobbling Wobbling"
-Russell Peters
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

C# and Java are very good choices for learning basic programming concepts, they teach you everything you need to know for OOP and you don't have the burden of doing manual memory management (which is very confusing for C++ beginners, even if they have previous programming experience)

I would stick with either of these languages (or both, since they're pretty much alike) and move on to C++ when you feel you have a good grasp on all basic programming concepts
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

LizardGamer,

It depends on what kind of games do you want to develop. If you want a tool to implement your ideas (small ideas, small projects, you develop yourself only) then you probably want the result as quick as possible, so learning of the programming language should not take a lot of time. In this case i would recommend C#. It is a language where you can start do somthing a bit faster than in C++.

But, C++ is for sure more faster, more flexible and the native language of the graphics engine. In most cases C# must have a wrapper library that allows usage of C++ ones.
Post Reply