Linux Games Programming.pdf
(
3519 KB
)
Pobierz
238836929 UNPDF
Programming Linux Games
John R. Hall
Loki Software, Inc.
January 15, 2001
2
Contents
Work In Progress
i
1 The Anatomy of a Game
1
A Quick Survey of Game Genres . . . . . . . . . . . . . . . . . . . . . .
2
Simulation Games . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
First Person Shooters . . . . . . . . . . . . . . . . . . . . . . . . .
4
Real-time Strategy Games . . . . . . . . . . . . . . . . . . . . . . .
5
Turn-based Strategy Games . . . . . . . . . . . . . . . . . . . . . .
7
Role-playing Games . . . . . . . . . . . . . . . . . . . . . . . . . .
7
Puzzle Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
Multi User Dungeons . . . . . . . . . . . . . . . . . . . . . . . . . .
9
A Quick Look Under The Hood . . . . . . . . . . . . . . . . . . . . . . . 11
The Input Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . 11
The Display Subsystem . . . . . . . . . . . . . . . . . . . . . . . . 12
The Audio Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . 13
The Network Subsystem . . . . . . . . . . . . . . . . . . . . . . . . 13
The Update Subsystem . . . . . . . . . . . . . . . . . . . . . . . . 14
The Game Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3
4
CONTENTS
2 Linux Development Tools
17
Programming Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
NEdit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Compiling Programs Under Linux . . . . . . . . . . . . . . . . . . . . . 21
Using The Make Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Creating Makeles . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Working With Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Static Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Shared Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Linux Linker Quirks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Debugging Linux Applications . . . . . . . . . . . . . . . . . . . . . . . 33
Compiling For Debugging . . . . . . . . . . . . . . . . . . . . . . . 33
The GNU Debugger, gdb . . . . . . . . . . . . . . . . . . . . . . . 34
The Data Display Debugger . . . . . . . . . . . . . . . . . . . . . . 40
Bug Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Project Management With CVS . . . . . . . . . . . . . . . . . . . . . . 42
A Brief CVS Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . 43
Other Useful Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Rapid Text Searching with grep . . . . . . . . . . . . . . . . . . . . 49
Updating Source with di and patch . . . . . . . . . . . . . . . . . 50
3 Linux Gaming APIs
53
Times Have Changed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
CONTENTS
5
Graphics APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
SVGALib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
General Graphics Interface, LibGGI . . . . . . . . . . . . . . . . . 56
Simple DirectMedia Layer, SDL . . . . . . . . . . . . . . . . . . . . 56
ClanLib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
OpenGL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Plib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Glide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Xlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Graphical User Interface Toolkits . . . . . . . . . . . . . . . . . . . . . . 59
GTK+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Tk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Fltk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Qt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
SDL GUI support . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Audio APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
The Open Sound System, OSS . . . . . . . . . . . . . . . . . . . . 61
Advanced Linux Sound Architecture, ALSA . . . . . . . . . . . . . 61
The Enlightened Sound Daemon, EsounD . . . . . . . . . . . . . . 62
The Open Audio Library, OpenAL . . . . . . . . . . . . . . . . . . 62
Scripting Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Tcl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Guile and MzScheme . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Python and Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Networking APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Plik z chomika:
DeLuxisStudio
Inne pliki z tego folderu:
AI Game Wisdom.pdf
(38666 KB)
3D Geometry Tuts.rar
(11543 KB)
3D Math Primer for Graphics and Game Development Souce Code.rar
(7434 KB)
3D Math Primer for Graphics and Game Development.pdf
(22680 KB)
A First Course in Linear Algebra.pdf
(6576 KB)
Inne foldery tego chomika:
Adobe Premiere CS4 - Kurs Video PL
Adobe Premiere CS4 + aktualizacje + crack
Adobe Premiere Pro CS4 + crack
Dokumenty
Galeria
Zgłoś jeśli
naruszono regulamin