Game programming

Game Design

I have been a software developer since 1977 and I was one of the home computer developers in the early beginning of personal computing. From the very beginning (on my TRS80 Model 1 Level II) I was playing computer games and writing computer games myself. I really liked adventure games at that time so after reading and article from Scott Adams in a magazine I started to write my own adventure games. Years later on the IBM-PC I wrote the first Scott Adams adventure interpreter and that was published in the USA on a CD disk with all the classic game files. After contacting Scott we became friends and we are still friends up to today. I made several improved versions of the Scott Adams adventure interpreter and release them on my website. I was also very interested in the game Reversi so I also wrote some strong Reversi programs.

I also write other software like emulators, development IDE’s and utility programs but that is mostly out of a need, because there is (or was) no good alternative. Last ten years I have been writing games using the Unity game engine and after a while I became an experienced Unity developer. My first real Unity based game was Bon Vinant and after that I worked for more than a year on the walking simulator Amerwold woods. Currently I am still working on Unity games and on this page, and my Facebook page I will inform you about the progress. Regards, Hein Pragt.

Facebook: Fascebook Hein Pragt Games

Introduction to game programming

Programming games is fun, addictive, a source of a lot of annoyance but also a lot of fun. But how can you program a game? Graphics and sound are the first things we notice when we look at computer games. But beautiful animations and good sound effects are just the outer layer of this fascinating form of technology. 3D technology requires some knowledge of mathematics and a game is often one complicated structure of logic and rules. Games also often touch on the subject of psychology because the game is a form of action and reaction and the player is one human being who responds to the game in a human way. How one suspects that the player will react is often well thought out in advance. Also it is that in adventure games or role playing games (rpg) the game characters have their own character, this also requires some insight into the human psyche. It game programming often brings together many disciplines, techies, programmers, graphic designers, storytellers, etc.

Game programming is essentially no different from any other form of programming, except that it often has to be very efficient and for very speed optimized. You will have to learn to write programs that can display 2D and 3D images quickly and efficiently, that capable of displaying music and sound effects and responding to user input at lightning speed. When you write a multiplayer game that can be played over a network, you will also need to write network code. Programming games is not a simple matter and requires definitely a lot of study. Of course many of these tasks have already been done for you, there are several code libraries you can use. This libraries are built to perform specific tasks such as displaying graphics, rendering sound, and handling user input. There are also libraries that can be used as APIs as interfaces between the program and the underlying hardware. A successful game programmer knows what to do himself and what to “borrow” from others.

Basic game design skills

If you want to make your own games, you still need a few basic skills. Please note, you need these skills to a greater or lesser extent, depending on whether you want to make a game all by yourself or in a team. In a team, each developer usually has a specialist skill, one is very good at creating graphics, the other is good at sound and music, another is good at designing levels, and yet another can be a good programmer. The smaller the team, the more skills every team member must have. So the basic skills are: graphic design, sound and music, game concepts and last but not least programming.

Graphic design

When you watch a computer game you immediately see how important graphic design is. Most novice games can often be recognized by poor graphics. All elements in the game need an appearance, even a fairly static game such as checkers or chess requires a nice graphical representation. Being in a platform game game characters, levels, backgrounds and menu screens. All these graphical elements must be created. Some knowledge of color and depth effect is useful, as is mastering a graphic package. There are countless software packages available, from free packages to very expensive professional packages. A well-known open source and free package is: Gimp but in my opinion this package does not excel in user-friendliness. In addition, there are the (usually not free) packages such as: Photoshop, illustrator, paint shop pro and paint.net. Choose one of packages and learn to work with it by getting started with it. I prefer to work in Photoshop myself because I already have this package know for a long time and meanwhile know exactly where all the tools and functions are.

In addition to specific elements, you should also think about the overall graphic style of your game, playful, loose, tight, much colors or little. In any case, make sure you apply the style consistently throughout the game, an inconsistent user interfac can be very annoying. Take a look at how other games within the same genre are doing, better good imitated than ill-conceived. Please note that you are not a thief, just copying things is not allowed. Often it works well to start by just sketching everything on paper, you can of course also do this in a drawing package on the computer. When you don’t have enough graphics skills, you can also use open source graphics. On the Internet many free graphic sets made available to download and use in your own game. Please note whether commercial use is also permitted and whether you must acknowledge the source. When in doubt, it is wise to always request written permission from the original creator.

You need animation techniques to make objects move in your game. This means you have multiple versions of a picture, each of which is part of a movement, which are played one after the other. How many pictures needed you can decide for yourself, the more pictures the more realistic the movement. For example, you can walk with two tiles per direction, but four tiles look nicer. For more complex movements such as fighting, there are often even more pictures the animation sequence. For a really smooth movement you need at least 30 frames per second! Everything that moves in a game is made up of a series of still pictures.

Sound and Music

Within a game we can use background music to enhance the atmosphere of the game and use sound effects to enhance effects in the game. When opening a door you can adjust a sound, but enemies can also use their have their own sound to make them even more menacing. You can create sound effects yourself by recording with your computer and to edit afterwards, there are also many open source sounds that you can download on the Internet. You can also use one sound editing program cut pieces from existing sound files to create your own effects. Many developers and game development packages use wav files or other sound file formats to play effects. These files can often take up a lot of space and it is especially important for an online game (but also for the load times for offline games) to make the files as small as possible and to reuse them as much as possible.

For the use of background music, people often use midi for the music played by a virtual synthesizer. The advantage is that this format is very compact and you can therefore play very large pieces of music playback, the downside is that you need a software synthesizer module in your code and that you need a package to create and edit these files where knowledge of music is necessary. Game designers often opt to divide a repetitive piece of music into chunks that can be played randomly one after the other so that the background music is not too monotonous. The individual pieces can be saved in MP3 format, for example. please note Please note that the size of the files and thus the loading time can also be very important here.

Again, if you don’t have enough music skills, you can also use open source music. Many free background music pieces can be downloaded from the Internet that have been made available for use in your own home game. Also with these files, please note whether commercial use is also permitted and whether you must acknowledge the source. When you are in doubt, it is wise to always request written permission from the original creator.

Game Concepts

In addition to all technical and graphical skills, knowledge of game concepts is also important. A good idea for beginning gamemakers is recreating their favorite game. This is a good exercise to master game design skills. Playing and watching computer games is also very important, especially in the genre you want to make yourself. But it only gets really interesting when you really try to make something new. Lots of people getting to this point want to make something new but always fall back on games they already know. It’s good practice to sketch your ideas on paper before you get started. You can then show the developed ideas to a few people and test the idea, which often will results in good comments or additions. Don’t start the building for real too soon, a good design in advance can save a lot of time afterwards. Nothing is more frustrating than a complete rebuild a game when you are half way.

Unity game engine

Unity LogoI am a big fan of the Unity game engine. Unity is the favorite engine of more than 45% of the game developers and this would make it the most widely used engine in the world. The same survey shows that their closest competitor (Unreal Engine) is just over a third of the market share. The engine is free and easy to install on either Windows PC or Mac (Linux support is coming) and a lot of online tutorial can be found both in text and in YouTube movies and it is even possible to follow a real training with certification. Also a bonus for the aspiring game developer is the Unity Asset Store where you can find everything from 3D models to sound libraries, custom scriptring solutions and even complete projects to poke around and learn from others. Most of the content is created by the community and costs some money, but there are many free versions of certain items, and Unity itself often uploads completely free content. You can make a complete game without programming, but if you still want something special or something different from the standard behavior, you can add functionality in C#. The funny thing is that the scripts themselves can be linked to components with drag and drop. The Unity API is online very well documented and gives a clear understanding of how a particular feature works or should be used. This guide is constantly being updated updated, and if you can’t figure it out, there’s always the forum.

On Windows, the Unity development environment is integrated with Microsoft Visual Studio, which simplifies editing C# code. The entire Unity’s interface takes some getting used to but is ultimately very user-friendly, although at first it is a bit of a search in the huge list of options and settings. The best way to learn is to follow the tutorials and experiment a lot yourself. Try opening one door, figure it out, experiment with code and some graphics and everything will eventually fall into place. With a few exercises you are in able to make a simple game that looks very good and you get a lot of standard functionality “out of the box” as standard. In any case, I was sold within a few days and hooked on the Unity engine and development environment.

More pages on gamedevelopment

Leave a Reply

Your email address will not be published. Required fields are marked *