In the previous part of the Panda3D series we tested all the animations for our slug model. We are now ready to start our Slugrace3D project and load all the actors and models.
We could place all the code in one file, but this file would quickly grow very large and hard to handle. That’s why we’ll create several files and make them communicate. We’ll start with just three files, but then we’ll add some more.
Anyway, open your project folder in VSC. There should be two folders, actors and models, and two files, myConfig.prc and test.py.
The test.py file is just for testing purposes. Our game will start in a main.py file, which we don’t have just yet. So, go ahead and create it in VSC. Next, we’ll need one file for our slug actor and one for the terrain model. So, create two more files and name them slug.py and terrain.py respectively. Here are all the files and folders in VSC:
For now let’s leave them all empty. In the next part of the series we’ll fill in some initial code in the main.py file.