Panda3D Manual: Introduction to Panda
  <<prev top next>>     

Panda3D Basics

Panda3D is a 3D engine: a library of subroutines for 3D rendering and game development. The library is C++ with a set of Python bindings. Game development with Panda3D usually consists of writing a Python or C++ program that controls the Panda3D library.

Panda was created for commercial game development, and its primary users are still commercial game developers. Because of this, Panda3D needs to emphasize four areas: power, speed, completeness, and error tolerance. Everyone knows what power and speed are. But completeness and error tolerance deserve some extra commentary.

Completeness means that Panda3D contains tons of unexciting but essential tools: scene graph browsing, performance monitoring, animation optimizers, and so forth. These things may not be sexy, and as a result, open-source engines often don't have them. But when you're serious about getting work done, and not just playing, these tools need to be there.

Error tolerance is about the fact that all game developers create bugs. When you do, you want your engine to give you a clear error message and help you find the mistake. Too many engines will just crash if you pass the wrong value to a function. Panda3D almost never crashes, and much code is dedicated to the problem of tracking and isolating errors.

Finally, to come back to power and speed: the best way to gauge Panda3D's capabilities is to take a look at the Sample Programs. These are short programs that demonstrate a sampling of Panda3D's capabilities. The screenshots have frame-rates in the upper-right corner, taken on a Radeon X700.

Panda3D was developed by Disney for their massively multiplayer online game, Toontown. It was released as free software in 2002. Panda3D is now developed jointly by Disney and Carnegie Mellon University's Entertainment Technology Center.

You can read more about Panda3D's Features.

Panda3D is not a Beginner's Tool or a Toy

To successfully use Panda3D, you must be a skilled programmer. If you do not know what an "API" is, or if you don't know what a "tree" is, you will probably find Panda3D overwhelming. This is no point-and-click game-maker: this is a tool for professionals.

If you are just getting started with programming, we suggest that your best option is to start with a class on programming. Alternately, you could try teaching yourself using a training tool like Alice, also from CMU.

Some people have seen screenshots of childrens' games written in Panda3D, and concluded that Panda3D is graphically limited. Not so. Developers of childrens' games often choose not to use shaders or other advanced graphics, because children often own older hand-me-down computers. But Panda3D supports the full range of what modern engines should: it provides convenient support for normal mapping, gloss mapping, HDR, cartoon shading and inking, bloom, and a number of other things. It also allows you to write your own shaders, making it capable of anything. The one big shortcoming, at this time, is that dynamic shadows are not handled automatically: to use dynamic shadows, you have to write your own shaders. This will change soon.

People sometimes have the mistaken impression that Panda3D is written in python, which would make it very slow. But Panda3D is not written in python - it's written in C++. The python is just for scripting, developers usually write the performance-intensive bits in C++. To see what kind of framerate a small Panda3D program typically gets, take a look at the screenshots of the Sample Programs. Those were taken using a Radeon x700. Of course, only a sample program can run at 400fps like that, but but for a real game, 60fps is quite attainable. One caveat, though: to get that kind of performance, you need to understand 3D cards and 3D performance optimization. It doesn't happen automatically. Panda3D includes profiling tools you need to hit 60fps.

Panda3D's Software License

Panda3D's license was meant to be a typical free software license, very similar to the BSD and MIT licenses. However, when we created the license, we made one mistake which classifies the license as not free.

The mistake is this: we put in a clause that says you must give all modifications back to the community. Ie, if you make a change, you can't keep it to yourself - you have to email it back to us. Note that a game developed in Panda3D doesn't count as a modification, only alterations to the Panda3D source code count as modifications.

That may seem like a not-so-bad rule, but Richard Stallman explained to us that this makes it not free software. We, the Panda3D developers, are now planning to change the Panda3D license to make it truly free. Unfortunately, ownership of Panda3D's copyrights are being transferred right now, and until that's done, the license is frozen. It could take quite a while for the transfer to be finished, so the bad clause is in there for the forseeable future.

You have to decide for yourself whether or not the "give modifications back" rule is a deal-breaker. Aside from that clause, the license is a pretty typical free software license, not unlike the BSD license.

You can read Panda3D's License.

Who is Working on Panda3D

There are a number of developers in the commercial and open-source community. Currently, the two most active members of the development community are Disney and the Entertainment Technology Center at Carnegie Mellon. Because both organizations have specific goals, Panda3D must necessarily serve both:

  • Disney's primary interest in Panda3D is commercial. Panda3D is being used in the development of a number of Disney games and amusement-park exhibits. To serve Disney's needs, Panda3D must be a fully-featured engine, capable of all the performance and quality one expects in any 'A-grade' commercial title.
  • The Entertainment Technology Center's primary goal is education. To serve the Entertainment Technology Center's needs, Panda3D must be well-suited for use in student projects. Since students have a unique talent for causing crashes, bulletproof reliability is needed. Since projects only last one semester, the learning curve must be very short, and prototyping must be very rapid.

As it turns out, the two sets of goals are complementary. The rapid development and high reliability needed by the Entertainment Technology Center are also highly advantageous in a game-development studio, since they lower development time and costs. The good visual quality and full feature set needed by Disney to make a professional-quality game also turn out to be useful in a university setting: with a broad range of features at their disposal, students can explore their creativity more fully than they could with a more limited engine.

The most supported language is Python. Though you can use C++ too, the documentation is mostly aimed at Python use.

The Introductory Chapter

This introductory chapter of the manual is designed to walk you through some of the basics of using Panda3D. This chapter is structured as a tutorial, not as a reference work.

  <<prev top next>>