Free Sample
+ Collection

Panda3D 1.7 Game Developer's Cookbook

Christoph Lang

Over 80 recipes for developing 3D games with Panda3D, a full-scale 3D game engine
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849512923
Paperback336 pages

About This Book

  • Dive into the advanced features of the Panda3D engine
  • Take control of the renderer and use shaders to create stunning graphics
  • Give your games a professional look using special effects and post-processing filters
  • Extend the core engine libraries using C++
  • Explained ready-to-use sample code along with plenty of screenshots for easier and quicker learning

Who This Book Is For

If you are a developer with experience in Python, Panda3D, and optionally C++ and shading languages and you are looking for quick and easy to integrate solutions to common game development problems with Panda3D, this book is for you.

Table of Contents

Chapter 1: Setting Up Panda3D and Configuring Development Tools
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
Chapter 2: Creating and Building Scenes
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
Chapter 3: Controlling the Renderer
Changing a model's render attributes
Adding an alpha mask to a texture
Creating a splitscreen mode
Controlling the rendering order
Using multiple displays
Chapter 4: Scene Effects and Shaders
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
Chapter 5: Post-Processing and Screen Space Effects
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
Chapter 6: 2D Elements and User Interfaces
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
Chapter 7: Application Control
Toggling window and fullscreen modes
Controlling game state
Decoupling modules using events
Handling events more elegantly
Managing recurring tasks
Chapter 8: Collision Detection and Physics
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
Chapter 9: Networking
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
Chapter 10: Debugging and Performance
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++
Chapter 11: Input Handling
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
Chapter 12: Packaging and Distribution
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
Chapter 13: Connecting Panda3D with Content Creation Tools
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

What You Will Learn

  • Develop a camera system that smoothly follows a target
  • Add lights, shadows, and particles to make your scenes more interesting
  • Use shader effects to take control of the rendering output
  • Set up custom render-to-texture pipelines for advanced render effects
  • Apply full-screen post-processing effects like depth of field and color correction to achieve cinematic and more stylized looks
  • Connect Panda3D to the network and download files, send high-score lists, and update game object states
  • Use one of the ODE, PhysX, or Bullet physics engines to add more realism
  • Get input from keyboard, mouse, a game controller, a microphone, or even a webcam
  • Debug and profile your game to find bugs and bottlenecks
  • Package your game into a bundle and make it ready for redistribution using the web browser plugin

In Detail

Panda3D is a free and open source game engine. It has been used successfully by hobbyists as well as big studios to create games ranging from quick prototypes to full-scale commercial MMOs. Panda3D makes it easy to use models, textures, and sounds to create impressive interactive experiences. With this book, you too will be able to leverage the full power of the Panda3D engine.

Panda3D 1.7 Game Developer's Cookbook will supply you with a set of recipes with step-by-step instructions to guide you to usable results quickly and take you through all the topics involved in developing games with Panda3D. First it takes a quick sweep through setting up a basic scene. Then focused articles covering advanced topics of game development carry you closer to your game development goals step by step. With each article you will be able to add more features, as the recipes guide you through getting user input from gamepads, keyboard, mouse, microphone, or even webcam, using shader effects, setting up custom render-to-texture pipelines, applying full-screen post-processing effects, adding physics with the ODE, PhysX, or Bullet physics engine, using the engine's networking capabilities with the event-driven Twisted server framework, debugging and performance profiling, and packaging your game for distribution. It will also put you in touch with other languages and technologies like C++, the Cg shading language, and the Twisted server framework.

Panda3D 1.7 Game Developer's Cookbook provides a great reference for your Panda3D game development needs and helps you to deliver impressive results more quickly and with great ease.


Read More