What Videogames Are Made Of

Apr 2, 2009

Videogames Have 2 “Materials”

Videogames are composed of 2 general things: data (images, sounds, songs, levels) and code (computer instructions).

Images and sounds are made wit gh image and audio editing programs. Levels are also usually made in something like an image editor – but instead of placing shapes, the software is used to place walls, items, and characters. When making videogames, creating the level editor is part of the process. Although many commercial videogames do not openly share their level creation software, a few do.

Code is like a film script. However, whereas a film script can be followed without interruption, interruption is precisely what a player does. Because of this, code is a situational script. Rather than:

Jenny walks in.

JOHN: How was your day?

…code would have the account for changes the player might have made, reading:

If the door isn't locked, Jenny walks in.
(Otherwise, she knocks.) 

JOHN (if Jenny is in the room): How was your day?
JOHN (Otherwise): I think Jenny is locked out.

Programming skips a lot of the fluffy prose, though. You’ll also notice that I’m struggling to use a consistent format for the options above, and it seems like there are a few ways to write it. Programming has special use of punctuation and keywords to fit patterns like this that come up frequently – this is called a Conditional If/Else Statement. Our example might look this way in code:

if( door.isLocked == false ) {
    Jenny.enter( theRoom );
} else {
    Jenny.knocks( theDoor );

if( theRoom.contains( Jenny ) ) {
    John.say( "How was your day?" );
} else {
    John.say( "I think Jenny is locked out." );

If you can connect the above to the film script text that precedes it, you’re ready to dive into the basics of programming. A program called a compiler then translates that human-readable typed language into many obscure characters, which act as detailed instructions to the computer’s processor. Every videogame and program you own, whether on a computer, home gaming system, or mobile phone, exists somewhere in a readable form somewhat like the program code above, but usually only the machine-readable output is distributed, to protect company secrets.

Programming is only a tiny bit of memorization, a little making things up and relating them to each other in a meaningful way, and mostly the proper use of a few basic patterns. It’s impossible to write a German poem without knowing the language, it’s difficult to compose music without knowing how to play an instrument; for videogames, programming is the language and the instrument. There are plenty of free online resources and affordable beginning books out there if you’re looking to learn more. I would recommend starting with C, the programming language that is the foundation of C++ (the modern programming language used for most downloadable/installed programs), or ActionScript 3 (a language closely related to C++, designed for making web programs).

Getting Started

Start small. Very small. Smaller. I have seen many game developers give up on their dream after starting a project outside their scope, even starting on projects as modest as a Mario-style platformer, tiny RPG, or sparse FPS game. If your goal is to ever play your dream game, it’s more likely to happen if you’ll start with modifications to games and making classic arcade games. Your first attempt at novel writing wouldn’t be War and Peace, right?

Modifying a commercial videogame can be easier than it sounds. Some modern games for home computers come with level editors, scenario editors, or plain text data formats where you can experiment with altering game content. Working with professional tools and environments can help you soak up lessons from decades of industry development experience. This is a good way to get the attention of peers, since a new level in a popular FPS game or a new unit in a hit RTS title resonates better with a mainstream audience. This is good practice working on the scale and types of games that are put together by huge teams of professionals, learning about the challenges of workflow and specialization. It’s also helpful that if you make a level for great commercial game and it’s not fun, you can safely identify that the level needs work, and it’s probably not the guns or player movement that need tweaking.

As fellow indie game developer John Nesky recently explained to a mutual friend, “It’s easier to start with something that works, then change it into something else that works, than starting with something unfinished and figuring out what’s broken.” Find some sample source code for a retro game – Pong, Breakout, Asteroids, etc. – then try reshaping it piece by piece into a slightly different game. Unlike modding a huge modern game with editing tools, when you’re working with full source code for a tiny project, you’re free to modify every part of how the game works. Even better, you can make those big changes without throwing away thousands of hours of work done in level layouts, weapons code, or enemy behavior that counted on a particular way the player’s character moved.

I generally recommend against using special game building software like Game Maker or languages like DarkBasic if you have a long-term interest in game development. These approaches force severe limitations and scale poorly to the real methods that use traditional programming languages.

If you have already dabbled in making levels, or modding games, and would like some sample source code to tinker with, there a ton of example source files on net. I’m also giving away some of the example ActionScript 3 videogame source that I prepared for students recently:


The most important thing to do: get started! You can learn most of what you’ll want to learn for free by experimentation, and from internet sources. The internet is crawling with open-source programmers. Learning jet engineering or structural engineering by experimentation is a recipe for disaster, but learning videogame programming by experimentation is perfectly safe.

(Originally posted as GameDevLessons.com Vol. 1 Sec. 1)

Este artículo está disponible en español. Traducción por cortesía de Andrés de Pedro.

Learn and practice team game development with Gamkedo Club.
Membership worldwide. Professional support. Proven process.

Subscribe by e-mail to receive weekly updates with Gamkedo.Community interviews and YouTube training videos for game developers!

All contents Copyright ©2017 Chris DeLeon.

Site production by Ryan Burrell.