Jump to content
  • Advertisement
Sign in to follow this  
Angryjellyblob1

c++ or c# for 2d and 3d game creation?

This topic is 534 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My friend and I are currently learning the language C because we were told it's a great base language to learn. but we getting to the end of learning basic C and we are getting close to learning video game languages, but we don't really now what language to choose. I already started learning c++ but I did my research and found the community is mostly split between C++ and C# and I wanted GameDev.net's opinion on the subject and I had a few extra questions as well..

Which language is best with 3D game development?

Which language is best with 2D game development?

Which language is easiest to learn?

which language is the most complicated?

 

thanks,

 

-Matthew H.

Edited by Angryjellyblob1

Share this post


Link to post
Share on other sites
Advertisement

Most people don't use either, they use a game engine like unreal or unity and then do everything with the IDE and scripting. The scripts might be in C++ or C# but they could be in other languages as well, and arguably using a language for scripting is usually a much more simplistic usage of it than say, coding something from scratch in C++ using the STL and other third party libraries. There's a lot more involved using it stand alone vs for scripting.

 

Also there isn't really a "split" if you're talking about the basic language for most game engines out there, it's C++, not C#.

 

I usually advocate deciding based on what you want to do:

Do you just want to make and release games? Use a game engine.

Do you want to learn to program? Pick a language that suits your goals then.

Do you want to work in AAA development? C++ then.

 

We get a lot of people around here that want to make games and they assume the first thing they have to do is start coding, that's not necessarily true these days. That fact is specifically born out of the point that programmers are there to make things happen, they're there to make the game come together so as time has gone on we have developed more tools to let the non-technical people on the team(artists, audio folks, designers) modify game content without needing a programmer to help them do it. That also has the bonus of meaning you can more or less put together games now with very little complex programming if you so choose.

Share this post


Link to post
Share on other sites

If your goal is to write a game...and not a game engine... do like Kylotan said and get Unity.  In that case C# is your language.  If you write the engine (ill advised) I use C++ personally since it can be ported to all desktop and mobile systems for free.  But it is hard.  If you have never made a game before I would start with game maker & GML.  Matter of preference

Share this post


Link to post
Share on other sites

Is there a split? Choose what is more appropriate, and if it's your personal decision, also choose what's more comfortable and productive. You can't really go wrong with language. 

Share this post


Link to post
Share on other sites

My friend and I are currently learning the language C

If you want to learn a C based language or move onto an evolution of C. Then your only choices are C++ or Objective-C.

 

C# is *not* a C based language. It goes by that name purely for marketing by Microsoft a long while back. It is simply Microsoft's spin on Java (not Javascript).

 

That said. If you don't need to keep with a C based language and are happy to look at others, then C# could be a valid choice because it is at least "C styled" (in the same way as Java). Though I often hear that beginners find Python easier when starting out. Especially if they already have some knowledge of C since many of the functions are called similar (because it wraps libc closely).

Edited by Karsten_

Share this post


Link to post
Share on other sites

You've ask an incredibly decisive question, most people will give you there opinion. I will say from the start that i lean towards C++, but a also know c#. here is the breakdown- 

There are three levels of programming languages LOW, High, and Scripting.

C++ is a Low level( some will argue that its is a mid)

C# is High level ( can also be use as a scripting language)

 

low level languages are far more powerful because they give you full control over your process with little to no supervision. you will have to manage your memory, create trash collection, even define your own data types ( a string is NOT a primitive in C++). C++ is the de-facto language of professional game developers. with c++ you can write every thing from scratch or use a pre-built engine. the choice is yours.Some find this power intimidating and call c++ "hard". that not really true, but it will have the steepest learning curve. As you are coming from  C this may not matter to you. Like i said i lean towards C++, if you master this one, learning the other languages will be a snap.

 

High Level Languages run with-in an "interpreter", that is another program, usually called run-time environments. C# uses the .Net(dot net) framework. in order for your program to run on your target system, it must support .net(Iphone, for example don't). High level languages are still pretty powerful, and include a lot of features in the language, that you would have to implement yourself in low-level languages like memory management. this usually results in faster prototyping, as many details about the operating system are abstracted. ( for example, doing things like opening a file in the file-system, are much easier, C# doesn't care what platform you are on)  if this sounds appealing also check out Python, or Java.

 

Scripting Languages, You may have noticed some people tell you to download programs like unity or gamemaker studios. those programs use scripting languages. these are languages that give instructions to another program rather than to the computer itself. some of these programs will use established languages like unity and c#, while others will even create there own language like gamemaker studios and GML.( unity use C# syntax, but for this definition it is using it more as a scripting language than a programming language). Scripting language are usually very specialized. prototyping( getting a rough draft of your game) can be done virtually instantly, with little or no setup. I personally feel this puts you in a box, but its nice if you are trying to get out the gate. also check out JavaScript( not to be confused with java) and WebGL  

 

Conclusion: 

the answer to your question depends on your intentions. if you are learning programming for the sake of learning programming or because you are legit trying to get in the game creation industry; C++ hands down. if you like programming and want to have alot of ground covered for you, go with a High Level language, (keep in mind that c# is Microsoft proprietary, Java is equivalent and runs everywhere.). IF you've got a killer idea for a game and just want to jump right in without much concern for how it all works, learn Unity, GameMaker, or something of that nature.  

// have fun

var goal;

goal = input();
if(goal == 'learn programming'){

alert("Learn C++");
}else if(goal == "make a game fast"){

alert("learn UNITY"):
}else{
alert("check out Python or Java");
}


 

My friend and I are currently learning the language C

If you want to learn a C based language or move onto an evolution of C. Then your only choices are C++ or Objective-C.

 

C# is *not* a C based language. It goes by that name purely for marketing by Microsoft a long while back. It is simply Microsoft's spin on Java (not Javascript).

 

That said. If you don't need to keep with a C based language and are happy to look at others, then C# could be a valid choice because it is at least "C styled" (in the same way as Java). Though I often hear that beginners find Python easier when starting out. Especially if they already have some knowledge of C since many of the functions are called similar (because it wraps libc closely).

 

You are Partially correct. C# is Microsoft's version of Java, but Java itself is a C derivative. Java and C# are like half-brothers :P

Edited by Yeah_Phantom

Share this post


Link to post
Share on other sites

You've ask an incredibly decisive question, most people will give you there opinion. I will say from the start that i lean towards C++, but a also know c#. here is the breakdown- 

[...]

Sorry for the long wait for my reply I had a lot of stuff on my hands the past week or so and I think I neglected to mention my friend and I wanted to be indie game developers , but I'm here now so we can talk. So you said that if my goal was to learn programming than to learn c++ and If my goal was to make a game fast than I should learn Unity, How difficult is it to learn / utilize c++ in game programming? and would it be beneficial to me? A person that has little prior knowledge to coding other than C and who only has his friend to work with? I ask this because I know most AAA games use c++ and take years to make with possibly hundreds of people working on them. if my friend and I learn c++ what are the chances we can make an exceptional game in 2 years?

Share this post


Link to post
Share on other sites

Question: C++ or C#?

Answer: Yes.

 

If you're wondering where to start then it depends on where you're going. If you want to make something bizarre and performance intensive then go with C++. If you want to make something quickly that doesn't go too far off the beaten path in terms of computation then go with C#. In either case it's more about what middleware you want to use. If you like UE4 then learn C++ first. If you like Unity then learn C# first. If you like brain injuries then learn Java first.

 

Agreeing with Kylotan's earlier post, if you're asking this question then Unity may be a good place to start. It has a shallow learning curve but is still a professional-level tool.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!