0% found this document useful (0 votes)
11 views

A survey of computer game development

Uploaded by

monia.naomy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

A survey of computer game development

Uploaded by

monia.naomy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

JDMS

Applications

Journal of Defense Modeling and


Simulation: Applications,
A survey of computer game Methodology, Technology
2016, Vol. 13(2) 239–251

development Ó The Author(s) 2014


DOI: 10.1177/1548512914554405
dms.sagepub.com

A Z Aktasx1 and E Orcxun2

Abstract
A computer game is special software to run on a computer for enjoyment and education. A computer game interacts
with a user interface and generates audio-visual feedback.
In this article computer games and the relevant processes and methodologies for their development were surveyed.
Basically a computer game consists of design elements and technical components. The players, stories, rules, objectives,
procedures, conflicts and challenges are the design elements of a computer game. They all have conflicts and challenges
and have effects over gameplay. In addition to design elements, there are technical components that may be grouped into
four as ‘the render engine and rendering pipeline’, ‘physics engine and physics-related techniques’, ‘game codes’ and ‘art-
work contents’. Fixed-function pipeline and flexible pipeline are the render engine and rendering pipeline. Physics engine
and physics-related techniques are collision detection, ray casting, etc. Game codes are for game mechanics, artificial
intelligence, scenario creation and management. Artwork contents have game level, three-dimensional models, two-
dimensional maps for shaders, skeletal animation and audio assets.
The major objective of the study to be reported in this article was to apply all these methodologies, techniques and tools
on a case problem after studying design elements and technical components.

Keywords
Game development, game design, real-time strategy game, three-dimensional computer game

1. Introduction interface. They generate audio-visual feedback and run on


a computer. Earlier, a game console or an arcade machine
1.1. What is a game? was used to run that special software.
A ‘game’ can be defined in many ways. As noted by As the earlier examples of computer games one may
Crawford,1 a game can be defined as ‘a form of play with cite products such as ‘Computer Space’ or a text-based title
goals and structure’ or ‘a form of art in which participants, such as ‘Zork’, which were later developed to a wide range
termed players, make decisions in order to manage of games.2 The tool named a ‘computer’ was not available
resources through game tokens in the pursuit of a goal’. and not widely used until the mid-1970s. Therefore, early
Finally, a ‘game’ is ‘an activity with some rules engaged games were referred to as ‘video games’, since the early
in for an outcome’ as added by Crawford. As noted by game consoles (arcade machines) were video-like raster
Crawford again ‘The key components of games are goals, display devices that had a very limited memory and com-
rules, challenge, and interaction. Games generally involve putational power.2
mental or physical stimulation, and often both’.1
1
Computer Engineering Department, Baskent University, Turkey
2
Corvus Games Ltd, Turkey
1.2. Computer games
Corresponding author:
As noted by Orcun,2 computer games used to be known as Prof. Dr A Ziya Aktasx, Computer Engineering Department, Baskent
video games in earlier years. They were mostly entertain- University, Ankara, Turkey.
ment software. They involve interaction with a user Email: [email protected]
240 Journal of Defense Modeling and Simulation: Applications, Methodology, Technology 13(2)

1.3. Classification of computer games


Computer games may be classified under four headings as
follows: core games, casual games, serious games and edu-
cational games. In the following sections they are briefly
defined.2

a) Core games. ‘Core games are sometimes considered


demanding in their game-play and generally do not appeal
to the casual gamer’.2 They are generally defined by scale
and size of development efforts needed for their produc-
tion, their intensity or depth of play. They can also include
games across a wide range of genres.

Figure 1. Organization of the article.


b) Casual games. ‘Casual games derive their name from
their ease of accessibility, simple to understand gameplay Crawford,1 Bates,3 Rollings and Morris,4 Wolf,5 Bergeron6
and quick to grasp rule sets. Additionally, casual games and Fullerton et al.7
strongly support the ability to jump in and out of play on
demand’ as noted by Bates.3
2. Game design
2.1. Introduction
c) Serious games. According to Bates,3 serious games are
games that are designed primarily to teach or educate. As noted by Salen and Zimmerman,8 game design is a part
They may be used to gain some sort of ability by the of an extensive process that focuses on the creation of a
player. meaningful play. It is the process of designing the rules of
the game that let a meaningful play to emerge. Rollings
and Adams9 point out that game design also covers design
d) Educational games. Educational games are developed to of gameplay, environment and storyline. It should also
teach. They also can entertain at the same time. Such include the rules of the game.
games target a younger audience than most of the com- Rouse10 states that the game design is the most impor-
mercial products. Game designers work closely with edu- tant factor that determines the form of the resulting game-
cationalist and experts of the subject domain to ensure that play. He claims that ‘The game design determines what
the content is appropriate for the target audience.3 actions players will be able to perform in the game envi-
ronment and what win or loss criteria the game will
include, how the player will be able to control the game
1.4. Objective of the article and what feedbacks the game will provide to the player’.
Computer game development is one of the most specialist
fields that differentiates from standard software develop-
ment in many ways. The most important reasons for this 2.2. Game design process
differentiation can be summarized as excessive use of Fullerton et al.7 note that having a good solid process for
audio-visual contents that require an artistic point of view developing an idea from the initial concept into a playable
and the entertainment purpose of it, which requires crea- and satisfying game experience is the key aspect of game
tive approaches to design a good computer game. As a design.
result, game development has been studied from different By its nature the computer game development process
perspectives.2 is an unstructured process. Historically, the game design
In this article, it is not intended to focus on a certain process has been an intuitive and organic part of the devel-
type of computer game development. Instead, it is pre- opment practice. This worked well in the days when
ferred to discuss computer game development as a whole development teams were much smaller and the resources
with all its aspects, breaking into design and development required to develop a computer game were much less.11,12
phases including their technical issues.
In the article, after providing a general overview in
Section 1, various aspects are discussed in the subsequent 2.3. Basic elements of a game
sections, numbered from 2–4, as shown in Figure 1 pre- According to Schell,13 there are many ways to break down
pared by Orcun2 using various relevant references such as and classify the many elements that form the design of the
Aktasx and Orc
xun 241

game. However, the most important design elements of a Without them, games cannot be games. A game without
game can be broken down into four categories as follows: players to play, without objectives to accomplish, without
rules to obey or procedures to follow, is not a game at all.
• mechanics;
Players, objectives, procedures, rules, conflict(s), chal-
• story;
lenge(s) and story are the essence of games. A strong
• technology;
understanding of their effects and relations is the key for a
• aesthetics.
good game design.
In the following sections these issues are briefly
summarized.1,13 2.4.1. Players. ‘How to structure the participation of the
players to a game’, is one of the key questions that must
2.3.1. Mechanics. The rules and the procedures of a game be answered by the designer. How many players will play
are the mechanics. They describe the following: the game? Will players have different roles? Will they play
to beat each other or will they play cooperatively, or both?
(a) the actual goal of a game; The answers to these questions will determine the basic
(b) what players can and cannot do to achieve it; and aspects of the game.7
(c) what happens when they perform the actions in (b).
2.4.2. Rules. Schell13 claims that the rules are the most fun-
Game mechanics or the characteristics of gameplay are damental game mechanics. They define the space, the
often the easiest core to understand, especially if these actions that can be done, the consequences of these actions,
mechanics are similar to an existing game. The mechanics the constraints on the actions and the goals. They make
define what is going to be accomplished in terms of game- possible all the mechanics and add objectives, which is
play. What type of action game will it be? What aspects of one of the things that make a game a game.
action will be captured for the player?10 Schell13 adds that the rules also define the challenges
and obstacles that the players must try to overcome. The
2.3.2. Story. Orcun2 defines the story as the sequence of challenges and obstacles, together with the actions that
events that occurs in a game. As in the movies it can be players can do to overcome them, form the gameplay.
branching and emergent as well as linear and pre-scripted.
As noted by Rouse,10 it is certainly possible that a game 2.4.3. Objectives. Objectives define what the players will
design may start with brainstorming about a story to tell, a try to achieve within the rule set of the game. Objectives
setting to employ or a set of characters to explore. must be challenging, but achievable. The objectives of a
game can determine the gameplay, in addition to providing
2.3.3. Technology. The term ‘technology’ in a game may not challenge. According to Fullerton et al.,7 a game in which
necessarily mean ‘high technology’ exclusively. It may the objective is to kill the opponent’s forces will have a
include any tools, materials and interactions that make a very different gameplay from a game in which the main
game possible, such as paper and pencil, toys or laser emit- objective is spelling more or longer words.
ting devices. The technology used in a game enables us to
do certain things as well as limiting us from doing other 2.4.4. Procedures. Procedures are the methods of play and
things.2 the actions that players can follow when they are trying to
achieve the game objectives. There are several types of
2.3.4. Aesthetics. Aesthetics is how a game looks, sounds procedures that are common in many games as follows.7
and feels. Aesthetics are an incredibly important aspect of
• Starting action: How to put a game into play?
game design, because they are much more visible to play-
• Progression of action: On-going procedures after
ers and more effective than other aspects in a player’s
experience. When there is a certain style or look that play- the starting action.
• Special actions: Available conditional to other ele-
ers want to experience, it is necessary to use a technology
that will not only allow the aesthetics to become available, ments or game state.
• Resolving actions: Bring gameplay to a close.
but also to enrich them further.

2.4.5. Conflict. Conflict occurs when the players try to


2.4. Formal and dramatic elements of a game achieve the objectives of the game within its rules. As
As noted by Fullerton et al.,7 formal elements are the mentioned earlier, conflict is designed into the game by
major elements that define the structure of a game. forming rules and procedures that prevent a player to
242 Journal of Defense Modeling and Simulation: Applications, Methodology, Technology 13(2)

accomplish their goals easily. Instead, the procedures offer 3. Game development
inefficient ways towards achieving the game objective. 3.1. Introduction
The procedures can also offer a sense of competition, so
According to Manninen et al.,14 game development can be
that players may submit themselves to this inefficient sys-
considered as a special form of software development
tem in order to gain the sense of achievement that comes
where a certain product and/or service is designed and
from participating.7
developed. Due to the heterogeneous nature of game
assets, the development requires a team of skilled individ-
2.4.6. Challenge. Dramatic elements, like a challenge or uals from different disciplines working in collaboration in
story, surround the more abstract formal elements of the the teams.
game design. They create a sense of involvement for the
players and enrich their overall game experience.7 Most of
the players play games because of the challenges that 3.2. The Developer–Publisher–Consumer Model
games offer. Games can amuse players over the play time The game design and development process is a tiring effort
and differently each time they play, while employing their to combine multiple disciplines that has different charac-
minds in a different way than a book, movie or other forms teristics.2 Today, the trend has been towards more speciali-
of entertainment.10 zation, whereby each business unit becomes considered as
The psychologist M Czikszentmihalyi set out to iden- a separate entity. Figure 3 illustrates the Developer–
tify the elements of enjoyment by studying similarities and Publisher–Consumer Model given by Grassioulet.15
dissimilarities of experience across many different tasks
and types of people.7 Based on his findings, he created a
theory known as ‘flow’, which is illustrated in Figure 2. 3.2.1. Developer. Game development can be considered as
As can be seen in the diagram, there is a dynamic relation- a risky and competitive job.14 New developers (e.g., game
ship between challenge and skills, frustration and boredom studios) may be evaluated based on their game concept,
that creates an optimal experience for a person engaged in abilities of their development team, competence of their
an activity.2 production processes, capabilities of their budget manage-
The vertical axis in the diagram represents the degree ment and quality assurance (QA). Therefore, the produc-
of challenge an activity offers, while the horizontal axis tion system needs to be perfect as a whole.
represents the skills of a participant. The narrow diagonal
strip represents a potential flow state where challenge
offered by the activity is in balance with skills of players. 3.2.2. Publisher. The primary role of the publisher is fund-
The outsides of this strip are the state of anxiety, in which ing the developers in order to make profit by publishing
the challenge exceeds the skills of players and the state of their games to the market. Publishers also take responsibil-
boredom, in which the skills of players outstrip the chal- ity for manufacturing as well as marketing, public relations
lenge offered.8 (PR), distribution and customer support. Most of the pub-
lishers are originally old developers. Also, larger publish-
ers own developers or have in-house development teams.13

3.2.3. Consumer. Manninen et al.14 claim that the role of


the consumer in the games industry is very different than
in the overall software business. The players are consum-
ing games because of different reasons other than utilitar-
ian purposes.
They added that individual game developers may pro-
vide some added-value to the consumer. However, as cur-
rent trends indicate, the game itself or the previous
versions of the game are the most effective to attract play-
ers. Yet, the publishers prefer the games that have mini-
mum risk and maximum profit. The consumers’
purchasing behaviours also look similar. Unique and off-
mainstream titles have started to reach their audience
Figure 2. The relationship between challenge and skill levels. lately, but such examples are still in the minority.
Aktasx and Orc
xun 243

Figure 3. The Developer–Publisher–Consumer Model.

3.3. Game development process 4- Post-production (validation and testing) stage: This
The development process of computer games can be bro- includes the validation through testing. This phase also
consists of a QA test that focuses on mechanics, game-
ken down into six major stages as follows.1,14
play, user interface, qualities of audio-visual contents and
ability to meet the market requirements. Only after the
1- Idea–game concept planning and (specification) validation do developers get to the debugging process.
stage: This consists of the formation of key features of 5- Release and launch stage: This includes delivery of
the game including genre, target audience, concept the release to the manufacturer.
documents, platforms, references and the initial draft of 6- Post-release/maintenance stage: This includes the
the development plan. The concept design, from idea development of patches and upgrades.
conception to pitching, is considered as the most crea-
tive part of the entire process.
2- Pre-production stage: This includes the game and 4. Components of a three-dimensional
level design issues such as the story and scenario, game
game
mechanics, aesthetics, development principles, object-
oriented specifications and the design of the game 4.1. Introduction
world (a city or a race circuit). As previously mentioned, games are dynamic and interre-
3- Production/development stage: This includes the lated systems consisting of audio-visual contents and sub-
development of all the different elements that the game systems that are designed for specific tasks as summarized
intended to include, such as computer codes, models, by Orcun2 in Figure 4. In this section, components that
sounds, videos, etc., and their integration to the whole form a three-dimensional (3D) game and their relations
game. with each other will be discussed.
244 Journal of Defense Modeling and Simulation: Applications, Methodology, Technology 13(2)

as edges. When three or more vertices connected with


edges they create a closed figure, which is a polygon. The
simplest polygon is a triangle. Modern 3D accelerated gra-
phics processing units are designed to display and manipu-
late millions of triangles in milliseconds. Because of this
capability, models are constructed out of simple triangles
instead of the more complex ones, as noted by Finney17
and Lengyel.18
Manninen et al.14 propose that 3D objects can be broken
down into three categories:
Figure 4. A simplified structure of a game.
• static models;
• dynamic models;
• effects.

Buildings, plants, decorative items, elements of terrain,


etc., can be considered as static objects. In other words,
static objects are models that have no animation at all and/
or have only decorative value. The player only sees these
objects in the game but cannot interact with them (other
than colliding). The production of these objects includes
geometry modelling and texturing.14
Characters, vehicles, different types of items used by
characters, etc., may require the status of dynamic objects.
If a model is created to be used rather than just being a sta-
tic prop that is a theatrical property, commonly referred to
as a ‘prop’ and it is any decorative object at the stage, it
Figure 5. A simple three-dimensional model. can be considered as a dynamic model. In other words, the
player can interact with them.14
4.2. Game codes and audio-visual contents Some of the effects seen in games, such as smoke or
fire, can also be created with 3D modelling tools. The
While the game engine part is about technical aspects that
effects, however, are generally created during the level
will be reused over multiple titles, the game codes or scripts
design and may also be tightly combined with program-
are the part that create behaviours specific to a single
ming and/or texturing.14
game.16 Game scripts define the gameplay and logic of the
game. Behaviours of artificial intelligence (AI) agents,
actions and restrictions of the player controlled objects, user 4.3. Game engine
interface elements, etc., are all within this context. On the
A game engine is a software system that provides the core
other hand, rendering tasks or collision detection algorithms
functionalities to abstract the details (sometime platform-
are not game specific, so they are within the game engine
dependent details) of doing common game-related, but not
part. Game scripts are also highly dependent on the game
game-specific tasks, such as rendering, physics and input.
engine and application programming interfaces (APIs) used.
Thus, developers can focus on the details about their
Three-dimensional objects are created through model-
games.1,19–26
ling and texturing processes. Modelling involves the cre-
According to Zerbst and Düvel:21
ation of a 3D representation of the real or imaginary
objects, while texturing fulfils the painting, or colouring, An engine should be independent of the project and capable
of the object with a required image. Texturing also of working with other video game projects and non-game
involves the creation of other required maps that will be multimedia software projects without the need to modify the
interpreted by shader algorithms to create visual effects engine’s code. In other words: The engine’s code must not
over the models.14 include any game-related code, and it has to be reusable.
The shape of a 3D geometry is generally defined with
set of vertices, edges and faces as, shown in Figure 5.1 The cost of developing an in-house engine has grown
Vertices are just simple points (x, y, z positions) on 3D significantly during recent years. More developers, there-
space. Vertices of a model are connected with lines known fore, have begun to specialize in developing either fully
Aktasx and Orc
xun 245

Figure 6. A simple representation of iteration cycles of the Unity game engine.

featured game engines or engine components to sell to physics engine is implemented as it runs independently
other developers, rather than develop games. At the end from the main game loop. The physics loop generally iter-
almost all components of a game engine became purchasa- ates more than the main game loop (for an averagely popu-
ble at a variety of prices, or obtainable for free from open lated scene) at any time period. It searches through the
source projects.20 scene graph and makes the necessary calculations only for
physics-controlled dynamic objects. Both the main game
loop and physics loop can access and manipulate physics-
4.3.1. Game loop. In a GUI (graphical user interface) of
controlled objects directly.2
the sort found on a Microsoft Windows operating system,
the majority of the contents on the screen are static.2 Only
a small part of any one window is changing appearance
4.3.2. Graphics engine (renderer). As noted by Finney,17
actively at any specific moment. Because of this, GUIs game engines also include sophisticated systems for ren-
have generally been drawn on screen with a technique
dering the game environments. Each game can use a dif-
known as rectangle invalidation, in which only the small
ferent approach to organize how the visual contents of the
portions of the screen where the contents have actually
game will be modelled. This becomes increasingly impor-
changed are re-drawn. Older two-dimensional (2D) games
tant as games are becoming more realistic by using vast
used this method to reduce the number of pixels that
3D environments, rich textures and forms, and other visual
needed to be re-drawn.22
contents.
As noted by Orcun2 in game engines, the rendering pro-
A 3D engine needs to organize things in a suitable way
cess is generally implemented as a part of main game loop
for best performance. The object and scene management is
but there may be other independent loops for different
one of the most important tasks in a best case scenario,
tasks. Since the duration of the rendering process heavily
where the user sends scene data to the engine and the
depends on the current view at a specific moment, the
engine takes care of tasks such as organizing and structur-
main game loop that includes the rendering process
ing the data. After initialization, the user then needs to
becomes unpredictable from the point of iteration dura-
only render calls and does not care about state switches
tion. Physics simulations, on the other hand, require more
and similar things. The engine catches those render calls
stable and fixed duration on iterations to simulate physics
to apply them in the most effective way in terms of
objects accurately and more easily. Because of that reason,
performance.17
physics simulations should be apart from main game loop
Sánchez and Dalmau27 have proposed that a 3D pipe-
and handled within an independent loop, as shown in
line can be decomposed into four stages as follows.
Figure 6.
In the Unity game engine, the main game loop handles
the majority of the low-level and high-level systems. It n Visibility determination:
searches through the scene graph and calls Update() and • clipping;
LateUpdate() methods of the game objects, respectively. • culling;
Then it starts the rendering process and waits until the dis- • occlusion culling.
play is updated. Nvidia’s (previously Aegia’s) ‘PhysX’ n Resolution determination:
246 Journal of Defense Modeling and Simulation: Applications, Methodology, Technology 13(2)

Clipping is the process of eliminating unseen geometry


by testing it against a clipping volume, such as the view
frustum. If the test fails, we can ignore that geometry
because we will know for sure it will not be seen.27 Because
of the highly dynamic nature of game environments and
complex geometries of 3D models, visibility culling (view
frustum culling) is handled simply by intersecting the view
frustum with the bounding volume (Figure 7) of the 3D geo-
metry, instead of the geometry itself, and rendering each
piece of geometry whose bounding volume is at least partly
inside.2 This is a fast and efficient way of culling large
amounts of geometry, as noted by Lengyel.18
Another method of visibility determination is back face
culling, given by Figure 8, which is a triangle (or poly-
gon)-level operation that ensures that only triangles, facing
the camera, are rendered.2 With back face culling enabled,
any triangles that are facing away from the camera can be
eliminated. The front side of a triangle is defined in two
Figure 7. Bounding volumes of a three-dimensional model. ways. The first definition is that the vertices of the triangle
are generally specified in counter-clockwise order. The
front side of the triangle is also defined as the direction in
which the normal vector of the face is pointing.26
The transform stage is used to perform geometric trans-
formation of the models in 3D space. This includes not
only the familiar rotation, scaling and translation, but also
many other transforms. In its more general definition, a
transform can be described as a 4 × 4 matrix, which left-
multiplies incoming vertices in order to calculate trans-
formed vertices. This stage also handles the projection of
transformed vertices from 3D space into 2D screen space,
using projection matrices. By doing so, 3D coordinates
can be transformed into 2D coordinates, which are then
rendered to the screen.27
When rendering two triangles that overlap each other in
screen space, a method to ensure that the triangle that is
closer to the camera will appear on top is needed. This
could be accomplished by always rendering triangles in
Figure 8. Back face culling. back-to-front order (painter’s algorithm). However, as
shown in Figure 9,2 this does not work if the triangles are
intersecting one another, as shown by Gregory.22
• LOD (Level of Detail or Limits of Detection)
analysis.
n Transform and lighting:

• Rasterization:
• depth buffer;
• shaders.

As noted by Sánchez and Dalmau,27 these pro-


cesses can be combined so that a 3D scene can be drawn
at a frame rate suitable for real-time games. A broad result
spectrum can be achieved by refining the design of com- Figure 9. Intersecting triangles with (a) and without (b) depth
ponents and their relations with each other. buffering.
Aktasx and Orc
xun 247

In order to implement triangle occlusion2 properly, the measurement of how much matter an object has. It can
independent from which of the triangles are rendered first, also be thought of as a measure of a body’s resistance to
rendering engines use a technique known as ‘depth buffer- motion or a change in its motion. Thus, the greater a
ing’ or ‘z-buffering’. Every fragment has a z-coordinate body’s mass, the harder it will be to set it in motion or
that specifies its depth into the screen or distance to the change its motion.30,31
rendering camera. When another fragment from another All other measurements, such as force and velocity, are
triangle is drawn over the same pixel, the engine compares derived from different combinations of mass, distance and
the depth values of the new fragment with the value within time.29
the depth buffer. If the new fragment is closer to the cam- Linear velocity is the change of position of an object
era (if it has a smaller depth), the engine overwrites the during a certain period of time.2 It is represented as vec-
pixel in the frame buffer. Otherwise the fragment is tors, which specifies how many units (depending on the
ignored.22 measurement used, for example meters or miles) an object
Current generation graphics processing units are pro- moves per unit of time though a direction. Linear velocity
grammable by programs that are called shader algo- can be calculated by the following formulas given by De
rithms.23 The two types of shader algorithms are vertex Sousa:28
shaders and pixel shaders. A vertex shader calculates col-
ours at the vertices of a triangle mesh by using vertex nor- ðcurrent position  previous positionÞ=duration ð1aÞ
mals, textures, lights and the standard lighting equations.
or
The pixel shader then interpolates texture coordinates
between the vertices and uses them with the texture image ðcurrent position  previous positionÞ=
in order to assign colours to pixels in the rasterized trian-
ðcurrent time  previous timeÞ ð1bÞ
gles. Having the ability to write vertex and pixel shaders
allows us to program the rendering behaviour of the GPU Similarly, angular velocity is the change in orientation
and to have more creative special effects that cannot be in a period of time and can be calculated by
done in the fixed-function pipeline.
ðcurrent orientation  previous orientationÞ=
4.3.3. Physics engine. The ‘[a]ctual purpose of a physics ðcurrent time  previous timeÞ ð2Þ
engine for games is to create convincing illusion of real Similar to velocity, linear acceleration is the change of
world dynamics’.2 For games, it is not necessary to calcu- linear velocity during a period of time. The angular accel-
late the most accurate results; instead, calculating approxi- eration is the change of angular velocity during a period of
mate results in milliseconds is necessary to run the game time. Linear and angular acceleration can be calculated by
in real time. following formulas, respectively, given by De Sousa:28
The basic concepts of game physics include, but are not
limited to, the following terms: ðcurrent velocity  previous velocityÞ=
ðcurrent time  previous timeÞ ð3aÞ
• time;
• position; and
• mass;
• velocity; ðcurrent angular velocity  previous angular velocityÞ=
• acceleration; ðcurrent time  previous timeÞ ð3bÞ
• force.
The centre of mass is the point of an object from where
all mass distribution is equal, frequently called the centre
A physics engine needs to measure both the duration of
of gravity. If there are no external forces, the exact centre
events and spatial distances of objects to determine the
of mass of an object is the point that balances any object
spatial relationship between objects and to create motion
that is stationary . It can be calculated by the sum of all
under force. Time is a quantity that is used to measure the
the masses of all the points of an object multiplied by their
duration of events and the intervals between them.
positions, and then dividing the total by the sum of all the
Position, on the other hand, is a relative distance between
masses, or the total mass.28 The equation can be shown as
objects. Generally, the term position is used for the dis-
tance of an object from the origin in 3D Cartesian CentreofMass = ðPosition i * mass iÞ=mass ð4Þ
space.28,29
When two objects collide with each other, how their In real life, the centre of mass can be calculated by
momentum will change depends on their masses. Mass is selecting a set of distinct points of the object and using
248 Journal of Defense Modeling and Simulation: Applications, Methodology, Technology 13(2)

those points to find an approximate result or by using point position and one for the radius), so they are quite
mechanical tools working on a trial and error basis.28 In cheap to store. Furthermore, spheres are invariant under
games, 3D objects are generally represented by collision rotations, which makes them the most efficient kind of
volumes, which are regular primitive shapes, such as a collision primitive for rigid bodies.32 Due to their simpli-
sphere or box, and the physics engine uses these primitives city, collision detection of spheres can be done with sim-
to calculate the centre of mass. It can also be defined ple maths. Two spheres A and B intersect, if the distance
manually like mass value.2 between their centres cA and cB is not more than the sum
The key equation of motion in physics is the basic force of their radii rA and rB (Figure 10(a)). Bergen32 states that
equation and its derivatives. In order to make an object
move from one location to another in a realistic manner, a A ∩ B 6¼ Ø ≡ kcA  cB k ≤ rA + rB ð7aÞ
force must be applied to the object.26 The term ‘force’ is
Because calculating the distance between two given
actually used for ‘linear force’, which is a force that affects
points requires square root operations, which takes more
the centre of mass of an object. When a force is applied to
time to compute than primitive arithmetic operations such
an object, it exerts a linear effect on the object, usually
as additions and multiplications, the expression would be
resulting in acceleration of the object, and thus a change of
faster to compute if written as1,32
velocity.24 The equation can be shown as

! A ∩ B 6¼ Ø ≡ kcA  cB k2 ≤ ðrA + rB Þ2 ð7bÞ


Force( F ) = MassðmÞ * AccelerationðaÞ ð5Þ
For Microsoft XNA Game Studio, the code for this algo-
When a force is applied to an object, it results in both a rithm would be as Figure 10(b).2
linear force and an angular force. An angular force is a The ‘DistanceSquared’ method bypasses square root
force that only rotates the object without changing its posi- operations, but provides the same information when used
tion. This type of force is called torque. To calculate the to compare with the square of the sum of radii.
torque, the first thing to find is the distance vector from
the point, the force applied, to the centre of mass of the b. Ray casting. Ray casting is one of the most important
object. This is called the arm of the force. After that the concepts in computer graphics. It is actually an intersection
cross-product of the arm with the force is used to find the test like collision detection. Almost every 3D application
final torque.24 The equation can be shown as uses ray casting techniques, including the ones that do not
have any interaction between objects, because rendering a
!
Torqueðτ Þ = armðrÞ × Forceð F Þ ð6Þ 3D scene to a 2D screen is also done with ray casting.1,29
Ray casting is heavily used in games. Referring to
A physics engine requires a collision detection system Figure 10(a), for example, we might want to know whether
to detect the constraints for solving the Newtonian equa- character A has a direct line of sight to character B. To
tions of motion. In fact, a physics engine can be based on determine this, a directed line segment from character A to
a much broader foundation, including determining the
Lagrangian equations of motion by using known con-
straints. Usually, the reduction of dimensionality via
known constraints provides equations of motion that have
better stability when solving mathematically, especially in
physical systems that model frictional forces.23

a. Collision detection. Even the simplest 2D game needs


a collision detection system. ‘Breakout’ (developed by
Atari in 1976) is a typical example of a simple 2D game. (a)
A ball bounces off walls, bricks and the paddle and the
core of the game experience depends on a 2D collision if (Vector3.DistanceSquared(posA, posB) <= Math.Pow((radA + radB), 2))
algorithm.29 return true; // Collision detected
The primary purpose of a physics engine’s collision else
detection system is to determine whether the objects in the return false; // No collision

game world have come into contact. To answer this ques-


tion, it is necessary to represent each logical object by one (b)
or more geometric volumes.22 Spheres are the simplest
type of primitives for collision detection systems. A sphere Figure 10. (a) Collision detection between two spheres. (b)
can be represented using only four scalars (three for centre Collision detection algorithm between two spheres.
Aktasx and Orc
xun 249

pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
character B can be cast. If the ray hits character B, we (V :c) ± (V :c)2  V 2 (c2  r2 )
know that A can see B. However, if the ray strikes some d= ð11Þ
V2
other object before reaching character B, we know that the
line of sight is being blocked by that object.1,22 As it is known that V is a unit vector and V2 = 1, the
Ray casting is a perfect solution when collision detec- equation can be simplified as
tion for a small and fast object is needed.2 A collision qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
detection that depends on the intersection of collusion d = (V :c) ± (V :c)2  c2 + r2 ) ð12Þ
volumes may fail for a bullet, because in that kind of sys-
tem, intersections are tested for an exact moment in time Because of the principal square root, a solution can be
and repeated again when the positions of the objects are defined only if the discriminant of the equation ((V · c)2–
updated. However, a bullet may move too much more than c2 + r2) is equal to or greater than zero. If the value is less
its size until the next check, and the collision will probably than zero, then no solution exists, which means the ray
be missed. With ray casting, the collision between a bullet does not intersect with the sphere. If the value is equal to
and a collidable can be detected properly.21 zero, then the ray intersects with the sphere at a single
As noted by Orcun,2 ray casting is also needed to do point, which also means the ray is a tangent to the sphere.
the picking of 3D objects, which actually means to be able If the value is greater than zero, than two solutions exist,
to select objects by firing rays at them. In a 3D editor, for which means the ray intersects with the sphere at two
example, the user may want to click on the screen and points.1,23,32
select the object the cursor is pointing at. Three-dimen-
sional applications like CAD tools also use ray casting 5. Summary and conclusions
methods to provide that kind of feature.21 Ray casting
5.1. Summary
against a spherical collidable can be done as given by
Figure 11.1,23,32 As noted earlier in Section 1, the real motive behind this
Equation for a sphere has centre c, and radius r: study was to investigate and obtain the necessary technical
background and know-how to develop a real-time strategy
kx  c k2 = r 2 ð8Þ game and apply it later on a case study.

Equation for a ray, starting from the origin, through the


unit vector V to d distance (long): 5.2. Conclusions
As noted earlier in the article, game development is a spe-
x = dV ð9Þ cial kind of software development. In developing com-
puter games the creation and the use of art contents are
Equations can be combined as heavily included. Specifically, the increasing emphasis on
movie-like production values has required larger teams
kdV  ck2 = r2 ð10aÞ and greater specialization of roles played by team mem-
bers. At the pre-production stages, game designers, writers
d 2 V 2  2d(V · c) + c2 = r2 ð10bÞ
and concept artists undertake an active role to form the
d 2 V 2  2d(V · c) + c2  r2 = 0 ð10cÞ game design. At the production stages, the programming
team works in parallel with graphics artists, sound artists,
When solving the quadratic equation for d, two possible level designers and game testers or a QA department to
solutions can be shown as bring to life the game design. Towards the end of the pro-
duction, marketing and distribution teams undertake an
important role to finalize the entire development process
and create a commercial success. It should also be stressed
that there is no single way to develop computer games.
In this article, game development processes and meth-
odologies were examined at a broad scope. Naturally, the
broadness of the scope reduces the level of detail. All the
design elements and different phases of the development
process, and the technical aspects, such as ray-casting and
ray-tracing algorithms, shading techniques and approaches
to AI, could be described and analysed in more detail.
There are also many research areas that are up-to-date,
Figure 11. Ray–sphere intersection test. such as the possibility of the use of non-real-time lighting
250 Journal of Defense Modeling and Simulation: Applications, Methodology, Technology 13(2)

and rendering techniques, known as global illumination (or 14. Manninen T, Kujanpää T, Vallius L, et al. Game production
indirect illumination),which depends on the simulation of process, a preliminary study (ELIAS project reports),
real-life photon behaviours, within a real-time game envi- LudoCraft, ELIAS-project (European Union Interreg III A
ronment. In any case, this article may provide a general Karjala), University of Oulu, Finland, 2006.
understanding of the various aspects of computer game 15. Grassioulet Y. A cognitive ergonomics approach to the pro-
cess of game design and development. TECFA, University of
development, and may give the reader a wide-range over-
Geneva, Switzerland, 2004.
view for the future studies that may focus in detail on spe- 16. White W, Koch C, Gehrke J and Demers A. HYPERLINK
cific aspects of the game development. ‘‘http://www.cs.cornell.edu/bigreddata/publications/2009/
As an extension of this study and using the techniques cacm-p42-white.pdf’’ Better Scripts, Better Games.
summarized in this article, a relatively small prototype of Communications of the ACM 52(3): 42–47, March 2009
the ‘Gallipoli Wars’ game has emerged. The prototype (Revisited on October 5, 2014).
consists of only a single playable level, which covers the 17. Finney K. 3D game programming all in one. Premier Press,
British landing at V Beach (southwest tip of the Gallipoli Boston, MA, 2004.
peninsula). The aim of the level is repulsing the British 18. E Lengyel. (ed.) Game engine gems. Volume One. Jones and
attack by commanding the Turkish soldiers. Bartlett Publishers, Sud-bury, MA, 2011.
19. Pipho E. Focus on 3D models. Premier Press, Indianapolis,
IN, 2003.
Funding 20. Ward, J., What is a Game Engine? HYPERLINK "http://
This research received no specific grant from any funding www.gamecareerguide.com/features/529/what_is_a_game_.
agency in the public, commercial or not-for-profit sectors. php%20%20%20%20%20%20%20%20%20(revisited"
http://www.gamecareerguide.com/features/529/what_
is_a_game_.php (revisited on Oct5, 2014)
References 21. Zerbst S and Düvel O. 3D game engine programming.
Thomson Course Technology PTR, Boston, MA, 2004.
1. Crawford C. Chris Crawford on game design. New Riders 22. Gregory J. Game engine architecture. A. K. Peters Ltd,
Publishing, Indianapolis, IN, 2003. Wellesley, MA, 2009.
2. Orcun E. A Preliminary study for the development of a real 23. Eberly D. 3D game engine architecture. Morgan Kaufmann
– time strategy game: Gallipoli Wars. MS Thesis, Basxkent Publications, San Fransisco, CA, Elsevier Inc., 2005.
University, Department of Computer Engineering, January 24. Eberly D. Game physics. Morgan Kaufmann Publications,
2011. Elsevier Inc., 2004.
3. Bates B. Game design. 2nd ed.Thomson Course Technology 25. Luebke D, Reddy M, Cohen D, et al. Level of detail for 3D
PTR, Boston, MA, 2004. graphics. Morgan Kaufmann Publishers, San Fransisco, CA,
4. Rollings A and Morris D. Game architecture and design. Elsevier Science, 2003.
New ed. Pearson Education, New Riders Publishing, 26. Harrison LH. Introduction to 3D game engine design using
Indianapolis, IN, 2004. DirectX 9 and C#. Apress, Berkeley, CA, 2003.
5. M Wolf. (ed.) The video game explosion: a history from 27. Sánchez D and Dalmau C. Core techniques and algorithms
Pong to Playstation and beyond. Greenwood Press, in game programming. New Riders Publishing,
Westport, CT, 2008. Indianapolis, IN, 2004.
6. Bergeron B. Developing serious games. Hingham, MA: 28. De Sousa BMT. Game programming all in one. Premier
Charles River Media, 2006. Press, Portland, OR. 2002.
7. Fullerton T, Swain C and Hoffman S. Game design work- 29. McShaffry M. Game coding complete. 3rd ed.Course
shop, a playcentric approach to creating innovative games. Technology PTR, Boston, MA, 2009.
2nd ed.Morgan Kaufmann Publications, Burlinton, MA, 30. Bourg D. Physics for game developers. O’Reilly and
Elsevier Inc., 2008. Associates Inc., Sebastopol, CA, 2002.
8. Salen K and Zimmerman E. Rules of play - game design fun- 31. Bourg D and Seeman G. AI for game developers. O’Reilly
damentals. The MIT Press, Cambridge, MA, 2004. Media, Sebastopol, CA, 2004.
9. Rollings A and Adams E. Andrew Rollings and Ernest 32. Bergen G. Collision detection in interactive 3D environ-
Adams on game design. New Riders Publishing, ments. Morgan Kaufmann Publishers, San Fransisco, CA,
Indianapolis, IN, 2003. Elsevier, 2004.
10. Rouse R. Game design: theory & practice. 2nd ed.Wordware
Publishing, Inc., Plano, Texas, 2005.
11. Brathwaite B and Schreiber I, Challenges for game Author biographies
designers. Charles River Media, Boston, MA, 2009.
12. McCarthy D, Curran S and Byron S. The complete guide to Prof. Dr A Ziya Aktasx received his BS and MS from
game development. Art and Design, The Ilex Press Limited, the Middle East Technical University (METU) in Ankara.
Lewes, East Sussex, UK, 2005. He received his PhD from Lehigh University, USA. He
13. Schell J. The art of game design. Morgan Kaufmann has visited Vienna Technical University, Austria, and
Publishers, Burlington, MA, Elsevier Inc., 2008. Purdue University, Indiana, USA. He served as the first
Aktasx and Orc
xun 251

chairman of the Department of Computer Engineering at Appendix: list of symbols and


METU starting in 1977 for a total of ten years. He is the abbreviations
author of a software engineering book published by
Prentice Hall in the USA. He is a member of the a Acceleration
!
Association for Computing Machinery (ACM). His recent F Force
interest areas are software engineering, cloud computing, m Mass
IS (Information Systems) modelling, data mining, knowl-  Summation
edge management and engineering. t Torque
V Unit vector
Mr Emre R Orcxun received his BS and MS degrees from 2D Two dimensional
the Computer Engineering Department of Basxkent 3D Three dimensional
University, Ankara. His MS Thesis was on the game devel- AI Artificial intelligence
opment field supervised by the first author. A preliminary GPU Graphics processing unit
application of Gallipoli Wars of 1915 in Dardanelles was GUI Graphical user interface
developed as an application of a real-time strategy game QA Quality assurance
during the thesis. He now manages a game development
firm named Corvus Games Ltd in Ankara.

You might also like