Programming languages are a form of communication, just like all languages are. However, instead of being used for human interaction, programming languages are meant for use between humans and computers. I also like to think of programming languages as the method used to communicate with the computer.
What are Programming Languages Used for?
The purpose of programming languages is to create software. All computer programs are made with some sort of programming language. Even your Windows or Mac operating system was coded with a programming language! These beauties are the backbone of software – including video games!
How Programming Languages Work
Programming languages don’t directly run computers. Computers can only work off of binary language, which is a massive combination of ones and zeroes. So how exactly do you get this programming language code converted into all of these ones and zeroes? Something called a compiler does this for us. Compilers are fed code from a programming language and produce executable files that we are able to launch as computer programs! Most of this can be accomplished behind the scenes, so you don’t need to worry about this process too much.
What Programming Languages Can I Choose From to Code With?
There are thousands of programming languages in existence. Which one you should use depends on the task at hand. This is analogous to traditional languages: if you are in the central plains of the United States, you’d speak English; if you’re in Mexico, Spanish would be the language of choice. Programming languages work the same way: if you are developing for iPhones, you’d use a different programming language than someone who is developing for Androids.
Instead of listing every single programming language, I’ve come up with my favorite ones to use:
- Python is perfect for beginners. It doesn’t have the same power other programming languages do, but it still packs a punch. Python is a good choice if you have no experience in game development.
- Java is arguably the most popular programming language in existence. It’s used in everything from printers to cell phones, and it makes some great browser games. (Minecraft, anyone?) Java is also used for Android games.
- C++ is great for desktop games. When used with the right tools, C++ can create professional-grade applications.
- Objective-C is used for all things Mac and iOS. If you’re looking to make an iPhone or Mac game, Objective-C is what you’re looking for.
Popularity of Various Programming Languages
As you can see, Java has quite the lead over other languages. This doesn’t necessarily mean it’s tons better than the other languages, though!
Getting Graphics and the Good Stuff Into your Game
Programming languages don’t actually provide enough functionality by themselves to incorporate graphics, sound, and other game components. You can only make text-based games in a command line if you only use a programming language. This is why programming languages are the backbone of software and video games: they need these things called libraries to implement graphics and other game components.
Gaining Ground with Game Engines
Building a game from scratch can be stressful and time consuming. Why not get a head start with a game engine? Game engines provide extremely easy ways to implement:
- Complicated math and physics
You get the idea – game engines give you tons of power without reinventing the wheel.
Additionally, game engines usually allow for very convenient scripting. Scripting is just like programming in the sense that you’re writing code, but scripting implies that you’re using a simpler programming language to easily automate tasks in your program.
For example, if you’re creating an RPG with a warrior character, the game engine might code all of his graphics and sound, but a script would control a specific quest he goes on. Scripts create specific tasks in a more efficient way than normal programming can. So if you use an existing game engine, there is the possibility that you only have to use scripting to create your game. Games can be created much faster using this method. If you’re a busy person then I recommend you consider using a game engine. You’ll see results much faster.
There are thousands of game engines out there. Wikipedia actually provides an awesome list of many of them here.
Unity is a great choice if you’re look to design a game with scripting. Although Unity is pricey, you can create breathtaking 3d games much faster than if you used a traditional graphics library. There are also trail and free versions of Unity.
Game Engines Vs. Graphics Libraries
If graphics libraries and game engines accomplish the same function, what’s the difference? The difference between the two is a very fine line. Sometimes the terms are used interchangeably. This is my favorite analogy for comparing game engines and libraries:
You can make pizza in many different ways. One possibility is buying the cheese, tomato sauce, and pepperoni separately; mixing the ingredients together; then throwing it in the oven. The end result is a pizza. Another way to make a pizza is to buy an already assembled pizza, throw it in the oven, and VOILA! You’ve just made another lovely pizza. Although the end result is the same, the processes are very different. Obviously in this scenario, libraries are like making the pizza from scratch, and game engines are like buying the pizzas already made. The quality may not necessarily even be different between the two. It’s simply a different method.
If you want to be technical, there are some pros and cons to each of the methods. When you use graphics libraries, you have the power to create almost anything you want. You face very few restrictions. However, you’re probably reinventing the wheel. With game engines, you have tons of functionality ready to be used with no issues – but there are some limitations in terms of control.
Click here for a more in depth analysis of game engines and graphics libraries.
Typing Out Code and Seeing it in Action
Like I said earlier, programming language code doesn’t just magically turn into a program. It needs to be run through a compiler to be converted into code that can be read by a computer. You can do this manually (not the recommended option), or you can download an IDE – Integrated Development Environment – to help automate the process.
When you compile your programs manually, you have to follow a very monotonous process: type your code into a text file, open up your command prompt, tell the compiler to link to your file… blah, blah, blah.
Instead, it’s much more common to use an IDE. IDEs provide:
- A text editor for you to type your code in
- One-click buttons that will build, compile, and launch your programs for you
- Visual representations of your program’s files
- Tools to help you find glitches and bugs
Trust me, when an IDE helps you find your first bug, you’ll be so happy you didn’t manually compile your program.
Be careful of what you’re downloading – Eclipse and Visual Studio offer separate IDEs for different programming languages. Read the webpages to know what you’re getting.
Making Games Without Writing Code
There are still options available to you to make video games if you refuse to write a line of code.
Modern to Me is more about creating software than using software, so I don’t endorse this route. But there are some programs out there that allow you to create games via drag and drop tools. Check out Game Maker Studio for a good drag and drop game maker tool.
View some more programming articles here:
Python Game Design
C++ Game Design
Java Game Design
Graphics Libraries for Programming Languages
An Overview on Game Design
Game Programming Tutorials
Tools and Resources for Game Making