Create a simple 3D application with Pand3D's SDK and the Python programming language. Make this the first step in becoming a games programmer.
The most important question that any mew games programmer can ask themselves is not "what game should I create?". It is actually "which games engine should I choose?". If they do ask that question then one very good answer is Panda3D and there are a number of reasons for that. Panda3D:
Above all, Panda3D is incredibly easy to use.
The Panda3D SDK (Software Developer's Kit) can be downloaded from the Panda3D web site: http://www.panda3d.org Here the programmer will find installation packages for:
It's then just a matter of following the instructions and in just a few minutes the ordinary programmer will be ready to become a games programmer.
Just to make sure that the programmer really appreciates the versatility of the games engine, Panda3D come with some demo games already installed. The programmer can, therefore, test out games such as Asteroids or Boxing Robots.
Panda3D has no IDE (Integrated Design Environment). Instead it allows the programmer to choose the environment in which they want to program. For example the programmer may choose to use:
However, the process is always the same:
The next stage is, of course, to write the code.
Not only does Panda3D come with some ready to run games, but it also comes with some ready to use models. It is, therefore, easy to create a simple application. One which will, for example, load a terrain and then spin a camera around it:
#Load the classes to be used from math import pi, sin, cos from direct.showbase.ShowBase import ShowBase from direct.task import Task
#Create a new class for the game
class MyApp(ShowBase):
_def __init__(self):
__ShowBase.__init__(self)
__# Load the environment
__self.environ = self.loader.loadModel("models/environment")
__# Render the model
__self.environ.reparentTo(self.render)
__# Scale the model
__ self.environ.setScale(0.1, 0.1, 0.1)
__self.environ.setPos(-8, 42, -10)
__# Spin the camera
__self.taskMgr.add(self.spinCameraTask, "SpinCameraTask")
_# The camera spinning function
_def spinCameraTask(self, task):
__angleDegrees = task.time * 6.0
__angleRadians = angleDegrees * (pi / 180.0)
__self.camera.setPos(20 * sin(angleRadians), -20.0 * cos(angleRadians), 3)
__self.camera.setHpr(angleDegrees, 0, 0)
__return Task.cont
#Run the game
app = MyApp()
app.run()
Github: https://github.com/panda3d/panda3d