0%

Book Description

Over 80 recipes for developing 3D games with Panda3D, a full-scale 3D game engine

  • 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

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.

This book offers solutions to problems occurring during game development with Panda3D for people already familiar with the basics of Panda3D.

Table of Contents

  1. Panda3D 1.7 Game Developer's Cookbook
    1. Copyright
    2. Credits
    3. About the Author
    4. About the Reviewers
    5. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    6. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    7. 1. Setting Up Panda3D and Configuring Development Tools
      1. Introduction
      2. Downloading and configuring NetBeans to work with Panda3D
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      3. Configuring Visual Studio 2008 to work with Panda3D
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Understanding Panda3D's runtime configuration options
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Listing all configuration variables
          2. Loading a specific configuration file
          3. Embedding configuration data in Python code
      5. Setting up the game structure
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Building Panda3D from source code
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    8. 2. Creating and Building Scenes
      1. Introduction
        1. Getting ready
        2. How to do it...
        3. How it works...
      2. Loading terrain
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Block size
          2. Near and far thresholds
      3. Loading and attaching sounds to objects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Creating a scene using C++
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Adding an additional camera
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Inspecting and modifying the scene
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Modifying the scene graph
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Position
          2. Rotation
          3. Scale
      8. Moving objects based on time
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      9. Controlling actions using intervals
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Lerp intervals
          2. Lerp function interval
          3. Interpolation easing
          4. Sequences and Parallels
          5. Wait interval
      10. Making animations fit to intervals
        1. Getting ready
        2. How to do it...
          1. How it works...
          2. There's more...
        3. Making objects follow a predefined path
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Making the camera smoothly follow an object
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Generating geometry at runtime
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Built in vertex formats
            2. Custom vertex formats
            3. Primitive types
          5. See also
        6. Loading data asynchronously
          1. Getting ready
          2. How to do it...
          3. How it works...
    9. 3. Controlling the Renderer
      1. Introduction
      2. Changing a model's render attributes
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Adding an alpha mask to a texture
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Creating a splitscreen mode
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Controlling the rendering order
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Cull bin types
          2. Default cull bins
          3. Adding a cull bin at runtime
          4. Adding a cull bin using the configuration file
      6. Using multiple displays
        1. Getting ready
        2. How to do it...
        3. How it works...
    10. 4. Scene Effects and Shaders
      1. Introduction
      2. Adding lights and shadows
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      3. Using light ramps
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Creating particle effects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Particle Factories
          2. Particle Renderers
          3. Particle Emitters
      5. Animating textures
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Adding ribbon trails to an object
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more
      7. Creating a flashlight effect
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Making objects reflect the scene
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Adding a custom shader generator
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      10. Applying a custom Cg shader
        1. Getting ready
        2. How to do it...
        3. How it works...
    11. 5. Post-Processing and Screen Space Effects
      1. Introduction
      2. Adding built-in post-processing effects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      3. Building custom effects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Adding a scanline and vignette effect
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Adding a color grading effect
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Adding a depth of field effect
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Building a deferred rendering pipeline
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    12. 6. 2D Elements and User Interfaces
      1. Introduction
      2. Rendering text to the screen
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Rendering images to the 2D layer
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Playing a movie file
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Creating an interactive user interface
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. More controls
          2. More parameters
      6. Making the user interface data-driven using XML
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    13. 7. Application Control
      1. Introduction
      2. Toggling window and fullscreen modes
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Controlling game state
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Decoupling modules using events
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Handling events more elegantly
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      6. Managing recurring tasks
        1. Getting ready
        2. How to do it...
        3. How it works...
    14. 8. Collision Detection and Physics
      1. Introduction
      2. Using the built-in collision detection system
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Collision Shapes
          2. Collision Handlers
      3. Using the built-in physics system
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Using the ODE physics engine
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Using the PhysX physics engine
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Integrating the Bullet physics engine
        1. Getting ready
        2. How to do it...
        3. How it works...
    15. 9. Networking
      1. Introduction
      2. Downloading a file from a server
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Using assets hosted on a server
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Sending high scores to a server
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Establishing a network connection
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Sending and receiving custom datagrams
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Synchronizing object state between server and client
        1. Getting ready
        2. How to do it...
        3. How it works...
    16. 10. Debugging and Performance
      1. Introduction
      2. Debugging Python code
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Debugging C++ code
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Using the PStats tool for finding performance bottlenecks
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Improving performance by flattening scenes
        1. Getting ready
        2. How to do it...
          1. How it works...
        3. Implementing performance critical code in C++
          1. Getting ready
          2. How to do it...
          3. How it works...
    17. 11. Input Handling
      1. Introduction
      2. Handling keyboard and mouse input
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      3. Implementing an abstraction layer for supporting multiple input methods
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Handling input from an Xbox 360 controller
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Recording and simulating user input
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Reading audio data from a microphone
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Reading video data from a webcam
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      8. Reading input data from a network
        1. Getting ready
        2. How to do it...
        3. How it works...
    18. 12. Packaging and Distribution
      1. Introduction
      2. Packing assets into multifiles
        1. Getting ready
        2. How to do it...
          1. How it works...
          2. There's moreā€¦
            1. Updating a subfile
            2. Extracting a subfile
            3. Encrypting subfiles
            4. Creating multifiles on the command line
        3. Creating a redistributable game package
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Advanced package creation and hosting
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Working with modules
            2. Creating patches
        5. Embedding a game into a website
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Using website and plugin interoperability
          1. Getting ready
          2. How to do it...
          3. How it works...
    19. 13. Connecting Panda3D with Content Creation Tools
      1. Introduction
      2. Setting up the Blender export plugin
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Exporting models from Blender
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Generating model files programmatically
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Using the "Pview" tool to preview models
        1. How to do it...
        2. How it works...
      6. Compressing and converting model files using pzip and egg2bam
        1. Getting ready
        2. How to do it...
        3. How it works...