190
Video Game Design Foundations
Choice of Language
Computer languages all do one thing, translate syntax into machine code.
Machine code
is a binary language that consists of only two characters:
0 and 1. The programming language used to code the game will do nothing on
the computer until it is compiled into machine code.
Some programming languages use fewer words, more symbols, or have
more built-in methods. The choice of language used when programming has
more to do with a programmer’s likes and dislikes than functionality. Some
programmers like computer languages that use syntax that is the most natural
for them to understand. These languages typically have many built-in methods
that they commonly use so they do not have to write custom methods. Others
prefer to write custom methods and use many symbols as names for variables
and methods so they are faster to type.
Some languages are designed for financial calculations and have many
built-in methods like SUM, AVERAGE, DEVIATION, and more. Other languages
are designed for physics and have methods for VELOCITY, ACCELERATION,
TANGENT, and more. A programming language takes a very long time to create,
so it is usually written to a specific audience of users. The memory and speed
of computers has greatly increased the ability of computer languages to hold
more methods and calculate them quickly. This allows for a language to
grow and include more specialty components. This makes the language more
appealing to more people because they can write more types of programs easily
with the same language.
Other issues with the choice
of computer language have to do
with compatibility. A language
may not compile properly for
a specific type of computer. A
computer that could run BASIC
language well might not be
able to compile C++ or Java.
Fortunately, most computers
today have the ability to compile
in many different formats. Modern game engines and design software also have
the ability to save in different language formats so the game can play on multiple
devices. Consequently, the compatibility issues are quickly going away as
programs come out that translate one computer language to another quickly and
accurately. Today, an efficient game engine may allow the design team to make
the game once and compile it to work on many different platforms.
Flowchart
To create a module within a game, it is important to plan all of the parts
of the operation using a flowchart or other organizational tool.
Flowcharts
have different text box shapes and connectors to add visual detail to a decision
process, as shown in Figure 5-18. A flowchart begins with a start/terminal
shape and the name of the problem. At an endpoint of a flowchart would be an
end/terminal shape and a solution to the problem, as illustrated in Figure 5-19.
A flowchart works well to map out a process, system, and module.
CHEAT CODE: COMPATIBILITY
When things or people work
well together, they are said to be
compatible. This applies to computers
and computer languages as well.
Previous Page Next Page