Just a couple of Questions

I downloaded Panda3D yesterday, and I have to say I am really impressed. Since I am new I do have a couple of questions maybe someone could help me out with :slight_smile:

  1. When creating a .py file I am using PyPE 2.4, how much knowledge of Python does a person need to create a game using this engine? I’m not sure if this question is clear enough but I know very little Python, but I am really good at C++, I have used Torque Script, and I have designed quite a few DirectX game engines (simple nothing compared to this of course). Anyway can a game be created using no Python at all or should I spend a lot of time getting familiar with that language before I attempt anything here.

  2. If I was to create an entire game using script would the game be slow or do you recommend changing the game engine?

  3. Also for a project at my college I have to demonstrate using a 3D game engine and add some features to the engine itself. First what folder is the source for the actual engine in? Then can I just recompile using Visual Studio?

I am really happy I found this game engine, the tutorial is really well written, and the forums seem pretty active. I am looking forward to developing an application using this engine.

Thanks in advance for the help

  1. You will find that most of the documentation on this site is geared towards the Python programmer, and mostly describes how to use Panda from Python. However, the engine itself is written in C++, and it is completely possible to write an entire game in C++ that links with the engine, and never involves Python at all. You will need to learn how to translate from the Python documentation presented in the manual back into the C++ interface (it’s not difficult).

You will probably also want to download the Panda source code and have it available at least as a reference, since it is fairly well documented internally (it is this internal documentation that is used to generate the API documentation available on this website; but if you are reading the comments in the source code directly you won’t need to worry about the translations to Python that are done automatically in the API documentation).

On the other hand, Python is a fantastic language to use, and is really quite easy to learn, especially for someone already comfortable in C++. Furthermore, coding in Python is many times faster than the equivalent coding in C++. If you have no personal objection to learning Python, you might want to give it a try.

  1. It is possible to write a slow game in any language, if you are not careful. But we have found that the overhead associated with using Python as a game language is minimal. You can easily write a full-performance application using Python. There are many excellent examples already written with Python and Panda that prove this.

  2. Since the “game engine” can arguably be called the combination of the C++ core and the additional Python-specific features (such as tasks, Actors, and so on), you could conceivably extend the game engine by writing nothing but Python code. Many contributors to the Panda project have done exactly this. However, since you are a C++ programmer, you may be more comfortable adding contributions on the C++ side, and you are certainly welcome to do so. (Consider sending us your additions if you think they might be generally useful!) The C++ source code is available as a separate download. There is quite a lot of C++ code, and it is distributed across several folders. You can use Visual Studio to compile it, but it’s really designed to be compiled from the command line, and there are instructions available in the download that show you how to do this. Be warned: because this is such a large project, and because it is designed to be multi-platform, compiling it is not as straightforward as one might first imagine. It is, however, not terribly difficult.

David

Wow, thank you for your reply. I have been looking at the source code, but I notice there is no solution or project files. How would I arrange these file so I can recompile the entire engine? Do I just start adding files to a new solution and have it create an executable file, then rename that file to ppython.exe? I appreciate all of your help.

No. Panda is a much more complex project than that. It combines code, including generated code, from multiple different directories spread over multiple trees into a number of DLL’s that reference each other. ppython.exe is actually a trivial executable that sets up some environment variables and then loads python.exe. It is the Python code that in turn starts the Panda ball rolling by importing libpanda.dll.

It will be very difficult to build Panda within a Visual Studio project. You really need to use one of the command-line build systems provided. See INSTALL-MK or INSTALL-PP in the source archive.

David