Game Development Reference
In-Depth Information
Modern game engines provide a lot of functionality to game developers, such as a 2D and
3D rendering engine, special effects such as particles and lighting, sound, animation, artificial
intelligence, scripting, and much more. Game engines are used frequently, because developing
all these different tools is a lot of work and game companies prefer to put that time and effort into
creating beautiful environments and challenging levels.
Because of this strict separation between the core game functionalities and the game itself (levels,
characters, and so on), many game companies hire more artists than programmers. However,
programmers are still necessary for improving the game engine code, as well as for writing programs
that deal with things that aren't included in the game engine or that are specific to the game.
Furthermore, game companies often develop software to support the development of games, such
as level-editing programs, extensions of 3D modeling software to export models and animations in
the right format, prototyping tools, and so on.
For JavaScript, there isn't yet an engine that everyone is using. Most people program relatively
simple games in JavaScript to make sure the games run on different devices, especially devices
with limited capabilities. So instead of using an engine, programmers write the game directly using
HTML5 elements such as the canvas . However, this is rapidly changing. If you type javascript game
engine in Google, you'll find many engines that you can use as a basis for developing your own
games. The goal of this topic is to teach you how to program games; but you won't use an engine,
because I want to teach you the core of the language and its possibilities. This isn't a manual for
a game engine. In fact, after reading this topic, you'll be able to build your own game engine.
I'm not saying you should do that, but you'll be better able to program a game from scratch and
more quickly understand how a game engine library works.
Developing Games
Two approaches are commonly used in developing games. Figure 1-1 illustrates these approaches:
the outer one encompasses the inner one. When people are first learning to program, they typically
begin writing code immediately, and that leads to a tight loop of writing, then testing, and then
making modifications. Professional programmers, by contrast, spend significant upfront time doing
design work before ever writing their first line of code.
Design
Specify
Implement
Edit
Interpret
Run
Figure 1-1. Programming on a small scale and on a large scale
 
 
Search WWH ::




Custom Search