Post by duo on Sept 1, 2009 10:48:34 GMT -5
I was talking to rockman juno about making video games in panda3d and thought this might be useful to other people who are interested in making 3d games (partly inspired by mirak's guide).
Panda3d is a game engine. Blender is primarily for editing models and scenes. You can make simple games in it, but it will take a lot longer, and a lot more effort in trying to understand everything, than if you use panda.
A site with games made in blender can be found here: blender-games.webs.com/apps/wiki/.
For making games with panda3d, follow the steps below:
First, make your characters, and all their animations in Blender. For excellent video tutorials, go to www.gryllus.net/Blender/3D.html to learn how to use it!
Then, you make a level. The level is made up of a bunch of different objects:
- Game map (this is what you actually see). Can be broken up into parts for applying separate textures.
- Game objects (platforms, boxes, pillars). These will require individual textures as well.
- Collision map (this forms the boundaries that your characters can't go past)
- Empties (markers that tell your characters, enemies, and other objects where to go and how to position them)
Empties are also useful for camera work; you can set up different locations for the camera to pan to, and panda3d will make the camera float from one Empty location to the next in a given time period (3d games are like movies).
You then have to import all of your models into panda3d using the blender-to-egg Chicken script.
Next, you will have to start programming. Everything below here is done in panda3d!
In panda3d, you should put each character into a python class. Your character classes should have the following:
- Character model loaded into the panda3d Actor class
- Character model animations
- Standard pand3d collision polygon
- Collision handling code
- Control functions (keyboard for main character, AI for enemies)
Next, you create an instance of your game level. Search it for all the empties. Then create instances of all your characters. Reparent them to the empties, and BAM! your game is running.
You're going to have to read the panda3d manual a lot, even before you start programming. Look through the examples that come with the panda3d package. They have clear examples of most of the things you'd like to do to make a game. Good luck!