Panda3D 1.6 Game Engine Beginner's Guide


Panda3D 1.6 Game Engine Beginner's Guide
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • The first and only guide to building a finished game using Panda3D
  • Learn about tasks that can be used to handle changes over time
  • Respond to events like keyboard key presses, mouse clicks, and more
  • Take advantage of Panda3D's built-in shaders and filters to decorate objects with gloss, glow, and bump effects
  • Follow a step-by-step, tutorial-focused process that matches the development process of the game with plenty of screenshots and thoroughly explained code for easy pick up

Book Details

Language : English
Paperback : 356 pages [ 235mm x 191mm ]
Release Date : February 2011
ISBN : 1849512728
ISBN 13 : 9781849512725
Author(s) : David Brian Mathews
Topics and Technologies : All Books, Game Development, Beginner's Guides, Games, Open Source, Python, Web Graphics & Video

Table of Contents

Preface
Chapter 1: Installing Panda3D and Preparing a Workspace
Chapter 2: Creating the Universe: Loading Terrain
Chapter 3: Managing Tasks Over Time
Chapter 4: Taking Control: Events and User Input
Chapter 5: Handling Large Programs with Custom Classes
Chapter 6: The World in Action: Handling Collisions
Chapter 7: Making it Fancy: Lighting, Textures, Filters, and Shaders
Chapter 8: GUI Goodness: All About the Graphic User Interface
Chapter 9: Animating in Panda3D
Chapter 10: Creating Weaponry: Using Mouse Picking and Intervals
Chapter 11: What's that Noise? Using Sound
Chapter 12: Finishing Touches: Getting the Game Ready for the Customer
Appendix A: Creating a Sky Sphere with Spacescape
Appendix B: Using Egg-Texture-Cards and ExploTexGen
Appendix C: Pop quiz Answers
Index
  • Chapter 1: Installing Panda3D and Preparing a Workspace
    • Getting started with Panda3D installation packages
    • Time for action – downloading and installing Panda3D
    • Switching to an advanced text editor
    • Time for action – downloading and installing Notepad++
    • Installing the game content
    • Time for action – demoing Suicide Jockeys
    • Installing optional tools
      • Blender and Chicken
      • Spacescape
      • Explosion Texture Generator
    • Summary
    • Chapter 2: Creating the Universe: Loading Terrain
      • Notepad++
      • Setting up a new file in Notepad++
      • Time for action – setting up a new file in Notepad++
      • Importing Panda3D components
      • Time for action – importing DirectStart
      • Creating a World Object
      • Time for action – creating a World Object
      • Loading the terrain
      • Time for action – loading the terrain
      • Loading files into Panda3D
        • The model path
        • Eggs
        • Bams
      • NodePaths and nodes
      • Time for action – introducing NodePaths and nodes
        • Manipulating NodePaths
      • Time for action – manipulating NodePaths
      • The Scene Graph
      • Time for action – understanding parent child inheritance
      • Time for action – explaining relative coordinate systems
      • Loading a file multiple times
      • Render attributes
      • Time for action – demonstrating render attributes
      • Summary
      • Chapter 3: Managing Tasks Over Time
        • The task manager
        • Time for action – printing the task list from the task manager
          • Avoiding multiple task managers
          • Adding tasks to the task manager
        • Time for action – creating a task and adding it to the task manager
        • Time for action – looking at task statistics
          • Adding a delay to tasks
        • Time for action – using doMethodLater
        • Using delta time
        • Time for action – using delta time
        • Over viewing task return options
          • About the None type object
        • Time for action – exploring task return options
        • Prioritizing tasks
        • Removing tasks from the task manager
        • Time for action – removing tasks by name
        • Dissecting task objects
        • Summary
        • Chapter 4: Taking Control: Events and User Input
          • Working with events
          • Time for action – registering and responding to events
          • Using keyboard events
            • Using a key map
          • Time for action – creating and using a key map
          • Implementing advanced cycle controls
          • Time for action – implementing acceleration
          • Time for action – implementing throttle control
          • Time for action – implementing turning
          • Utilizing mouse input and creating camera control
          • Time for action – tying the camera to the cycle
            • Reacting to mouse movement
          • Time for action – turning the camera with the mouse position
          • Ending event response
          • Summary
          • Chapter 5: Handling Large Programs with Custom Classes
            • Importing custom classes
            • Time for action – making and importing a custom class
            • Adding NodePath functionality to a custom class
            • Time for action – defining the Cycle class
              • Simulating drift
            • Time for action – simulating drift
            • Accessing classes from within another class
            • Time for action – adding an input manager
            • Summary
            • Chapter 6: The World in Action: Handling Collisions
              • Collision basics: Our first collision system
              • Time for action – creating a simple collision detection system
              • Creating inter-cycle collisions
              • Time for action – inter-cycle collisions
              • Using BitMasks to organize collisions
              • Time for action – implementing BitMasks
              • Time for action – setting a range of bits with BitMask.range
              • Using Python tags to get colliding objects
              • Time for action – setting and getting PythonTags
              • Setting up ground collision
              • Time for action – creating a ground collision system
              • Overview of additional collision solids and handlers
                • Collision solids
                • Collision handlers
              • Summary
              • Chapter 7: Making it Fancy: Lighting, Textures, Filters, and Shaders
                • Adding lighting
                • Time for action – adding lights to the game
                  • Types of lights
                • Applying textures to models
                • Time for action – creating a bam writer
                  • Texture stages
                • Time for action – using TextureStages
                • Creating filters
                • Time for action – adding a bloom filter
                • Using a sky sphere
                • Time for action – adding a sky sphere
                • Summary
                  • Chapter 9: Animating in Panda3D
                    • Actors and Animations
                    • Time for action – loading Actors and Animations
                    • Controlling animations
                    • Animation blending
                    • Time for action – blending two animations
                    • Creating and using Actor subparts
                    • Time for action – playing animations on subparts
                    • Exposing joints
                    • Time for action – animating our cycles
                    • Summary
                    • Chapter 10: Creating Weaponry: Using Mouse Picking and Intervals
                      • Using mouse picking
                      • Time for action – setting up mouse aim
                      • Understanding Intervals, Sequences, and Parallels
                        • Sequences and Parallels
                      • Creating machine guns
                      • Time for action – using Intervals in Sequences and Parallels
                      • Time for action – adding collision detection to the MachineGun
                      • Implementing the main cannon
                      • Time for action – creating the main cannon
                      • Adding weapon information to the HUD
                      • Time for action – adding a new HUD section
                      • Handling damage response
                      • Time for action – finalizing weapons with damage response
                      • Summary
                      • Chapter 11: What's that Noise? Using Sound
                        • Editing Config.prc
                        • Time for action – selecting an audio library
                        • Adding music
                          • AudioSound objects
                          • AudioManager objects
                        • Time for action – creating background music
                        • Adding sound effects
                        • Time for action – generating 3D audio with Audio3DManager
                        • About sound intervals
                        • Summary
                        • Chapter 12: Finishing Touches: Getting the Game Ready for the Customer
                          • Collecting garbage
                          • Time for action – collecting garbage from the Explosion classes
                          • Time for action – collecting garbage from the Gun classes
                          • Time for action – collecting garbage from the Cycle class
                          • Time for action – collecting garbage from the Track class
                          • Creating a preloader
                          • Time for action – creating a preloader to load models
                          • File handling
                          • Time for action – reading data from a file
                          • Customizing the mouse cursor
                          • Time for action – customizing the mouse cursor
                          • Creating an Installer
                          • Time for action – packing a Panda3D game
                          • Summary
                          • Appendix A: Creating a Sky Sphere with Spacescape
                            • Learning Spacescape basics
                            • Time for action – getting started with Spacescape
                            • Blending layers
                            • Time for action – blending layers to create nebulas
                            • Using point stars and billboard stars
                            • Time for action – populating the sky with stars
                            • Creating a sky sphere from a skybox made with Spacescape
                            • Time for action – populating the sky with stars
                            • Time for action – creating the sky sphere in Panda3D
                            • Summary
                            • Appendix B: Using Egg-Texture-Cards and ExploTexGen
                              • Using ExploTexGen
                              • Time for action – reading the ExploTexGen documentation
                              • Time for action – designing an explosion
                              • Creating flipbook animations with egg-texture-cards
                              • Time for action – using egg-texture-cards
                              • Additional egg-texture-card options
                              • Summary
                              • Appendix C: Pop quiz Answers
                                • Chapter 2: Creating the Universe: Loading Terrain
                                  • Starting Panda3D and loading models
                                  • Using NodePath and understanding scene graph inheritance
                                • Chapter 3: Managing Tasks Over Time
                                  • The task manager
                                  • Delta time
                                  • Task return options
                                • Chapter 4: Taking Control: Events and User Input
                                  • Working with events
                                  • Using keyboard input
                                  • Utilizing mouse input
                                • Chapter 5: Handling Large Programs with Custom Classes
                                  • Importing custom classes
                                  • Accessing custom classes from other classes
                                • Chapter 6: The World in Action: Handling Collisions
                                  • Regarding basic collision detection
                                  • Understanding handlers that generate events
                                  • Understanding BitMasks
                                  • Using Python tags
                                  • Complex collision detection
                                • Chapter 7: Making it Fancy: Lighting, Textures, Filters, and Shaders
                                  • Using lights
                                  • Understanding textures and TextureStages
                                  • Setting up a sky sphere
                                • Chapter 8: GUI Goodness: All About the Graphic User Interface
                                  • Understanding DirectGUI
                                  • Creating a Heads Up Display
                                • Chapter 9: Animating in Panda3D
                                  • Animation basics
                                  • Advanced animation
                                • Chapter 10: Creating Weaponry: Using Mouse Picking and Intervals
                                  • Mouse picking
                                  • Intervals
                                • Chapter 11: What's that Noise? Using Sound
                                  • Making music
                                  • Sounding off
                                • Chapter 12: Finishing Touches: Getting the Game Ready for the Customer
                                  • Garbage collection
                                  • Using a custom mouse cursor
                                  • Building an installer

                                David Brian Mathews

                                David Brian Mathews is a graduate in Electronic Visualization program from the University of Illinois at Chicago. He began programming in the fifth grade with QBASIC and has been designing games of various kinds, from table-top board games to computer games, since childhood. Prior to entering higher education, he served for two years in the United States Navy as a nuclear engineer before being honorably discharged for medical reasons, where he learned discipline, advanced mathematics, and nuclear theory, as well as teamwork and leadership skills. During his years in school, Mathews earned valuable experience with professional game development methods working both by himself and with teams. He is skilled at programming, 3D modeling and animation, drawing, and 2D compositing.
                                Sorry, we don't have any reviews for this title yet.

                                Code Downloads

                                Download the code and support files for this book.


                                Submit Errata

                                Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                                Errata

                                - 1 submitted: last submission 06 Mar 2013

                                Errata type: Code | Page number: 98 | Errata date: 16 September 11

                                Step 9. The code used to define a new Drift method.

                                The line: "f(vecDiff < .1 and vecDiff > -.1):" should read: "if(vecDiff < .1 and vecDiff > -.1):"

                                 

                                Sample chapters

                                You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                                Frequently bought together

                                Panda3D 1.6 Game Engine Beginner's Guide +    Moodle 2.0 for Business Beginner's Guide =
                                50% Off
                                the second eBook
                                Price for both: $39.00

                                Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                                What you will learn from this book

                                • Create and use tasks
                                • Respond to and handle events
                                • Implement texturing with built-in shaders
                                • Exercise collision detection
                                • Implement a graphical user interface
                                • Utilize the Panda3D animation system
                                • Master the power and purpose of intervals
                                • Add audio and use the OpenAL library
                                • Understand garbage collection
                                • Package the game into an installer
                                • Use Spacescape and explosion texture generator to create certain art assets

                                In Detail

                                Panda3D is a game engine, a framework for 3D rendering and game development for Python and C++ programs. It includes graphics, audio, I/O, collision detection, and other abilities relevant to the creation of 3D games. Also, Panda3D is Open Source and free for any purpose, including commercial ventures. This book will enable you to create finished, marketable computer games using Panda3D and other entirely open-source tools and then sell those games without paying a cent for licensing.

                                Panda3D 1.6 Game Engine Beginner's Guide follows a logical progression from a zero start through the game development process all the way to a finished, packaged installer. Packed with examples and detailed tutorials in every section, it teaches the reader through first-hand experience. These tutorials are followed by explanations that describe what happened in the tutorial and why.

                                You will start by setting up a workspace, and then move on to the basics of starting up Panda3D. From there, you will begin adding objects like a level and a character to the world inside Panda3D. Then the book will teach you to put the game's player in control by adding change over time and response to user input. Then you will learn how to make it possible for objects in the world to interact with each other by using collision detection and beautify your game with Panda3D's built-in filters, shaders, and texturing. Finally, you will add an interface, audio, and package it all up for the customer.

                                This is a simple but detailed guide to using Panda3D, which will take you from a blank text file all the way through the Python programming process to a finished game with a single level, including such topics as handling tasks over time, event handling and response, collision set up and detection, audio, and more.

                                Approach

                                This book is a step-by-step, tutorial-driven guide to game or application development using Panda3D that follows the process used in professional development. You will learn through first-hand experience how a Panda3D developer goes from literally nothing to a finished product. Along the way there are illustrations to explain difficult topics and to display the results of progress, as well as a complete archive of thoroughly explained code for every tutorial. Every single code file the reader saves is mirrored in the example code, finished and explained. In addition, every art and audio asset required by the tutorials is provided, so the user need not provide any assets of their own.

                                Who this book is for

                                If you are an independent developer  interested in creating your own video games or other 3D applications using Panda3D for personal or commercial distribution at minimal expense, this book is definitely for you. A basic understanding of general programming, such as familiarity with the concept of a variable, is necessary. Some familiarity with object-oriented programming and the Python language is expected, but not essential.

                                This book does not cover the creation of three dimensional models or similar art assets, nor does it cover the creation of two dimensional art assets or audio assets.

                                Code Download and Errata
                                Packt Anytime, Anywhere
                                Register Books
                                Print Upgrades
                                eBook Downloads
                                Video Support
                                Contact Us
                                Awards Voting Nominations Previous Winners
                                Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                                Resources
                                Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software