PacktLib: Panda3D 1.7 Game Developer's Cookbook

Panda3D 1.7 Game Developer's Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Setting Up Panda3D and Configuring Development Tools

Introduction

Downloading and configuring NetBeans to work with Panda3D

Configuring Visual Studio 2008 to work with Panda3D

Understanding Panda3D's runtime configuration options

Setting up the game structure

Building Panda3D from source code

Creating and Building Scenes

Introduction

Loading terrain

Loading and attaching sounds to objects

Creating a scene using C++

Adding an additional camera

Inspecting and modifying the scene

Modifying the scene graph

Moving objects based on time

Controlling actions using intervals

Making animations fit to intervals

Making objects follow a predefined path

Making the camera smoothly follow an object

Generating geometry at runtime

Loading data asynchronously

Controlling the Renderer

Introduction

Changing a model's render attributes

Adding an alpha mask to a texture

Creating a splitscreen mode

Controlling the rendering order

Using multiple displays

Scene Effects and Shaders

Introduction

Adding lights and shadows

Using light ramps

Creating particle effects

Animating textures

Adding ribbon trails to an object

Creating a flashlight effect

Making objects reflect the scene

Adding a custom shader generator

Applying a custom Cg shader

Post-Processing and Screen Space Effects

Introduction

Adding built-in post-processing effects

Building custom effects

Adding a scanline and vignette effect

Adding a color grading effect

Adding a depth of field effect

Building a deferred rendering pipeline

2D Elements and User Interfaces

Introduction

Rendering text to the screen

Rendering images to the 2D layer

Playing a movie file

Creating an interactive user interface

Making the user interface data-driven using XML

Application Control

Introduction

Toggling window and fullscreen modes

Controlling game state

Decoupling modules using events

Handling events more elegantly

Managing recurring tasks

Collision Detection and Physics

Introduction

Using the built-in collision detection system

Using the built-in physics system

Using the ODE physics engine

Using the PhysX physics engine

Integrating the Bullet physics engine

Networking

Introduction

Downloading a file from a server

Using assets hosted on a server

Sending high scores to a server

Establishing a network connection

Sending and receiving custom datagrams

Synchronizing object state between server and client

Debugging and Performance

Introduction

Debugging Python code

Debugging C++ code

Using the PStats tool for finding performance bottlenecks

Improving performance by flattening scenes

Implementing performance critical code in C++

Input Handling

Introduction

Handling keyboard and mouse input

Implementing an abstraction layer for supporting multiple input methods

Handling input from an Xbox 360 controller

Recording and simulating user input

Reading audio data from a microphone

Reading video data from a webcam

Reading input data from a network

Packaging and Distribution

Introduction

Packing assets into multifiles

Creating a redistributable game package

Advanced package creation and hosting

Embedding a game into a website

Using website and plugin interoperability

Connecting Panda3D with Content Creation Tools

Introduction

Setting up the Blender export plugin

Exporting models from Blender

Generating model files programmatically

Using the "Pview" tool to preview models

Compressing and converting model files using pzip and egg2bam

Index