Using C++ for Panda3D - a few questions

Hi. I’m new to Panda3D, and I’d like to learn more about it… :stuck_out_tongue:

Firstly, I have some C++ experience, but I don’t know a thing about Python (which Panda3D is meant for). I know that Panda3D is also callable from C++, but after trying it for a bit, there seems to be quite a few problems.

Problems I’ve faced so far:

  1. Lack of complete/updated documentation
  2. No support for Panda3D events (keyboard, animation, etc.)

So I would like to know if there’s anything that can help me learn Panda3D in C++ properly, cause right now its pretty hard (I’m just a student :frowning: ).

Thanks in advance! :slight_smile:

  1. Right, has been lamented often and by by many users. But the Python API is very close to the C++ API. In fact all the method arguments are documented in C++ style, just the method names are transformed (underscore + lowercase letter becomes a single uppercase letter). Beyond this: feel the source, Luke.

  2. You could have a look at the class PandaFramework, in particular the method PandaFramework::define_key. The pview source is a good place to see how to use this method. Handles keyboard events.


learn python – its a very very very good language – i could never go back to c++ again.

Python is very nifty, but the die hard C programmer in me still refuses to accept a scripting language as a proper platform for developing a complete game. I have no problem using scripting for demos and small games, but if ever I have the choice, I always prefer the low level control I have in source code.

If you’re 2 or 3 guys making a hobby-type game, then save yourself the trouble and go with python. It’s not worth the headaches and in-fighting you will have with doing it all in C++.

Well… I’m a console game programmer… and it’s true… you use C++ or C# more than python and that’s why I’m trying to make an example game with Panda3d… my idea is to get it work and to post it to have it as a little documentation (or a better than nothing really… :S)

There are several forum topics in this section which address events, and key presses etc.
And speaking of demos, there is a Roaming Ralph in C++ demo available: