Sign in to follow this  
Davatech

What programming language is best for games?

Recommended Posts

Hello everybody... I am looking to program 3D games; however, I am still deciding which programming language is best for this. I am thinking C# at this time, but I thought maybe I should get the opinions of a few other people first. All of the questions I have are listed below... 1. Can the C# programming language basically do everything that the Visual Basic, Java, J#, C, C++, and managed C++ programming languages can do? -As I have no background in any other programming language except HTML, PHP, XML, CSS, ect... (plus basic C#) 2. Is there a "better" programming language than C#? 3. Is C# good for games? 4. Can C# be used to develope good (big) graphical 3D professional games? For example: C&C Red Alert 2 - http://www.westwood.com C&C Generals - http://www.westwood.com C&C Renegade - http://www.westwood.com The Sims 1&2 - http://www.thesims.com Star Wars Battlefront 1&2 - http://www.lucasarts.com Battlefield 1942 - 2 - http://www.ea.com Joint Operations - http://www.novaworld.com Splinter Cell - http://www.splintercell.us.ubi.com Ghost Recon 1&2 - http://www.ghostrecon.com/us Halo 1&2 - http://www.xbox.com/en-US/games/h/halo/ ect... 5. What other operating systems is C# capable of running on besides Windows? Or is it possible to make games for gamming consoles with C#? For example: Xbox, Nintendo, Playstation, ect... 6. Can C# use other resources for its graphics besides DirectX? 7. Which do you think is best, DirectX or OpenGL? Or is there another? Thanks to anybody for any help!

Share this post


Link to post
Share on other sites
Sigh, why does this keep coming up? Whether one thing is better than another is either an opinion, dependent on the specific task, or both.

But, I can answer questions 1 and 4:
1. Well, it can preform all of the same computations. All of the languages you've listed (except the markup languages and CSS) are Turing-equivalent. Basically, that means the can preform all computations which are decidable across Turing machines (Turing machines are computers, basically).

4. Yes, it can, like almost every other fairly well-used language.

Share this post


Link to post
Share on other sites
Quote:
Original post by bballmitch
Most video games made for xbox, ps2, PC, and gamecube are made in C++. Thats most, not all.


So C# CAN be used to develope games for gamming consoles?

Share this post


Link to post
Share on other sites
Sounding a little ambitious ehh..

Considering that you are a new member and are asking on which programming language is suitable for 3D development, I would reccomend you take a look at this.

Besides that, C# is an exellent beggining language to start with (I myself use it). And concerning DirectX, yes you can get it to work with C#.

Programs made from C# are able to practically run on any OS that has the .NET framework installed. Unfortunatly, the .NET framework is only compatible with certain OS's; therefore limiting you somewhat.

And when it comes to any type of language or API, there is not exactly a 'better one'. They all have their strengths and weaknesses.

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
Quote:
Original post by bballmitch
Most video games made for xbox, ps2, PC, and gamecube are made in C++. Thats most, not all.


So C# CAN be used to develope games for gamming consoles?


He said C++, not C#.

Share this post


Link to post
Share on other sites
Quote:
Original post by Roboguy
Quote:
Original post by Davatech
Quote:
Original post by bballmitch
Most video games made for xbox, ps2, PC, and gamecube are made in C++. Thats most, not all.


So C# CAN be used to develope games for gamming consoles?


He said C++, not C#.


I was looking at "thats most, not all" when I posted that...

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
Quote:
Original post by Roboguy
Quote:
Original post by Davatech
Quote:
Original post by bballmitch
Most video games made for xbox, ps2, PC, and gamecube are made in C++. Thats most, not all.


So C# CAN be used to develope games for gamming consoles?


He said C++, not C#.


I was looking at "thats most, not all" when I posted that...


C++ and C# are not the only languages...

Share this post


Link to post
Share on other sites
100% C# with DirectX is likely the best way to start to learn 3D game programming. Once you have the concepts for game development down, you can move on to the more complex/difficult-to-use (but faster, currently more portable) C++.

As a beginner, don't worry about making a large, commercial sized game. Start making small, simple games in C#, then gradually make larger games (the difficultly in writing larger software projects is exponential; twice the code size = ~4x the time+complexity to develop and maintain).

I've been writing code in C++ since the language was created (you used a C++ translator to pass to the C compiler: straight C++ compilers did not exist). I recently used C# + WinForms for a project, and wholeheartedly recommend using C# for everything except ultra-time-critical code (C# is becoming more portable, but is not as portable as portably-written C++ (ifdefs, etc., must be used to make C++ portable between various compilers/environments)). Once C# support packages (such as WinForms) are fully ported, C# will be quite portable (without the need for ifdefs, etc., much in the same way Java was promised to be 'write once, run anywhere').

My current game uses OpenGL; a future revision will move to DirectX, as it appears that using DX9+ will allow higher performance, and is now just about as easy to use as OpenGL. Once you understand the concepts, switching between OpenGL and DirectX is straightforward (does not really matter which one you use; though it appears DX has been better optimized in recent years for game applications (even 3DSMax appears to run faster with DX).

In summary, once you learn the concepts of game development and graphics programming, you can switch between languages and API's without too much trouble.

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
Roboguy, you have lost me...


The statement you made implied that you believed that C++ and C# are the only languages:
bballmitch said that most, but not all, games on various consoles are made using C++.
You said "So C# CAN be used to develope games for gamming consoles?"
That would only be definitely true, given that information, if C++ and C# are the only languages.

Share this post


Link to post
Share on other sites
Quote:
Original post by Roboguy
Quote:
Original post by Davatech
Roboguy, you have lost me...


The statement you made implied that you believed that C++ and C# are the only languages:
bballmitch said that most, but not all, games on various consoles are made using C++.
You said "So C# CAN be used to develope games for gamming consoles?"
That would only be definitely true, given that information, if C++ and C# are the only languages.


Yes, I understood that there were other languages capable of this, but I was focusing most on C# in that post...

Share this post


Link to post
Share on other sites
Quote:
Original post by John Schultz
100% C# with DirectX is likely the best way to start to learn 3D game programming. Once you have the concepts for game development down, you can move on to the more complex/difficult-to-use (but faster, currently more portable) C++.

As a beginner, don't worry about making a large, commercial sized game. Start making small, simple games in C#, then gradually make larger games (the difficultly in writing larger software projects is exponential; twice the code size = ~4x the time+complexity to develop and maintain).

I've been writing code in C++ since the language was created (you used a C++ translator to pass to the C compiler: straight C++ compilers did not exist). I recently used C# + WinForms for a project, and wholeheartedly recommend using C# for everything except ultra-time-critical code (C# is becoming more portable, but is not as portable as portably-written C++ (ifdefs, etc., must be used to make C++ portable between various compilers/environments)). Once C# support packages (such as WinForms) are fully ported, C# will be quite portable (without the need for ifdefs, etc., much in the same way Java was promised to be 'write once, run anywhere').

My current game uses OpenGL; a future revision will move to DirectX, as it appears that using DX9+ will allow higher performance, and is now just about as easy to use as OpenGL. Once you understand the concepts, switching between OpenGL and DirectX is straightforward (does not really matter which one you use; though it appears DX has been better optimized in recent years for game applications (even 3DSMax appears to run faster with DX).

In summary, once you learn the concepts of game development and graphics programming, you can switch between languages and API's without too much trouble.


John Schultz, What do you think about Managed C++ vs. Managed C#?

Share this post


Link to post
Share on other sites
Quote:
Original post by vrok137
Considering that you are a new member and are asking on which programming language is suitable for 3D development, I would reccomend you take a look at this.




That's probably too complicated for initial 3D development.

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
John Schultz, What do you think about Managed C++ vs. Managed C#?


Managed C++ simply (or not so simply) exposes C# elements to C++. Stick with 100% C# until you written a few simple games, then if you need to optimize certain sections, use Managed C++ to bridge pure C++ to C#. You'll probably want to learn C++ by itself after you are comfortable with C# (don't jump in and start using Managed C++ before you are comfortable with both C# and C++ by themselves).

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
Can C# be used to add graphics to movies and whatnot?


It *could* I guess, but you would probably want to use something more high-level and specific to that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
Can C# be used to add graphics to movies and whatnot?


Yes. You can do just about anything in C# (except, for example, inline assembly). You can grab a copy of Visual Studio C# Express (free download) and start learning right away (also download the DX SDK: lots of C# examples you can compile and play with).

Share this post


Link to post
Share on other sites
Quote:
Original post by Roboguy
Quote:
Original post by Davatech
Can C# be used to add graphics to movies and whatnot?


It *could* I guess, but you would probably want to use something more high-level and specific to that.


Like what?

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
Quote:
Original post by Roboguy
Quote:
Original post by Davatech
Can C# be used to add graphics to movies and whatnot?


It *could* I guess, but you would probably want to use something more high-level and specific to that.


Like what?


Like I said in my post, something specifically for that.

Share this post


Link to post
Share on other sites
Quote:
Original post by John Schultz
Quote:
Original post by Davatech
Can C# be used to add graphics to movies and whatnot?


Yes. You can do just about anything in C# (except, for example, inline assembly). You can grab a copy of Visual Studio C# Express (free download) and start learning right away (also download the DX SDK: lots of C# examples you can compile and play with).



I have already downloaded the latest versions of everything I need :)

How would I use C# to add graphics to movies and stuff? Or is it pretty much the same as making a 3D game?

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
I have already downloaded the latest versions of everything I need :)


Cool.

Quote:
Original post by Davatech
How would I use C# to add graphics to movies and stuff? Or is it pretty much the same as making a 3D game?


Adding 2D graphics (alpha overlays, etc.) is similar to making 2D games (or 2D elements of a 3D game).
Start by working through the DX SDK examples after you've learned the basics of C# (the language, learn the (IDE) tools, how to debug/step code). Once you are proficient at the C# language and development tools, you'll have a better idea about how to add 2D graphics to video (IIRC, a DX example streams video into a texture, could be modified as needed).

Share this post


Link to post
Share on other sites
Quote:
Original post by Davatech
Quote:
Original post by John Schultz
Quote:
Original post by Davatech
Can C# be used to add graphics to movies and whatnot?


Yes. You can do just about anything in C# (except, for example, inline assembly). You can grab a copy of Visual Studio C# Express (free download) and start learning right away (also download the DX SDK: lots of C# examples you can compile and play with).



I have already downloaded the latest versions of everything I need :)

How would I use C# to add graphics to movies and stuff? Or is it pretty much the same as making a 3D game?


Please download the latest DirectX 9.0 SDK and start learning from it, you may need book like 'Managed DirectX Kick Start' (written by Tom Miller, I guest). And start coding. Just asking may not give you everything you want.

Share this post


Link to post
Share on other sites
Quote:
Original post by John Schultz
Quote:
Original post by Davatech
I have already downloaded the latest versions of everything I need :)


Cool.

Quote:
Original post by Davatech
How would I use C# to add graphics to movies and stuff? Or is it pretty much the same as making a 3D game?


Adding 2D graphics (alpha overlays, etc.) is similar to making 2D games (or 2D elements of a 3D game).
Start by working through the DX SDK examples after you've learned the basics of C# (the language, learn the (IDE) tools, how to debug/step code). Once you are proficient at the C# language and development tools, you'll have a better idea about how to add 2D graphics to video (IIRC, a DX example streams video into a texture, could be modified as needed).


What I ment was, how do I add 3D graphics into a movie?

Share this post


Link to post
Share on other sites
Quote:
Original post by Roboguy
Quote:
Original post by Davatech
Roboguy, you have lost me...


You said "So C# CAN be used to develope games for gamming consoles?"
That would only be definitely true, given that information, if C++ and C# are the only languages.


Davatech asked a question if C# was used to develop games on a console other than the ones specified. It was quite obvious to me it was a question because of the question mark. It was not a statement.

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