Games Application Software
Intro
For games to be built and run it requires a vast amount of work, talent and of course software. With that in mind this section of the blog is dedicated to all sections of the application software used within the games industry. For example we will be looking at the various language types used to create both gameplay and game making programs along with how they work and what it is exactly that they are.
What are Computer Programs?
The first question to ask when dealing with this area is, of course: "What is a computer program?" Well a computer program is in extremely simple terms a fixed set of instructions which the computer will carry out when executed. The exact process and what it does is all decided by the language and syntax with which the program was coded. Whether the computer opens a notepad and begins printing on-screen what you type or doing arithmetic calculations such as addition and multiplication, these are all example of what a computer program is. A computer program can be likened in many ways to that of flat pack furniture or blueprint instructions. A simple yet confusing array of instructions which detail what to do and when.
What are Programming Languages?
So we have now understood what computer programs are and that they are controlled and created using programming languages. But, then we are left with another question before moving on and that is this "What are programming languages?"
Well, for a computer to actually carry out any of the functions or process's that you want it to you must be able to communicate to it and tell it in a way that the computer can understand. As we have talked about in earlier sections of this entire blog (Unit 20) a computer runs by simply processing a series of I/O states of on and off states, this is also known as binary. Binary is the actual final representation of a language which a computer understands also known as "machine code" because it is what the hardware actually reads and all programming languages eventually get compiled and translated by a lexical analyzer into this basic of all languages and from here the computer reads and performs it's functions as specified. This is the purpose of programming languages. A programming language is in many ways similar to that of a real life language all complete with it's own syntax, word rules and grammatical placements. The difference though lies in the way in which you speak.
Just like modern day languages there are a vast number of variants when it comes to programming languages and again like modern languages they all communicate the same things just in various ways some of which are vastly superior whilst others are useful for specific tasks. Hence why a number languages are used purely for logical operations whilst others are used for more OOP based programming ways.
Some popular languages used in the modern games industry for software will include: C++, C#, Lua, JavaScript, Java & Assembly. All of these languages are on some if not all of the modern day console systems and are used within all video-games developed. But, to note Assembly is an extremely basic and hard language which communicates directly with the computer. It is also designed for every individual architecture so one console's Assembly language will be different to that of a PC or other console's.
Types of Programming Languages
Also, there are various forms and types of languages available which deal with different features. There are languages as stated above, designed for purely logic based rules, languages designed to create programs and control characters, languages which connect to the hardware and tell it what to do and when etc. So for this following area i will be talking about some of the various types and their uses. Before continuing on below is a diagram which can be used for reference after each explanation of a language type.
 |
| (Ex. 1 - Diagram showing what happens during the coding and execution/run stages of interpreted and compiled languages respectively.) |
Interpreted Languages
An interpreted language is a form of programming language which will execute all of it's programmed instructions straight away without a need for compilation. As it is coded it will execute the instructions on the fly translating it's segments or statements into pre-compiled subroutines which are then translated into machine code. Now interpretation and compiling are essentially the same thing the difference occurs in the way in which it happens. In this case it is in real-time and directly translated into pre-compiled segments which make for faster translation and on-the-fly execution. They are also referred to in many cases as scripting languages purely because most of their functionality works within that of a parent program which was programmed by another language, whereas compiled languages create programs free of any dependency on external programs and their functions.
Advantage's
There are many pro's to this type of language but by far the biggest is within it's forgiving nature. As in many cases it allows more less severe errors pass through unnoticed as the computer is able to fill them in itself. This makes it useful fro either beginner programmers or programming which does not require the need for excessive importance placed upon memory management.
Disadvantage's
It's advantage is unfortunately also it's disadvantage as well. Although it enables the programmer faster and quicker response to coded results and allows them to be sloppy to an extent. It also takes the computer longer and takes more memory for the computer to translate and actually understand the information that has been given to it. It also does not have as much access to lower level hardware and features so it is not able to code memory management or garbage collection process's which would otherwise make it faster.
Examples
There are many examples of interpreted languages and many of them are used within actual video-games and video-games hardware.
"Java" - Java is an extremely popular interpreted language for many reasons including one stated in an earlier section of this blog which is of course it's platform in-dependency which it allows it to run on many systems. Part of this is in due thanks to it's interpreted nature. It is also a popular interpreted language which has seen use within html5 and other web browser based games along with being a mainstay for applications and games built on many mobile devices.
"C#" - Another extremely popular interpreted language is that of C# a programming language based off of C++ and Objective C it has seen use within some games and is even featured as a main language within the Unity and Game Maker Pro games engines. But, it's main functions as a language is with that of game development tools. Due to it's interpreted architecture and it's higher level language origins and heritage it is extremely popular when it comes to developing rendering engines, modelling software, games engines and other game development tools.
Compiled Languages
After interpreted languages we move onto the languages which have seen more use within actual games and the development of games, which is that of compiled languages.
A compiled language is in many respects similar to that of an interpreted language in the fact that both are converted and translated into binary or machine code. But, compiled languages have a different method of performing this task. When using a compiled language you must first write your code and debug it to ensure no errors whether grammatical or logical are present and then the code must then be compiled before it can then be executed/run by the system. So in more simpler terms a programmer will type something along the lines of:
If(doorOpens == true)
{
audioClip.PlayOneShot();
}
This will then be placed into a compiler which will then in turn convert this into machine readable code or "binary". So in order it would go: 1. human readable code 2. Compilation 3. Binary output.
Examples
There are many examples of languages which are compiled and most if not all have a heavy usage within the industry.
"C++" - C++ is one of the most important and most used programming languages available today and is used heavily within the development of video-games. It is also a multi-paradigm language which means that it allows both high-level and low-level language modification.
"Objective C" - Objective C is another important and influential language which is used extensively within the industry although it sees more use for both Linux and Mac OS operating systems due to their architectures.
Advantages
The advantages to a compiled language are that it is faster than an interpreted language and allows far more access to lower level functionality such as advanced memory management and garbage collection it also allows far more control over many more advanced features.
Disadvantages
The main issues with compiled languages are: Because it requires a compiler it can take an extremely long time to compile code segments which can cause project slowdowns if errors are made as the compiler will only report errors after compilation has finished thus rendering the whole compilation process a waste. It also poses security risks due to it's advanced base layer modifications and it's multi-paradigm architecture which make it possibly unsafe for many programs and OS's thus requiring the need for further security coding and possible future updates.
O.O.P (Object Oriented Programming)
Now that we have understood what programming languages are and their various types i would like to take the time to explain in-depth a little bit about Object Oriented Programming which is by far one of the most important programming paradigms in games programming and games developement in general.
OOP is a type of programming paradigm which allows items, actors, meshes etc. within a programming language to be written and collected as objects which are all able to be communicated with each other. Within OOP all of these objects are able to be given their own characteristics and dependencies which allow them to be organized into collections or classes of similar or part similar objects. They are also able to be given their own behaviors allowing them to interact with one another.
Now this may be extremely confusing and it might seem like i am beating around the bush but, it is because OOP is a hard concept to explain so let's try to simplify it with an example. Let's say that we have a class which defines all of the structures of animals within a game. Within this class all of the enemies will then be defined as separate objects which are then able to be assigned different things such as colour, height, size etc. We also will be able to assign various different behaviours to the animals such as eating phases or sleeping phases. If this still isn't helpful then the diagram placed bellow may be able to help.
 |
| (Ex. 2 - Diagram highlighting OOP by declaring a class named bank account and then showing how it's objects here named "Account Holder" & "Account" can hold separate properties and details within the sub-classes.) |
OOP is a very useful and extremely important paradigm for scripters and programmers as it allows easier and more logical access as it structures software variants into manageable individual objects which can be modified without causing issues to the rest of a program. It is also extremely flexible and and easy to update and modify programs which are written.
Examples of OOP languages are ones such as: JavaScript, Java, C++, C#, Objective C, Lua etc.
Scripting
Earlier we discussed programming languages and within it we touched upon scripting. So in the final part of this blog i will detailing and talking about scripting and scripting languages within games software.
What are Computer/Games Scripts?
Scripting is different from
programming although the languages used will be the same just with variance for each specific program. Scripting is
the process of coding within an environment whereby the scripts and code
written will be run and executed by an engine itself or script engine.
Unlike programming languages scripts do not create physical memory or
take any actual processing overhead when not in use because they are
simply text documents with code written in them which is then executed
by the engine. For example when using Unity if you were to type code
within any of it's languages you will be using pre-programmed and
pre-compiled functions which are then executed by the engine which in
effect make these snippets of code "scripts".
With that in mind there are various types of games scripts available for both games engines and game development software alike.
Types of Games Scripts
Because there are many different types of programs and they have various different functions there are also many different types of modified languages which the programs may use below are 4 popular ones.
UnrealScript
UnrealScript is a scripting language developed for use with the unreal from 1.0 to 4.5.7 (the current version) it is developed by Unreal for use in the engine to help people code behaviors, mechanics and functionality into the engine. It is based upon and is a variant of C++ but is easier to use as it doesn't allow extreme access to the more advanced and low level features of the language and many of the commands and algorithms are pre-programmed and need only be called which makes easier for users of the system.
QuakeC
QuakeC is a scripting language which was developed for use with the game Quake and it's engine back in 1996 by Id Software. It allows players to do unique AI triggers, mechanics and functionaltiy with the game. It was developed to help allow new coders and users to be able to create mods and games with engine. It's language is loosely based upon Objective C syntax.
MAXScript
MAXScript is a scripting language designed for use with Autodesk's 3d all-in-one package which helps create unique functionality for use within the program. For example users are able to code unique modelling features which enable the program to do certain functions for them such as creating circles which make use of quads. It is based upon the python programming language and has added unique syntax in the last couple of years.