Game Development Reference
In-Depth Information
Assembly Language
All of these first-generation video games were programmed in some flavor of assem-
bly language. Assembly language is a very low-level language that sits right on top of
the processor. It
s one step above inputting the machine code (for example, the actual
hex instructions sent to the CPU), though it
'
'
s not a very big step. Each instruction
translates directly to a series of machine code instructions. For example, here ' san
instruction written in ×86 assembler:
mov byte ptr [eax],61h
This instruction translates to the following machine code:
C6 00 61
As you can see, assembly language is quite a step up from machine code. It
stypicallyjust
as fast, too, since the instructions translate directly into small sets of machine code instruc-
tions, although there are certain machine code optimizations a programmer might want to
do.Forthemostpart,thiswasthewaygamesweredevelopedforquitesometime.
'
Learn Assembly Language
Nothing will help you truly understand what
s happening inside the processor
better than learning assembly language. Simply reading a book or Web page
doesnt count. You need to actually do something useful with it, like get
yourself an Atari 2600 emulator and an assembler capable of building Atari
ROMs and make a simple game. You will be incredibly frustrated just trying
to render a single line, but I guarantee that you will learn more by doing this
than learning just about any other language. As a bonus, you
'
ll also be forced
to learn the extreme importance of commenting your code. It will also vastly
increase your debugging skills.
'
Assembly language worked well enough for older games since they were smaller and
simpler than the games we have today. The typical working model at Atari was to lock
one programmer in a room for several months to create a game. Contrast that with
the 100 or so people we had on The Sims Medieval at its peak. If we had written The
Sims Medieval entirely in assembly language, we
d still be working on it. As games got
more complex and processors got even faster, it was time to move up to the next level.
'
C/C++
The C programming language was originally created by the late Dennis Ritchie at
Bell Labs in the early 70s. It was originally designed for use with the UNIX operating
system, but it had the capability of being platform independent. That
assembly language is completely dependant on the instruction set of the CPU.
'
s a big one
 
 
 
Search WWH ::




Custom Search