Creating a 2D game in Panda3D

Hey. I’m one of those guys in the minority that actually wants to make 2D games. I don’t know why I’m drawn to the style, it just attracts me. So I want to be able to do fluid 2D animation. I would like to set up a bones system to achieve this goal. However, almost no websites on the Internet that can help me are accessible through my school’s Internet filter; I’m surprised I can get here, and I wouldn’t be surprised if I can’t in a few weeks. But I need to take advantage of the opportunity while I have it.

Pretty much, I want to make a skeletal system that defines basic body parts (head, torso, arms, legs, maybe hands) and assign sprites (I assume they’d just be textures applied to 2D planes) to them. So far, all I’ve been able to get to is this: … nes_System
which isn’t bad, but I was wondering if there was a way to do it using panda3d’s internal functions or something. I’d rather not use a 3D modeler program to do it, but if that’s what it comes down to, please recommend me something that runs in Linux. I don’t really want to relearn blender3d, though… I just don’t have the time (or a number pad) right now.

I dont know if this will help you but I dont know if 2D art has bones. I thought that if you wanted to animate a 2D object that you have have to make frames, like in cartoons, and then create the animation by playing them. I could be wrong because I do not have a lot of experience with stuff like this.

Well you could use the Actor system for this and just make the geometry out of flat cards.
For such simple geometry it would be no problem to even generate the EGG files by hand, of course you would still need to find a way to do the animations.
If you have some sort of 2D animation program in mind that you want to use, and it can export in a text format, you could parse it and generate EGG files from that data.

[2d games)

You could combine a bone system with just flat cards, yes, but that would propably be a first. It also depends on how you want to create the animations. With fixed animations you would model your assets just as usual in a 3D app like Blender and then export them to egg Actor files and animations. Then bones are only needed in that 3D app. If you want to create the animations on the fly based on physics then you have to worry about bones in Panda. Don’t know how those are done … via connection points like in the Looking-and-Gripping sample?

Alternatively you could create a 3D game and then use the cartoon shader and a fixed camera position to produce a 2d-like effect. You propably already saw this topic: [Pixel-art Sprite Cards)

I’d prefer to have the animations done based on physics, but it’s not required. At least, not for this game.

I don’t want to do that, for a few reasons (one of which being that I fail at modeling and all of the art guys I know specialize in spriting).

I like the sound of that idea. Where can I get the specs for the .egg file format?
You can generate EGG files with Panda/Python as well. I don’t think that is documented except in the Python Reference, but if you had any questions about it I’d be happy to assist.

Can someone provide me with an example .egg file? All of the ones included with my panda distribution are .egg.pz files and I don’t know how to decompress those. I tried unzipping them and it didn’t work.

As stated at the top of the FAQ, they can be uncompressed by using the punzip utility that comes with the Panda3D installation.

If you insist, you can find uncompressed versions of those .egg files in the source package, or through the online repository browser: … 3d/models/