Está en la página 1de 3

A video game makes the player immerse into it and he does not simply sit back and

watch a hero complete his journey, in fact he becomes the hero. The key to acquire
this interactivity is programming (Dawson, 2011, p.18). Programming is described as
the act of expressing an algorithm using a low-level or high level language
(Reynolds and Tymann, 2008, p.2). Programming games is different from other kinds
of programming not in terms of better or worse but it is just a different experience.
Game programmers have to come across tough challenges and to overcome these,
they need to choose wisely the right coding language (McShaffry, 2009, p.17). A few
examples of such languages are C++, Lua and assembly. Of the above programming
languages, which is best suited to console game development in the contemporary
market place is a question mentioned in almost every game programming FAQ. The
question is good though but not the one with an easy answer.
The only language that a computer understands is machine language but it is hard for
humans to work directly with it so low and high level computer languages have been
developed to ease the process which are later translated into machine language by
compiler or interpreter. Today there are many languages that deal with teaching
programming,

one-off

programs,

small

projects,

mission-critical,

real-time

applications and general purpose work but C++ is the most widely used language for
writing computer applications in today's market (Reynolds and Tymann, 2008, p.2;
Dawson, 2011, p.18). The potential of an object-oriented language like C++ allows to
create immensely complex systems (McShaffry, 2009, p.52). Unlike C++, assembly
language is not used to entirely write the game but is used in portions where
performance can be improved (Hattan, n.d.). On the other hand, Lua is a scripting
language embedded in programs and this integration brings many benefits
(Ierusalimschy, 2006, p.13). The language best suited for console game development
will be evident by analysing the history, efficiency and application of these languages.
While knowing the history of languages will not tell which language is superior but it
is important to get an idea of the origin. In the 1940s, the lowest-level, first humanreadable programming language was written, that is assembly. But due to the
language being error-prone and difficult to work with, intermediate and high-level
programming languages were developed like C++ and Lua in 1983 and 1996
respectively. C++ is a direct descendant of the C language with object oriented
features and other improvements. It was invented by Bjarne Stroustrup in Bell labs,
United States, whereas the strange-sounding language Lua (pronounced LOO-ah)

which means moon in Portuguese was created at the Pontifical Catholic University of
Rio de Janeiro, Brazil, by the members of Computer Graphics Technology Group,
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes
(Stroustrup, 2013; Varma, 2012, p.1-2).
Game programming needs to be executed by efficient, productive, portable, and fast
language which maximises the performance of a game by utilising the potential of the
hardware to its full extent. Low-level languages like assembly are closest to machine
languages so these take the advantage of the processor's latest features, since they can
be used directly. This makes assembly the smallest and fastest language and games
can be coded with maximum performance. However, assembly is difficult to learn as
it is the same as machine language except with names instead of numbers and it is
only specific to a particular computer architecture as compared to most intermediate
and high-level programming languages such as C++ and Lua, which are portable
across multi-platforms plus they are closer to human languages (Hattan, n.d.). Being
closer to human languages, these are easier to read and write and this is their main
advantage over low-level languages. C++ is regarded as an intermediate-level
language, as it comprises both high and low-level language features (Schildt, 1998).
There are various reasons why game programmers choose C++, for instance, it is
blazingly fast because its design aim is performance, it allows you to use assembly
language to squeeze out more performance if needed and moreover, C++ is multiparadigm giving options of different styles of programming including object-oriented
programming to a programmer. Since it has a long background in game industry, the
pre-existing code serves as a huge asset available to speed up the process of starting a
new project (Dawson, 2011, p.). One of the fastest scripting language Lua may not
still run as quick as C++, but it saves time as it is immediately interpreted by the
program at real-time rather than compiled first like C++. The compilation can be
time-consuming if the program is long (McShaffry, 2009, p.266-302). Usually, an
open source language with gentle learning curve comes at the cost of performance but
Lua possesses both properties (Jung and Tymann, 2007, p.27). In addition to this, Lua
is a small language which contributes to its small size. Its complete distribution can be
easily stored in a floppy disk(Ierusalimschy, 2006, p.14).
Game programming can involve anything from creating the game engine and graphics
to game-play, database, physics and scripting.(Novak, 2012, p.). Although there are
several game coding languages, C++ is the game industry standard and games are

written largely or completely in it, especially big-budget computer games (Dawson,


2011, p.). In contrast to C++, assembly language today is used in bits and pieces
where performance can be improved though in 1990s, most cost console games were
written in assembly, such as sega saturn (Pettus, n.d; Hattan, n.d.). Similar to C++,
Lua is also widely used in games but as a scripting language as it was designed from
the start to be integrated with a software(Ierusalimschy, 2006, p.13). This integration
brings many benefits such as rapid prototyping and code testing which is why Lua is
becoming increasingly popular with game developers (Varma, 2012, p.12). Game
titles do utilise Lua but the core of the game engine still remains C++.
The bottom line is that if someone wants to be a professional game programmer, he
must know C++. Even though games written in assembly are the fastest but the slight
performance difference is worth it as C++ is much easier to write and maintain. Not
only C++ but Lua is also a handy language except that it is used only for rapid
prototyping and scripting in big game projects. Like every profession, game
programming has got a bad side which is that it is a tough job due to crazy work
hours, almost annually changing SDK and OS, and immense competition but if the
goal is set, it is achievable.

También podría gustarte