Is Panda going to work for my Project..?

Hi everyone, (First post so go easy on me!)

Background

I’ve been coding since I first figured out how to use spectrum basic and over the years have dived head first in to a lot of other languages as well as a lot of web dev languages…

I’ve been coding in Python for about a year, including the use of wxPython, to create a few basic applications and some more advanced networking applications, like multi-threaded server debugging software for our kit in work, when I started to understand the language a little better…

I’ve recently started using my PHP and SQL knowledge to create an on-line ‘pencil and paper’ turn based RPG called ProjectNecrosis… It’s a zombie survival game.

projectnecrosis.com

It’s not brilliant, it’s nowhere near finished, it’s a long term project (5 years+), but it works quite well and the concept, if I say so myself, is a good one…

A few weeks ago we started up a community development team and since then I’ve been working hard to get the game to a stable, playable, state but questions are being asked about the future of the project and if it would be possible to take the game concept and create a 3D version of it…

This is the first time I’ve really looked in to 3D engines and when I saw this one it got my attention because of my Python knowledge.

Intended Project

I’ve been playing around with the engine and reading the manual and so far I don’t have any problems with it at all… It’s easy enough to use and I have figured out how to create player controlled characters and so on in the space of a day, which is something I never expected would happen as I’ve never worked with anything 3D apart from UnrealEd which, as you all know, isn’t the same thing.

I want to create a mix between an FPS and RTS, the game is going to be multi-player and will be a lot like the web based version of the game in the end…

To put it simply, if you haven’t taken a look at the site, you choose to play either a human or a zombie… There is a world map which is grid based and each location has diffferent structures and NPC populations, including wildlife. The main aim for a human is to secure the structures in a certain location, barricade them up so people can’t get in and then keep that stronghold safe from the undead threat… You need to go and find human NPCs to join your team and keep your base safe while you are out looking for weapons and supplies, as well as unlocking the RPG storyline and taking control of key, game changing, structures like Labs and Power Stations in an attempt to ultimately find a cure for the infection…

Zombies, obviously, try to undo the work the humans do.

In all honesty I can see how the engine might be suitable, but what I don’t want to do is invest a ton of time in to creating a basic version and then find out that I’m limited in some way and have to start over with another engine.

The original version of project necrosis was written entirely in python until I changed it to PHP, now just the server side software which ticks over turns and handles the NPCs is Python based… So, if I really wanted to, I know for a fact I could code something almost identical to the current game but PC based and have this engine provide some nice graphics to go with the turn based game I have now, it’s the FPS part I’m a little unsure of.

The players currently get the chance to control their main character as part of a ‘strike team’ which travels around the city and can also micro-manage the strongholds they create, both are currently TBS… I want the strike team to be FPS and the stronghold micro-management to be RTS…

Long story short would this engine be suitable to create a game which I want to create long term when I want to create both an FPS and RTS game mixed together in this fashion…? More importantly would it be difficult for one person to create, as I’m the only coder on the project at the moment…?

Any thoughts would be greatly appreciated…!

PS: Sorry if most of that was rambling nonsense, it happens…

I think Panda is right for you.

I would say that Panda3d definitely has the flexibility to do what you want to do, though it will probably require a bit of work from your end.

Essentially, the Panda3D engine is a fairly generalized solution to the problem of creating 3D environments in which the inhabitants of those environments can interact with each other and with external input (human or network). It’s a “models and behaviors” approach, which places its level of complexity between a couple of extremes. The abstractions it gives you make it more specific than writing your own rendering, timing, sound, and I/O engines from scratch, but it’s more general than, say, the Unreal Tournament engine. Since the top-level of the engine is interfaced via Python, you also have access to all of the other Python libraries out there, including pygame, PyXML, and the Twisted networking framework.

In terms of limitations: I’ve created a couple of medium-scale projects in the engine, and haven’t hit any limitations that weren’t my fault (i.e. no engine I am aware of would have done them better; I made mistakes like using ten-megabyte textures on an ancient graphics card, searching a ten-thousand-element set using a terribly wasteful O(n^2) algorithm, or assuming that my TCP/IP connection would send data faster than 24 packets per second and putting my TCP functions in-line in my main code body). Panda3D does its heavy-lifting in its low-level C++ code (which the Python code touches at a layer of abstraction), so things are generally fast; I’ve never hit a Python-related bottleneck, but with the engine’s built-in profiler it would be easy to determine if I had.

Given the specific problem you’re trying to solve, here are some concrete thoughts. Panda has the following features to offer you:

  • Global object-to-object messaging: There’s a central clearinghouse for messages that can be sent to objects; it’s efficient, and it could be great for both global events (i.e. sending a “Power_On” message when the humans secure a power plant and activate it) and more localized events (“House_48_Door_5_Broken”). Keyboard input also goes through the messaging system; you receive keys by listeneing to the messenger for a broadcast of the key’s name.
  • The rendering engine: That’s the most obvious advantage. Panda makes it extremely simple to load your own models, put them on screen, move them around, and make them dance :slight_smile:
  • Timed animations: Panda has a built-in time-scripting system, so you can specify when things happen, in what order, and if they happen sequentially or simultaneously. It’s useful for animation cycles, timed events, and just about anything that needs timing.
  • Collisions: If you need to keep zombies out of places, here’s your tool. Objects can collide using a variety of boundary-calculation methods, and the result of the collision can range from simply acknowledging it (by sending a message) to having Panda try and push the colliding object back into open space.
  • Python debugging features, the Panda profiler, and an in-engine object inspector / placer: It’s amazing how a good set of support tools can make an entire project so much easier. These three pieces make it a lot simpler to isolate any problems in your code. And you’re already familiar with the flexibility Python gives you, in general.

And here are the things you may want to watch out for…

  • Panda doesn’t have very much by way of built-in AI. You’ll need to figure out this problem for yourself, since it’s tricky to generalize AI in an abstract way.
  • FPS controls aren’t built-in; however, they’re farily easy to code up, and there are a couple of examples to help you (check out the “Roaming Ralph” example for starters).
  • No built-in spatial partitioning. Panda3D organizes all the objects in the world in a big tree, and it does tree-based optimizations (i.e. during drawing, it can determine if everything in one branch of the tree is out of sight and ignore the whole branch). However, there isn’t any system for automatic tree optimization; if you’re familiar with methods for optimizing a tree (such as the BSPT pre-calculation algorithm), you can use them, but you’ll have to code them by hand.
  • Collision efficiency: The collision system doesn’t do massive automatic optimizations currently; if you’re laying down prototypes, this is somewhere you may want to look closely. See how many zombies you can create that are colliding against a wall before the system starts to dog. Then if that’s not enough, decide what you want to do: better partitioning? Abstracting collision for zombies the player can’t see? Many options; you’ll have to choose what works best for you.

So there you have it. As an engine, Panda3D is very good and very general; there is no limit to the number of ways you can stretch it (some stretches are easier than others, of course). As for ease of creation: I’m currently the only programmer on the project we’re working on, and I’d say it’s been relatively simple to wrap my brain around all parts of the engine. And the forums are decidedly responsive, as forums go: always feel free to ask if there are any problems.

Best of luck with the project! Keep us posted how it’s going :slight_smile:

Take care,
Mark

Thanks a million for all of the information, it’s put my mind at ease!

Due to my inexperience with 3D programming the thought of coding this project on my own was making me sweat, but as long as I know it’s not an impossible task and other people are doing fair sized solo 3D projects I wont be so scared to take a chance and dive in.

Well, time to take a look at “roaming ralph” I think… I’ll definately keep you posted, no doubt I’ll be back to ask a few questions from time to time too.

Thanks again! :slight_smile: