Jump to content
  • Advertisement
Sign in to follow this  
Brick

Most Widely Used Programming Language (for games)

This topic is 2025 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

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?

Share this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!