How assembly code. Furthermore, it was very

How
the use of assembly language in game programming has dwindled.                                                                                            

                                                                                                            -Sagar
Thapa

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

 

                                                                                                            22
Dec 2017

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

                                                                                                                                                Thapa 1

 

                        How the use of assembly
language in game programming has dwindled 

                       

Assembly language has
stuck in the gaming industry for a very long time. In the beginning of the game
development era, using assembly code was the best way to save space, and ensure
speed for the games. With the introduction of C, there came a time, when
developers preferred a combination of assembly and C to make games run faster. Recently,
however, C++, with its superior cycle length, speed and the inclusion of better
compilers, has been empowered to do all of those things. The size of the
programs alone is becoming an issue. Consequently,
assembly language is rarely used in game and console development nowadays.

            For a modern-day programmer,
understanding the underlying processes of compilation and generation of machine
level code, and the ability to manipulate such process is of great importance. With
the introduction of C++ however, these concerns have been limited, as the
programmer no longer needs to worry about the small issues, and focus on the
issue at hand. For game developers, the speed at which the game runs is very
important. This is because on one hand faster games tend to become popular among
the general public, while at the other, they tend to outsell the slower games. Sometimes,
faster games meant that the programmers had enough space to include some new
graphics, which gave video games new heights, and separated them from the rest
of the market. For decades, programmers used assembly language to make maximum
use of memory, thus resulting in faster and more efficient games. However, as games
got bigger and bigger, it became very difficult to write in assembly code. This
paved the path for C programmers. C provided a friendlier environment, as a
single line in C accounted for multiple assembly code. Furthermore, it was very
easy to analyze the code once you have written it, thus making debugging very simple.

Then
came the era of C++. Programmers had been relentlessly working to develop new
compiler designs. With C++, it started to reach parity with C compilers. This meant
that programmers could easily create programs, which were just as fast as any C
program. Apart from this, C++ was an object-oriented language, which opened new
ways to improve program speed, since object-oriented programs were much more
efficient. This caused an industrial switch to C++, and even C started to
become obsolete. Programmers would still use C and assembly to make small tweaks
here and there, but the major portion of the programs were now written in C++.

             Around mid-2000s, with more and more complex
programs coming, it became almost impossible to manually optimize the produced
code. People started to realize that it is far more productive to start writing
gaming code in C++, rather than try to make tweaks in the finished program. Furthermore,
the programs were so complex that making changes could very easily result in a
lot more issues than were originally, so they were best left alone. Writing an
optimizer code in C++ to make these small tweaks was just far safer and efficient,
and became the new norm in the gaming industry.

            Today, if a given C++ program is
attempted to make better using assembly language, it will almost result in
identical program. On the contrary, it puts the entire program in the danger. To
list a few, games like Skyrim, Dark Souls and The Witcher 3: the Wild Hunt were
all written exclusively in C++. It is difficult to argue the decision of the
programmers, since C++ is the most powerful tool around. With its libraries,
and an entire community of C++ programmers, it makes things so much simpler.

Although assembly programing
has been revived here and there, we can be quite sure that it will never reach
the same heights, since every work can now be done with C-style language
equivalent program. Basically, what this means is that almost every purpose for
which assembly language was created can now be fulfilled with C++.

 

           

                                                                                                                                                

            Thapa 2

 

For any assembly
program, there is always going to be some C-style language to make development
faster and easier. Understanding assembly will, however, increase your
understanding of how computers work, which is still vital for developers, but
it is no longer something to write programs in. While it is true that assembly
language is still used to produced optimized code, where a high-level language
cannot do what is sometimes, we need to use a particular addressing mode or
specific registers. Then, if portability is not an issue, assembly language can
come in handy.

Assembly
has also played a huge part in the development of consoles. The gaming consoles
that came out in the 1990s, also known as fourth generation consoles, relied
heavily on assembly language to get the most out of the video games. Companies
like Sega and Nintendo are famous for programming consoles in assembly.
However, the problem was that the games had to be optimized for different
consoles, and this created a problem. Some game
series, like Castlevania, saw separate system exclusive releases rather
than an attempt to port one game to disparate platforms. Modern day
console software are rarely, if ever, programmed in assembly. For example,          the software development kit that Sony
uses to make PlayStation 4’s, are based on LLVM, and Clang, written in C++ and
C++11. For them, the support of the target platform is usually the most
considered factor. In the past, due to limited resources, and memory
restrictions, there was no choice but to use assembly.

However, even today, although not directly used in game
development, assembly language is extensively used to program device drivers,
and compatibility software. The
drivers are embedded systems, and hence they need to execute very fast. In ASM, you can create bare executables, which contain
no external dependencies. Also, sometimes, the platform it is executing on does
not have a C++ compiler or it may have extreme speed constraints. However,
because of the sophistication of modern-day computers, the second is rarely the
issue. Also, there has been a trend of writing system drivers on C and ASM –
based models. This means, that developers who want to improve these drivers, or
even want to develop new ones, can simply take them as base. Thus, it is far
easier to make something out of an existing idea than to create something completely
new, which has resulted the present monopoly. Apart from this, other areas
where assembly coding occasional occurs is the analysis of game glitches, bugs
and crashes.

It is therefore clear that although
the direct use of assembly language is dwindling, its presence in game
development is ever-lasting. Whether it is with the games themselves, or the
consoles, or other embedded programs, some portion must be written in assembly
one way or the other. Attempts have been made to make the programming
environment easier and friendlier, and this has resulted in lesser and lesser
use of assembly code on a daily basis. That does not mean that its importance
has faded though, and it certainly has not stopped people making the best use
of their memory, even though the devices we have today do not require such
measures. All in all, assembly language certainly has left its marks on gaming.

 

 

 

 

 

 

 

 

Works cited

Buuck,
Philip, “Is Assembly Language Used in Gaming Development?” 20 August 2014,          

http://philipbuuck.com/is-assembly-language-used-in-game-development.
Accessed on 20 Dec.  

2017

‘PlayStation
4 system software’,
https://en.wikipedia.org/wiki/PlayStation_4_system_software.  Accessed

            On 20 Dec. 2017

“Why
Are Drivers and Firmwares  Almost Always Written
in C or ASM and Not in C++?”. Accessed  
on

20 Dec 2017

 

 

 

 

 

 

Go Top
x

Hi!
I'm Rita!

Would you like to get a custom essay? How about receiving a customized one?

Check it out