The field of video game design is exploding. As more and more games are being made and gaining traction, the need for more game designers and developers is only increasing. It’s also a profitable business, with the median annual wage of game developers reaching around $100k.
One of the most important choices going into a game design career is picking which language or languages to learn for coding games. While all of the popular languages have a reason they compete in their field, I want to take a moment to examine Java as an option for game development.
Java might sound familiar if you’re a fan of video games. Back in 2011, Minecraft was created using Java. Minecraft is one of the one of the best-selling video games of all time and one of the most popular games that run on Java. In 2014, Microsoft bought Minecraft and Mojang for $2.5 billion. This might reasonably lead you to believe that making games with Java is a good idea.
Below we will break down what Java is, and whether you should pick it up to start your game design career.
What is Java?
Java has been around a while. It was released in 1995 by Sun Microsystems (the company we know today as Oracle). It’s a general-purpose programming language, so it was designed for multiple applications (not just games). Java is class-based and object-oriented, and it stands out as being designed to have as few dependencies in implementation as possible. This means that it was designed with the idea that you would only need to compile Java code once, and that it would run anywhere that the Java platform is supported.
Java is widely used. It’s considered to be one of the most popular languages in the world, with applications in machine learning, big data, and web development. Being a Java developer is actually a pretty great job. The big question here is whether it’s viable as a coding language for game design.
Java for Game Development
I’ve heard a lot of opinions on whether Java is good for game design. They range from ‘Java is great’ to ‘Java is useless for game design.’ The actual answer is a bit more complicated, however.
Using Java for game design depends on use case, so we’ll break it into the following three categories:
- AAA games
- Indie games
- Mobile games
Triple A games constitute the blockbuster movies of the game industry. They are Overwatch, or Call of Duty, or God of War. They are developed by enormous teams of people over years of development time, and they sell millions of copies. They also make blockbuster movie-like profits. If this is the field you would like to work in, I have some bad news about Java.
Seeing big AAA games made in Java is very rare. Even the largest game made with Java, Minecraft, has been rewritten in other languages. Why? Because modern consoles don’t support Java games.
If you’re making a high profit game with a huge reach then hitting console targets is important. While Java games can be rewritten to work on consoles, it’s generally easier to make these types of games in C++ or C#.
Indie games occupy a different market. Made by smaller teams or even individuals, these games don’t push the limits of technology. They develop loyal fan bases and cult followings. While they don’t have the reach that multimillion dollar triple A games do, they are still a profitable industry gaining in popularity.
Here it is easier to implement Java, as most indie games live on PC. However, there are still drawbacks. Java isn’t designed for game development. It can be made easier with tools like LibGDX, but ultimately you end up fighting yourself to make games run smoothly.
One example of this is the garbage collection. Java features garbage collecting, which you can think of as throwing out old code you aren’t using at the moment to save space and reduce bugs. However, in Java, the garbage collector is non-deterministic. This can cause serious performance issues in games and has to be worked around to prevent these performance issues.
Mobile can easily be considered the best target for games developed in Java. It’s one of the primary languages used for developing Android games, and it runs fantastically on Android systems.
However, there are some caveats. The foremost is that Java does not run on iOS. If you make a mobile game in Java, you would be limiting yourself to an Android-only market. Beyond that, most games on the Android marketplace aren’t actually coded in Java, they’re written in another language and then wrapped in Java so they can function on Androids.
In the end, Java is a powerful language in use with multiple applications around the world. However, if you’re wondering how to make video games with Java, you should know that Java is useable but not preferable. You will gain more traction in the game design industry with languages designed for games or languages that have more extensive support for designing games.