Jump to content

  • Log In with Google      Sign In   
  • Create Account

Most Widely Used Programming Language (for games)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
45 replies to this topic

#1 Brick   Members   -  Reputation: 519

Like
0Likes
Like

Posted 17 September 2013 - 05:43 PM

So far I've learned a couple of programming languages that I found out weren't that useful for game development AFTER I put the time into learning them (the concepts certainly helped, though). I'm trying to avoid this mistake again by doing a bit more research first. The first thing that comes to mind is C++, but what programming language have you personally seen used the most in the context of game programming?



Sponsor:

#2 frob   Moderators   -  Reputation: 22736

Like
8Likes
Like

Posted 17 September 2013 - 06:40 PM

While major AAA games often have a C++ engine, they rely on many languages internally. Often they will have one or more scripting languages for game logic, plus additional languages used for tools and ancillary technologies.

Over my own career I have written games of varying quality in every one of these languages:
C
C++
C#
Java (standalone)
Java (applets)
Objective C
HTML + JavaScript
Pascal
Flash
Python
Assembly
COBOL (just one game as I learned the language for fun at age 15...)
Assorted forms of BASIC, including one for a DSP board.

Those are games that I have personal experience with.

Some of those games were very simple, such as 'guess the number' style games. Others were much more complex, including several AAA titles I have worked on. Some were just for fun because I had time to kill -- I worked with a traffic sensor company and we draw a little road that showed the cars as they drove by; I couldn't stop myself and threw in a simple frog-like sprite that could hop around the lanes.


Really it all depends on what you want to define a game as. I recall a comic strip years ago where people programmed two elevator shafts as paddles in a very large pong game.

Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#3 warnexus   Prime Members   -  Reputation: 1503

Like
0Likes
Like

Posted 17 September 2013 - 06:42 PM

What programming languages have you used? You should tell us this because we have people who are experience in different languages that can guide you more on this.

 

In the industry, it varies. AAA triple games use C++ and C for engine. C# for tools. Some of the casual game development company use ActionScript and C# for Window 8 games. I heard you can use Flash for Facebook games. Anyone correct me on this if I am wrong. You can use Java for Android apps.

 

It really depends on what platform your application is going to be on.

 

I learned game development with Java for 8 months now so I thought I give you advice on the subject.

 

Download an open source game project of the given language you are going to use. Look at how the codebase is laidout. In the Internet, you get some awesome games like Pong but their codebase written has horrible coding style. So look for a well-written codebase for a simple game. One of the best way to learn game development is to analyze the foundation of the codebase and start tinkering with the code instead of writing out the code one by one. Then start taking it apart and adding your own code.

Essentially, this step is the hands on work you want to have when learning game programming. Analyzing an open source game project eliminates a lot of the guesswork of what you still need to know to program something like pong. If you know pong, you have a better understanding to write a simple arcade shooter game. You want to improve and deepen your conceptual understanding with every game you write.

 

Generally, if you want to use C++, you can do that but the other step is learning the library that is compatible with C++. So you are actually learning two things when you are programming games. You will need to learn how to link a game programming library to the IDE you are using with C++. This applies to a lot of programming languages. You don't have to use C++. It really boils down to which language you know well enough out of the other ones you also know.

 

I used Java and it is a great language to learn for general programming and game programming. Java is one of those rare exception where it does have a built-in library where you can set up the graphics environment for your game yourself or you can also link a Slick2D library that does a lot of the heavy lifting in setting up the graphics environment for you. So you can just focus on the game logic which is very crucial for anyone starting out programming games.

 

Anyways, the key thing is not getting caught up with which language should I use, but what do I get out of using this language? It is just a tool. Once you learn one, you can apply the concepts you learn to another language while still learning something new.


Edited by warnexus, 17 September 2013 - 06:50 PM.


#4 rpiller   Members   -  Reputation: 706

Like
2Likes
Like

Posted 17 September 2013 - 07:34 PM

C++ & Lua and you should be good to go. I'd say these are probably the most common combination of compiled & scripted languages in the "professional" space.



#5 Buster2000   Members   -  Reputation: 1776

Like
7Likes
Like

Posted 18 September 2013 - 01:43 AM

Assuming that you mean Console and AAA PC games then C++.   However there are probably hundreds (thousands?) of games released on the web every day using Flash.
Whilst most Mobile games are written in C++ there are a lot of people using Objective - C on the iPhone and Java on Android.

 

There are of course many who keep telling everybody at games development conferences that the future of games is going to be JavaScript and HTML5.



#6 brunopava   Members   -  Reputation: 304

Like
2Likes
Like

Posted 18 September 2013 - 10:34 AM

If you want to work on indie games like me, I'd say the way to go is:

 

- C# or JavaScript to work with Unity3D;

- ActionScript 3 for flash games (and actualy you can compile and publish flash to android and ios);

- LUA to work with corona SDK (a great engine to develop games for mobile);

 

I think these are the main languages that I've learned over the years.

 

And of course there is C++, wich I think is the must know for all game developers.


Edited by brunopava, 18 September 2013 - 10:40 AM.


#7 ApochPiQ   Moderators   -  Reputation: 16401

Like
10Likes
Like

Posted 18 September 2013 - 11:48 AM

Keep in mind that "used the most" != "actually useful for your specific needs."



C++ has widespread penetration in the game dev market, but it's also a piece-of-shit nightmare. You can write a game in almost any non-toy language under the sun. Use the language you're most comfortable with, and get things done; fussing about with a dozen languages and never finishing a game is a great way to learn lots of things and never apply them to anything.

#8 Patrick B   Members   -  Reputation: 199

Like
0Likes
Like

Posted 18 September 2013 - 12:33 PM

I'm extremely biased here because I've been a Flash developer for many years, but I would recommend ActionScript/Flash for a number of reasons:

 

1. Portability: Between Flash and AIR, your code can reach just about any device and any OS. If you're careful how you code things, the same code can run as-is in both Flash (web) and AIR (desktop/mobile/tablet).

 

2. Penetration: AIR and Flash combined are installed on some 1.5 billion devices (http://www.adobe.com/ca/products/flashruntimes/statistics.html). Only Java (in the runtime category) comes close to that level of penetration. Practically, this means anywhere Flash or AIR run, your game will run. This includes limited BlackBerry support and, increasingly, smart TVs too.

 

3. Ease of use / power: I'm not going to pretend that ActionScript code can run at native (C++) speeds, but the runtimes have been greatly improved and run impressively fast. You get access to all of the older Flash APIs as well as extended AIR APIs which, collected, is not easy to stick together into one native game package if you're slapping together disparate libraries. Plus, you're guaranteed that your code will run the same way no matter which device or OS you're running on.

 

4. History: Adobe has been evolving Flash for many years now. It's a solid product and with AIR, exactly the same skills/language/tools are used to produce apps that run with native privileges. Adobe has built in many great features including direct GPU integration, networking and P2P abilities, fantastic audio support, top-notch video support, and many other features you'll be glad are there once you start building your game.

 

5. Control: Along with the improvements mentioned above, Adobe has done a lot to "open" up the Flash/AIR virtual machines. This means access to a lot more low-level data which previously would be handled in the background by the runtime. A simple example of this is the sound API which previously could be used to control loaded audio, but the audio data itself remained hidden in memory and protected by the runtime. That data has been opened up as of a few versions ago, opening up raw audio data for applications such as realtime sound effects, software-based audio synthesis, and other useful functionality.

 

That being said, I would stay away from using Flex / FlashBuilder for producing your game. Great products for coding, but for visual design the old Flash IDE is best. If you're on a budget, FlashDevelop is a great IDE that easily competes with Adobe's commercial products.

 

At the end of the day, ActionScript is the language that powers both Flash and AIR, and it's also closely related to JavaScript and Java so it's a great "gateway" language too. If top-notch performance is a concern, Flash and AIR may not be the best solution (there's a reason it's called ActionSCRIPT), but you can produce impressive games without the hassle of lower-level languages like C++.

 

My highly biased two cents ;)


Edited by Patrick B, 18 September 2013 - 12:41 PM.


#9 Irlan   Members   -  Reputation: 1802

Like
1Likes
Like

Posted 23 September 2013 - 05:40 PM

After 2 years of consecutive C++ the other languages (except ASM) are extremely easy to understand.
So go with C++.

"Information is not knowledge. The only source of knowledge is experience." - Albert Einstein

Irlan Engine: http://robsrc.wordpress.com/


#10 RobTheBloke   Crossbones+   -  Reputation: 2341

Like
5Likes
Like

Posted 25 September 2013 - 04:18 AM

 

After 2 years of consecutive C++ the other languages (except ASM) are extremely easy to understand.
So go with C++.

 

 

... and it'll only be another 8 years or so, until you start to understand C++! :P



#11 DekuTree64   Members   -  Reputation: 986

Like
0Likes
Like

Posted 25 September 2013 - 05:49 PM

C++ for game/engine code, C# for tools.

 

I've also seen some pretty fancy build process stuff done in Perl and makefiles. Perl makes no sense to me. I'm decent with Make, but not expert.

 

Personally I like C and assembly for game code and C++ for tools... but I mostly do SNES style games.

 

I love the blood red "language war" tag on this thread laugh.png


Edited by DekuTree64, 25 September 2013 - 05:50 PM.


#12 Vilem Otte   Crossbones+   -  Reputation: 1561

Like
2Likes
Like

Posted 25 September 2013 - 05:59 PM

Write in C - because it is just so awesome and simple. Also there are other reasons that Torvalds would tell you - here is a link for fun - http://harmful.cat-v.org/software/c++/linus

 

I personally hate virtual machines and interpreted languages, so for me - everything that is not interpreted is fine.


My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com


#13 Cornstalks   Crossbones+   -  Reputation: 6991

Like
11Likes
Like

Posted 25 September 2013 - 06:13 PM

Write in C - because it is just so awesome and simple. Also there are other reasons that Torvalds would tell you - here is a link for fun - http://harmful.cat-v.org/software/c++/linus

Linus does kernel development, not game development. His choice of C over C++ for a kernel actually makes sense. But sure, that email was on the Git mailing list and was about rewriting Git in C++, but remember that when Linus talks about trying C++ in 1992, C++ hadn't even been formally standardized (and wasn't for another 6 years after that). A good amount of his whining has to do with a) old/pre-standardized C++, b) kernel development (not game development, which typically uses a lot of scripting, actually), and c) the fact that he's prejudiced (honestly, he is).

I won't tell people to not use C. It's used enough, and unlike C++ actually has a standardized ABI. There are dozens of languages one can use (and often on any given game, multiple languages will be used in making it). But Linus's rants are pretty much irrelevant when it comes to game development.
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#14 Bacterius   Crossbones+   -  Reputation: 9282

Like
0Likes
Like

Posted 26 September 2013 - 02:40 AM


I love the blood red "language war" tag on this thread

 

Yes, it has seen a revival lately.. very appropriate.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#15 SimonForsman   Crossbones+   -  Reputation: 6306

Like
0Likes
Like

Posted 26 September 2013 - 02:59 AM

 

There are of course many who keep telling everybody at games development conferences that the future of games is going to be JavaScript and HTML5.

 

For casual web/mobile games that is very likely to be true in the near future (possibly with some native ties to the platforms marketplace for in-game purchases in cases where the platform lacks a JS accessible API for it), the ease of deployment across the primary platforms for such games (facebook, various webgame portals and mobile phones/tablets) is a huge advantage.

 

for big AAA titles its unlikely to ever become popular.


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#16 fir   Members   -  Reputation: -456

Like
0Likes
Like

Posted 26 September 2013 - 03:04 AM

I'm extremely biased here because I've been a Flash developer for many years, but I would recommend ActionScript/Flash for a number of reasons:

 

1. Portability: Between Flash and AIR, your code can reach just about any device and any OS. If you're careful how you code things, the same code can run as-is in both Flash (web) and AIR (desktop/mobile/tablet).

 

2. Penetration: AIR and Flash combined are installed on some 1.5 billion devices (http://www.adobe.com/ca/products/flashruntimes/statistics.html). Only Java (in the runtime category) comes close to that level of penetration. Practically, this means anywhere Flash or AIR run, your game will run. This includes limited BlackBerry support and, increasingly, smart TVs too.

 

3. Ease of use / power: I'm not going to pretend that ActionScript code can run at native (C++) speeds, but the runtimes have been greatly improved and run impressively fast. You get access to all of the older Flash APIs as well as extended AIR APIs which, collected, is not easy to stick together into one native game package if you're slapping together disparate libraries. Plus, you're guaranteed that your code will run the same way no matter which device or OS you're running on.

 

4. History: Adobe has been evolving Flash for many years now. It's a solid product and with AIR, exactly the same skills/language/tools are used to produce apps that run with native privileges. Adobe has built in many great features including direct GPU integration, networking and P2P abilities, fantastic audio support, top-notch video support, and many other features you'll be glad are there once you start building your game.

 

5. Control: Along with the improvements mentioned above, Adobe has done a lot to "open" up the Flash/AIR virtual machines. This means access to a lot more low-level data which previously would be handled in the background by the runtime. A simple example of this is the sound API which previously could be used to control loaded audio, but the audio data itself remained hidden in memory and protected by the runtime. That data has been opened up as of a few versions ago, opening up raw audio data for applications such as realtime sound effects, software-based audio synthesis, and other useful functionality.

 

That being said, I would stay away from using Flex / FlashBuilder for producing your game. Great products for coding, but for visual design the old Flash IDE is best. If you're on a budget, FlashDevelop is a great IDE that easily competes with Adobe's commercial products.

 

At the end of the day, ActionScript is the language that powers both Flash and AIR, and it's also closely related to JavaScript and Java so it's a great "gateway" language too. If top-notch performance is a concern, Flash and AIR may not be the best solution (there's a reason it's called ActionSCRIPT), but you can produce impressive games without the hassle of lower-level languages like C++.

 

My highly biased two cents ;)

 

Flash seem to have a very good quality and is interesting -

I never used it. But the two question comes to my mind, could

you ansewr :

 

- is there some free environment where you can make games and not pay for it? Is there some lightweight environment to build flash programs (how many megabytes to download?)

 

- what with right mouse button click?, when i play flash games 

(recently played one whole day) It is always strange feeling 

of not being able to use right mouse button


Edited by fir, 26 September 2013 - 03:05 AM.


#17 Patrick B   Members   -  Reputation: 199

Like
0Likes
Like

Posted 25 December 2013 - 08:38 AM

FlashDevelop is a free Flash/AIR IDE that I use regularly: http://flashdevelop.org/

Apache Flex is another free Flash/AIR IDE based on Eclipse and given royal approval by Adobe: http://flex.apache.org/

 

These are pretty much complete solutions with the exception of the graphics/motion editor built into the standard Flash IDE. When I was first learning Flash and OOP, I found it extremely useful to have the graphical editor -- it visually represented the code structure behind it. However, anything you can do in the Flash IDE can be replicated using ActionScript so it's not absolutely necessary.



#18 Chris_F   Members   -  Reputation: 2462

Like
1Likes
Like

Posted 25 December 2013 - 12:42 PM

Why not Fortran?



#19 Gedalya   Members   -  Reputation: 124

Like
0Likes
Like

Posted 25 December 2013 - 08:43 PM

I've known a couple of associates strung out over Java.

However, I myself when offered the choice between C, C++, and C#, chose C++. . . and so that's where my loyalties lie.

To me as an independant learner, it was the easiest among those three to understand.


גדליהו


#20 metsfan   Members   -  Reputation: 654

Like
3Likes
Like

Posted 26 December 2013 - 10:04 AM

I'd say that your goals are the most important thing in choosing a language.  Are you trying to get a job in the game industry? Or just make a small game for fun?  Or are you looking to make money?  Is the game going to be 2D or 3D?  If your goal is to land a job at a AAA studio doing game or engine development, then you HAVE TO learn C++.  If you just want to make a game for fun or to make money, pick a higher level language, like C#, Java, or Objective-C.  Performance is only going to matter if you have a very CPU intensive game (such as a first person shooter or any other game with lots of physics calculations).  Most of the work these days in games is done on the GPU, which is irrelevent of language.  If you are making a 2D game, these factors are even less relevent, and you can basically choose any language you want which has a high level 2D graphics library.

 

Best of luck.

 

C++ has widespread penetration in the game dev market, but it's also a piece-of-shit nightmare.

 

Anyone who describes C++ as a "piece-of-shit nightmare" clearly hasn't used C++11.  C++11 is a great language with speed that can only be surpassed by assembly, and freedom and expressiveness on par with Scala. 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS