Pocket PC Game Programming
Using the Windows CE Game API
André LaMothe, Jonathan S. Harbour
Résumé
Pocket PC Game Programming will help you develop the tools and source code needed to write multiplayer games that can be played on wireless devices and the Internet. You will not only learn essential programming skills for the Pocket PC, but you will also create a programming resource that contains routines that will come in handy when writing a variety of games. Pocket PC Game Programming covers the history and future of the Pocket PC platform, essential programming tools, Windows messages, the game loop, loading bitmaps, drawing animated sprites, playing sound effects, advanced programming techniques, and much, much more!
What's on the CD-ROM:
- Complete source code for the sample projects in the book
- The complete Pocket PC Game Library from the book
- Pre-compiled executables for MIPS, SH3, and ARM processors
- Pocket PC software and games from leading developers
- A list of Web resources and downloadable programs
- Download link to the free full version of Embedded Visual Tools 3.0
Part I: Writing games for the Microsoft Pocket PC Platform
Chapter 1: Introducing Microsoft Pocket PC
Reader's expectations
Requirements
The different flavors of Windows CE
Decisions, decisions
Applications
DirectX for Windows CE?
Single-Player and Network Gaming
Network games
Wireless Ethernet
Bluetooth
Ricochet
Chapter 2:The art of game design for Pocket
PC
So you want to write a game?
Going back a few years
Spacewar
What's Next?
Feasibility Study
Phases of Game Development
Divide and Conquer
Board, Puzzle, and Card Games
First-Person Shooters
Sports Games
Turn-Based Strategy Games
Real-Time Strategy Games
Role-Playing Games
Simulations
Driving Sims
Space Combat Sims
Chapter 3: Pocket PC Game Programming Tools
Game Development for Windows CE
Moore's Law
Mobile 3-D Accelerators
Mobile Gaming
Pocket Artist
Software Development Kits
Windows CE SDK for Visual Studio 6.0
Installing the Tools
Embedded Visual C++
EVC Features
EVC File Extensions
EVB Features
EVB File Extensions
Pocket C
Chapter 4: Windows CE Programming in a
Nutshell
Windows Event-Driven Architecture
Multithreading
Event Handling
The Structure of WinMain
The Structure of InitInstance
The Structure of MyRegisterClass
The Structure of WndProc
Summary
Chapter 5: Writing Your First Pocket PC
Program
Using Embedded Visual Basic
Exploring EVB
The Project Window
The Properties Window
The Toolbox
The Editor Window
Working with Graphics in EVB
Writing the User Interface Code
Writing the Graphics Test Code
Preparing to Run the Graphics Test Program
Creating the Setup Program
Inheritance
Polymorphism
Workspace Window
Output Window
Edit Window
Working with Graphics in EVC
Modifying the Project
Creating the GraphicsDemo Function
Part II: Building a Custom Pocket PC Game Library
Chapter 6: Using the Pocket PC Game API
The Pocket PC Game API
Limitations
Game API Structures
GXKeyList
GXScreenRect
GXGetDefaultKeys
GXOpenDisplay
GXCloseDisplay
GXBeginDraw
GXEndDraw
GXOpeninput
GXCloselnput
GXSuspend
GXResume
GXSetViewport
GXlsDisplayDRAMBuffer
GAPI Game Loop
Blasting Pixels to the Screen
GAPI Video Frame Buffer
Shifting Bits for Speed
Plotting Perfect Pixels
Warp Speed
Handling Buttons
Writing Blackout from Scratch
Common Windows Functions
Window Callback Function
Timer Callback Function
ClearScreen and DrawPixel 16
Initialization
Updating the Game
Collision Detection
Handling the Ball
Drawing the Blocks
Ending the Game
Chapter 7: The Game Library
Creating the Game Library Project
Precompiled Headers
GameStart
GameActivate
GameEvent
GamePaint
GameEnd
StylusDown
StylusMove
StylusUp
Game Library Source File
Initialize
EventHandler
Error
Shutdown
G_BeginDraw and G_EndDraw
GAPI Support Routines
WndProc
WinMain
MsgBox
Game Library Demo Program
Double Buffering
Summary
Chapter 8: Bitmaps
What Is a Bitmap?
Image Compression
Background Images
Sprite Images
Textures
Bitmap Info Header
Color Lookup Table
Image Data
SHLoadDIBitmap
Support Functions
Converting the DIB
Windows CE Blitting Routines
BitBlt
StretchBlt
MaskBlt
TransparentImage
The CBitmap Class
Recompiling the Library
Linking to the Game Library
Chapter 9: Sprites and Animation
What is a Sprite?
Building the Sprite Engine
Inheriting the Bitmap
Direction
Velocity
Collision Detection
Using IntersectRect
Adding CSprite to the Library
Defining the Sprite Class
Loading Static Sprite Images
Displaying Static Sprites
Writing the Sprite Class
Adding CAnimSprite to the Library
Defining the Animated Sprite Class
Loading Sprite Animation Sequences
Writing the Animated Sprite Class Fish Aquarium
Linking to the Game Library
Writing the Header
Writing the Source Code
Chapter 10: Sound Effects and Music
Understanding Sound Waves
How the Human Mind Perceives Sound
Amplitude
Digital Sound and Music
Sound Device Capabilities
Header Dependencies
CWaveDevice Definition
CWaveDevice Implementation
Wave File Reader
sndPlaySound
Fully Preemptive Playback
Queued Priority-Based Preemptive Playback
Priority-Based Preemptive Playback
CWaveOut Implementation
Wave Test Header
Wave Test Source Code
Chapter 11: Button and Stylus Input
Pocket PC User Interface
Character Recognizer
Button Input
Logical Buttons
ButtonRelease
Modifying GameLibrary.h
Modifying GameLibrary.cpp
Writing the Code
Button Test Program Source Code
Stylus Events
Building the Game
Perfect Match Game Source Code
Source Code Directories
Chapter 12: Alien Invasion
Alien Invasion
Player Ship
Enemy Ships
Winning the Game!
Game Screen
Sound Effects
User Input
Compiling the Game Library
Header File
Source Code File
Improvements
Part III Advanced Game: Programming Techniques
Chapter 13: Strategy and Tactics
The Art of Wargaming
Consoles
Supercomputers
ASCI White
Genetic Algorithms
Detecting Incoming Projectiles
Computer-Controlled Maneuvers
Tank Battle Source Code
Chapter 14: Game Physics
Making Games More Realistic Particle Attraction
Chapter 15: Intrared and Socket
Communications
Essentials of Multi-player Gaming
All About Connectivity
Network
Internet
A Server Behind Every Client
Infrared Test Source Code File
Socket Structures
Socket Test Source Code File
Chapter 16: Multiplayer Game Programming
Pocket Air Hockey
Scoring Points
User Interface and Game Layout
Client Options Screen
Background Image
Sprites
Sound Effects
Joining a Game Server
Simulating the Server
Connecting Your Pocket PC to a Network
Installing the Network Card
Using ActiveSync Over the Network
Chat Messages
Sending Chat Messages
Receiving Chat Messages
The CField Support Class
CField Source File
Stylus and Button Events
Dealing with the Puck
Updating the Score and Pausing
Displaying Chat and Status Messages
Handling the User Interface
User Interface Support Functions
Sending and Receiving Socket Messages
The Socket Thread
Establishing a Socket Connection
Initializing the Winsock Library
Sending Socket Messages
Creating the Socket Server
Epilogue: Congratulations!
The Computer Game Industry
Contacting the Author
Appendix A: Game Library Event Reference
GameStart
GameEnd
GameActivate
GameEvent
GamePaint
StylusDown
StylusMove
StylusUp
Button Press
Button Release
Appendix B: Pocket PC Web Sites
AtomToGo
CECRAFT
Filmspeed for Pocket PC
Flash Enabled
FunMail's Fun
Handango
A Brief History of Windows CE
Jimmy Software
Macromedia
Microsoft
NS Basic/CE Compiler
Orbworks
Pocket DOOM
Pocket Quake
Pocket Hexen
Pocket Movies
Smashing Ideas
Sony
The Gadgeteer
ZlOSoft
Appendix C: Recommended Reading
Appendix D: What's on the CD-Rom?
Appendix E: Installation Instructions
Index
L'auteur - André LaMothe
holds degrees in mathematics, computer science, and electrical engineering. He is the author of the best-selling books Tricks of the Game Programming Gurus, Teach Yourself Game Programming in 21 Days, and the Black Art of 3D Game Programming. Andre has also written numerous articles in Game Developer, Byte, Software Developer, and Circuit Cellar.
L'auteur - Jonathan S. Harbour
Caractéristiques techniques
PAPIER | |
Éditeur(s) | Prima Publishing |
Auteur(s) | André LaMothe, Jonathan S. Harbour |
Parution | 01/06/2001 |
Nb. de pages | 724 |
Format | 18,6 x 23,2 |
Couverture | Broché |
Poids | 1301g |
Intérieur | Noir et Blanc |
EAN13 | 9780761530572 |
Avantages Eyrolles.com
Nos clients ont également acheté
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse