I’m getting pretty excited about Splatterfield. I’ve been writing notes about cool things to add and how I think everything should fit together for the last couple of weeks, but today was the first day that I tried my hand at programming anything.
Unfortunately, it wasn’t directly related to the game. Instead, I spent the day working with Panda3D, a 3-D rendering engine built in C++ and Python.
On the shoulders of pandas
If I had all of the time in the world, I would love to sit down and build as much of Splatterfield by hand as possible. However, given that I don’t have all of the time in the world (and am not a game programmer by trade), it would seem prudent for me to find an engine to use as a starting point. I considered the Unreal UDK, and even wrote a few basic classes for PyGame, but it seems like Panda might be a better fit for the game that I am trying to make. The Unreal Engine seemed a bit like overkill and PyGame seems to focus more on 2-D style of games.
It’s nice that it is already written in Python, a programming language that I am at least a little bit familiar with by now, as that is what a game that my brother and I were working on was built in. Also, it seems to have decent community support and also
Hello, Panda
So I decided to give it a try. I ran into a few issues with it running a different version of Python than the one I had been using, so I ended up doing some uninstalling. But then everything started working fine.
I decided to run through the Panda “Hello World” type tutorial in the official documentation. The tutorial introduces you to a few of the basic components of a Panda program: the render tree, tasks, and actors. The render tree is a node structure that determines what is drawn to the screen. Tasks seem best suited for game logic and recurring actions. Actors are the characters and other objects in the game that have specific animations.
So I created the base map, populated it with a panda and gave the panda a simple walking animation. Then, since walking in place is a bit goofy even for my taste, I had the panda move around the world in a back and forth pattern.
Then, feeling a bit mischievous, I made a loop to add 150 micro-pandas. It’s a start to global domination.
There’s clearly a lot to learn, but at least the documentation is thorough and there seem to be a lot of other tutorials online as well.
And all of that is only the programming part of the project. That doesn’t count any work that would need to be done with the models, sound effects, music and the like.
But one step at a time.
Today, hello panda, tomorrow, perhaps a bit of actual Splatterfield code.
Comments