Skip to content
Home » Panda3D Part 3 – Run Your Panda3D Game

Panda3D Part 3 – Run Your Panda3D Game

Spread the love

In the previous part of the series we wrote a basic Panda3D app. Here’s the test.py file we created, this time without comments so that you can see how long it actually is:

from direct.showbase.ShowBase import ShowBase

class Slugrace3D(ShowBase):
    def __init__(self):
        ShowBase.__init__(self)

app = Slugrace3D()
app.run()

Running your app

We used the Run Python File in Terminal button in the upper right corner to run the app. I also mentioned it wasn’t the only way to run your app. So, let’s see how we can run a Panda3D app in Visual Studio Code (or any other app, to be precise).

1) the Run Python File in Terminal button

The first way to run the app is by pressing the Run Python File in Terminal button in the upper right corner (A). This is what we already did. Here you can see the application window (B) and the terminal (C).

Run Python File in Terminal button

2) Run the Panda3D App Without Debugging in the Run menu

You can also go to the Run menu and select Run Without Debugging:

Run App Without Debugging

Your Panda3D Magazine

Make Awesome Games and Other 3D Apps

with Panda3D and Blender using Python.

Cool stuff, easy to follow articles.

Get the magazine here (PDF).

3) Start Debugging option in the Run menu

There is also the Start Debugging option in the Run menu. You can choose it and then select a Debug Configuration. Go ahead and select the first option, Python File:

Start Debugging option

4) Hotkeys

For the previous two options you can also use hotkeys:

     – F5 to start debugging

     – Ctrl + F5 to run without debugging

Python Jumpstart Course

Learn the basics of Python, including OOP.

with lots of exercises, easy to follow

The course is available on Udemy.

5) Context menu

You can also right-click anywhere in the editor tab where the code of your file is and select Run Python File in Terminal:

Context menu

That’s it for today. You know what a basic Panda3D app looks like and how to run it. In the next part we’ll learn how to configure our project.

Blender Jumpstart Course

Learn the basics of 3D modeling in Blender.

step-by-step, easy to follow, visually rich

The course is available on Udemy and on Skillshare.

Here’s the video version of this article:


Spread the love

Leave a Reply