C++ vs. Python

Hi all,

I’ve been looking for some engines to base a game off of and Panda3d looks useful. However, I’m not sure about the C++ and Python I’ve been seeing thrown around - the Features pages looks the same, regardless of which is selected. Are they interchangeable? Can I do the same thing with C++ that I can do with Python in Panda3d and vice-versa?

Thanks in advance.

Hi! Welcome to the community. :slight_smile:

Panda3D was intended to be an engine for use with Python, so there are a few high-level features (that are not performance-critical) that we implement in Python. However, all of the most important underlying technology is in C++. We’ve been trying to make it easier for C++ users to use Panda, but the documentation is still a little sparse at times, so you’d have to expect to be reading the API reference and source code a few times.

However, a majority of the APIs are the same in Python and C++; often, using an interface from Python works more or less the same as using it in C++. So yes, you can do more or less the same in the end, with a few minor exceptions that usually aren’t too painful to work around.

The good news, though, is because Panda is mostly implemented in C++, you can use Python and enjoy the benefit of a rapid development process without necessarily losing out on performance. :slight_smile:

Thank you. I’m sort of new to coding in general, and he sorts of things I’d want to do are physics/collisions, (mild) AI, and visual/graphics rendering, among other things - from what you said, it seems like it’s possible to do all that in C++, right? I’m not really sure what the limits are here.

I believe that all of that should be feasible in C++.

I’d like to note that–unless you specifically want to create your own–there are extant middleware solutions for physics and collision, I believe. I don’t know how well integrated–if at all–they are on the C++ side, however, so you may have a little more work there than if you were using Python.