Game Development - Quickstart (Part 2/2)

4개월 전

Welcome to the second part of the GameDev Quickstart which should help you to get started in the fabulous world of game development.
If you haven't already, please read the first part before.

pexelsphoto577585.jpeg
Image Source


Selecting A Programming Language

To be able to program your own games, you must of course first learn to code. There are also programs that can be used to develop a game without much programming effort (e.g. RPG Game Maker). We do not want to go into these here, however, as they usually severely restrict the developer.
If you really program your game yourself, you have maximum freedom in implementing your ideas (which also means more work).

Anyone who intends to learn programming must first decide on a programming language.
In this language the programs are written by the programmer (source code) before they are translated into a form that can be executed by the computer. Today there is an almost unmanageable number of programming languages, and some of them differ greatly from one another. Fortunately, for us as game programmers only a relatively small group of languages ​​is of interest, because not all programming languages ​​mare made to program games.

Let us take a closer look at what we consider to be the most important of these languages ​​in question. You can program games with all of these languages, but they all have their own characteristics. This is only intended to give you a first impression of the respective programming language. We examine each language under the following aspects:

Convenience and ease of entry

The amount of source code that one has to type in the various programming languages ​​in order to carry out certain calculations / algorithms varies greatly. What is done with 10 lines of code in one language may require 50 lines of code in the other. Some languages ​​also offer certain convenience functions that others do not.
More comfortable programming languages ​​make work easier for the programmer, but this often leads to slower programs.
Often the more comfortable programming languages ​​are easier to learn for beginners, as they can be used to solve many "everyday" tasks without much effort and there are fewer pitfalls that one can stumble upon.

Availability of tools and libraries

If you program a game, you don't have to reinvent the wheel. There are ready-made libraries for the most important tasks such as 2D / 3D graphics, audio, network or querying input devices such as mouse, keyboard or joystick.
You simply integrate these libraries into your program and save yourself a lot of work. The choice of programming language should also take into account the range of such libraries.
Even if you won't need such libraries at the beginning, this aspect should not be neglected. It would be inconvenient if you learned a programming language and later found that it is completely unsuitable for programming games.

Efficiency

A fast execution of the program is very important for many games, as they have to calculate 3D graphics, sound, physics or artificial intelligence in real time and can thus bring a computer to the limits of its performance.
For hobby game programmers, this aspect usually plays a minor role, as their games tend to be kept simple. In addition, the higher performance of a language is usually associated with a proximity to the underlying computer system. The resulting increased complexity can ensure that programming errors occur more easily and are more difficult to find. As a game developer, it is important to find an appropriate balance between efficiency and productivity for the project.


pexelspixabay270373.jpg
Image Source

As stated above, this is NOT a complete list of all suitable languages, but the most common and recommended ones.

C++

Almost all professional / commercial games are programmed in the programming language C++ (pronounced "C Plus Plus"). The reason for this is that C++ allows very fast programs to be programmed at a low level. The latter means that there isn't much between" the program and the computer's hardware.
Accordingly, this language is rudimentary and error-prone in many areas, which makes it the most beginner-UNfriendly programming language.
By "error-prone" is meant that it is easy to do something wrong if you are not careful. It is rightly said that there are very few people who fully understand this language in all its details and who know how to use it.
Since C++ is very widespread in game programming, you have the largest selection of libraries here. There is also a large number of tools and development environments.

Common DevTools and Libraries:
Unreal Engine
SFML


C#

C# (pronounced "C Sharp") is related to C++ and allows more comfortable programming.
C# is a ".NET language" (if you read anything about .NET [dot net], then it also means C#).
The range of libraries and tools is not as extensive as the one for C++ (although growing), which is also due to the fact that the language is much younger.
The achievable speed does not come close to that of C++ programs, but shouldn't be a problem for more ambitious game projects either. If you own an Xbox and want to program your own games for it, then you should learn C#.

Common DevTools and Libraries:
Unity
MonoGame


Java

The somewhat older programming language Java had a major influence on C#. The two languages are therefore quite similar. While Java has become very popular for developing business applications, the language can be described as an outsider when it comes to game development for the PC.
However, if you want to program your own apps or games for Android smartphones, there is hardly any way around Java, as Android apps are quite often written in Java. (the use of engines like Unity and Unreal are changing these requirement)

Common DevTools and Libraries:
libGDX


Python

Python is not only very different in appearance from the languages shown so far. One big difference is that Python uses dynamic typing and duck typing. Due to the dynamic typing in particular, Python programs tend to be slower than those written in C++, C# or Java.
However, Python programs get by with relatively little source code. Because of its simplicity, Python is a very attractive first programming language for beginners. Tools and libraries for game programming are available in sufficient quantities.

Common DevTools and Libraries:
PyGame


pexelsannh2646531.jpg

Start Learning

Admittedly, you don't actually have enough information to decide on one of the languages ​​presented at this point. Even so, you have to make a choice. As already said: You can program games with all these languages. The worst that can happen is that you don't like the language you choose. Then you try another one. Nothing lost at this point.

Once you've decided on a language, it's time to start learning it. There are enough tutorials and books aimed at novice programmers.
A book costs money, but you have something tangible in return. A book can also be assumed to have a certain minimum quality. Also, if you study with a book, you may be less likely to break off because you paid money to do it. It is up to you whether you follow the reading recommendations or rather look for something yourself.
But before you get started, I'd like to give you a few more tips:

Try to study regularly as possible. This is the only way to stay on the ball.

Allow enough time and try to keep your motivation going. Do not rush! To learn programming, you should expect up to a year, depending on your existing knowledge and the amount of time per day you want to spend on it.

Many topics require a feel for programming, which you can only get through practice.

If necessary, explanations from other tutorials and books will help. Or you ask a question in a programming forum / discord. Don't try to just read a book or tutorial from cover to cover as quickly as possible. That won't do you any good.

Work on any exercises offered and compare them with the solutions suggested by the author.

As you study, don't keep asking yourself how to program certain aspects of your game. Do not think too purposefully, or you may miss important concepts for which you cannot imagine immediate application in your game. So do not think that you will not need this or that and therefore do not have to understand, because you can hardly judge that at this point in time.

Please do not start programming a game immediately while you are learning to code.

Otherwise you are constantly busy starting all over again, because your knowledge is continuously expanding and you are always getting to know better methods for solving problems. So put your idea on hold for now while you work your way through the basics of programming. For practice, write small, simple programs that focus on the new things you learn.


What's next

We have now reached the point where this article ends.
It is difficult to give more general useful advice here. You should use a search engine of your choice to find out more about specific topics:

  • How do you plan a bigger project?
  • How do you find other programmers, graphic artists, audio designers, musicians, ...?
  • How do you organize yourself as a team?
  • How can you best implement a certain graphic effect?

Good luck - and more important - Have a good time!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
STEEMKR.COM IS SPONSORED BY
ADVERTISEMENT