Palm OS Game Programming

Palm OS Game Programming

by Nicholas Pleis

Multimedia Set(Book & CD-ROM)

8 New & Used Starting at $1.99


To the average person, a Palm OS PDA is merely a handy calendar and address book. As a game programmer, however, you see its potential as much more than that. You see a device ready to be programmed with an array of exciting games. This book shows you how you can accomplish just that. Beginning with a detailed discusion of how the OS works, you will soon be writing your own programs as you learn about loading and drawing bitmaps, physics, Artificial Intelligence, and many advanced concepts of Palm OS programming. Before beginning, you will need to have a working knowledge of C and C++ as well as some experience using a Palm device, although experience programming a Palm is not required. As you progress though the book, you will develop a game framework that you can use as you create your own games in the future.
About the Author
Nicholas Pleis is founder and lead developer at Cataract Software. He has been a featured speaker at various conferences, including the Xtreme Game Developer's Conference. His recent work has centered on development for the Palm OS and Pocket PC platforms. He has successfully completed research in autonomous robotics and computer adaptive testing, and has professional-level experience in Web and desktop development.

Product Details

ISBN-13: 9781931841191
Publisher: Premier Press
Publication date: 01/01/2002
Series: Premier Press Game Development Ser.
Edition description: Book & CD-ROM
Pages: 423
Product dimensions: 7.42(w) x 9.10(h) x 0.99(d)

Table of Contents

Part 11
Chapter 1Getting Started3
So You Want to Be a Game Programmer4
Who Is This Book For?4
How to Choose Your Device5
The Long Haul6
What You'll Need7
Choosing a Compiler7
Other Software8
Understanding Game Development9
The Development Cycle9
Go Team! (or Go Solo)16
Chapter 2The Hardware19
The PDA20
A Brief History20
Thinking Like a User23
The Future of PDAs25
The Palm Philosophy25
"Sophisticated Simplicity"26
Looking to the Future28
The Desktop Companion28
Palm Input29
The Touch Screen29
Hard Keys35
Alternative Input Methods36
Designing Input37
Simple Is Better37
Under the Hood38
Not a Desktop Machine41
Storage and Code Design42
Smaller Is Better, Isn't It?43
Chapter 3Writing Your First Program45
Hello World46
Not Really C46
The Code47
Taking a Closer Look49
The Palm Event Loop51
Understanding Events51
Using the Event Manager52
Compiling Your Program53
Debugging Code59
The Palm OS Error API59
Debugging with POSE61
Part 269
Chapter 4The Bare Essentials71
Setting Up72
Full Screen or Windowed?72
Working with Resources73
Introducing the Bitmap74
The Resource Compiler75
Drawing Your Bitmap86
Creating Windows86
A Simple Way to Draw89
Double Buffering90
What Is Double Buffering?91
Creating a Secondary Buffer94
The Canvas Class95
The Basic Design95
Working with a Canvas98
Getting Things Going with the SystemManager99
Polling the OS99
Using the SystemManager103
Working with Color105
Chapter 5Reading and Writing Files109
A Break from Tradition110
Palm Databases110
The Data Manager113
Creating a New Database113
Opening a Database114
Data Manager Error Codes120
File Streaming122
Opening a Stream123
Reading from a Stream125
Writing to a Stream126
Cleaning Up127
Controlling Streams127
Error Codes130
Chapter 6Bring on the Sprites133
What Is a Sprite?134
Bringing Your Games to Life134
A Typical Sprite135
Working with Animation138
How Animation Works138
A Simple Example139
Controlling Animation142
What Is a Mask?146
Making Sprites Transparent148
Using Transparency Wisely148
A Palm-Sized Sprite Library149
Working with Animation149
Chapter 7Input159
Input and the OS160
Input Management160
Breaking the Mold162
EventType Structure163
The Touch Screen164
Using Graffiti164
Tracking the Stylus168
The Buttons170
The Hard Key Dilemma170
Handling Hard Keys171
The Future172
The Input Class172
Designing a Reusable Input System172
Chapter 8Working with Tiles187
Understanding Tiles188
What Is a Tile Exactly?188
Collision Detection191
Implementing a Tile Engine193
Tile Sets193
Map Format194
Tile Engine Classes195
Chapter 9Physics: The Science of Your World207
Why Is Physics Important?208
A World without Physics208
What Is Physics?209
Basic Collision Detection210
Bounding Boxes210
Detecting Collisions212
Implementing a Collision Scheme214
Kinematics Equations: The Mathematics of Motion216
Linear Motion217
Putting Kinematics to Work223
Influencing Motion by Force224
May the Force225
Newton's Laws225
Forces, Practically Speaking228
Responding to Collisions230
Implementing a Physics System231
Chapter 10Bringing It All Together: Building a Reusable Game Engine243
The Framework244
What's a Framework?244
The PGL_Presentation Class246
Input and the Framework248
PGL-man: A Game Example248
The User Interface249
Basic Game Architecture256
The Welcome Screen258
The High Scores Screen259
The Game Code267
Part 3281
Chapter 11Multiplayer Games283
Designing for Multiplayer284
1.Design Early, Design Often285
3.Different Devices, Different Experiences286
5.Multiplayer Option or a True Multiplayer Game?287
Communicating via Sockets287
Communication Methods288
Net Support290
Establishing a Connection291
Sending and Receiving Data298
Closing a Socket300
Internet Game Programming301
Implementing a Multiplayer Game302
A Typical Multiplayer Game304
Chapter 12Artificial Intelligence309
What Is Artificial Intelligence?310
SI Techniques312
Finite State Machines312
Environment-Based SI312
Genetic Programming314
Neural Networks316
Practical SI on the Palm OS316
Path Finding317
Decision Making322
Environmental SI326
Fuzzy Logic and Machine Reasoning328
A Brief Introduction to Set Theory329
Limitation of Traditional Sets330
Fuzzy Sets330
Fuzzy Set Theory333
Chapter 13Advanced Topics337
Multisegment Applications338
General Workarounds339
Segmenting CodeWarrior Applications340
Segmenting a PRC-Tools Application342
Localizing Your Application345
The String Table345
The Palm OS International API346
Client-Side Prediction349
Working with Client-Side Prediction349
Prediction Side-Effects350
The GCC New Allocator352
A First Solution352
A New Problem352
A Bitmap Cache354
A Brief Introduction to Bitmap Caching354
Implementing a Simple Cache355
Using the PGL_CanvasCacheManager356
Chapter 14Publishing Your Palm Game361
Publishing Your Game on Your Own Web Site363
Using a Well-Known Web Site365
Using a Publisher366
Appendix ASound369
Appendix BSelected Palm API Reference377
Appendix COther Language Options391
Appendix DResources397
Appendix EWhat's on the CD401

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews