Playing with the Samples

Panda3d comes with a folder full of demos and samples, to show off what can be done and give some guidance on how they were made through the comments left by whoever coded it. There are alot of samples so I won't go over them all, but there are a few that I think are worth mentioning to anyone wanting to see what the engine can do and how to do it.

First off, the Roaming Ralph demo. This one is probably the best, because it almost seems like a game by itself. The sample shows how to load a simple level, with some uneven terrain, then load a sample character that animates and moves over the terrain. That might not seem like that big a deal to alot of people that have moded or mapped before, because those games or engines made it already, but this demo demonstrates actually placing and moving everything yourself, which will help understand how even other engines would do something similar. This one gets referenced alot on the forums when people ask questions for anything from moving a character to making the camera follow him. This demo uses Collision Rays to keep the player on the terrain and the camera above it, this is just one of many ways to do this.

Another example that uses Collision Rays and gets alot of attention, Chessboard. It's not a real chess game, but you can select and move pieces with the mouse. A ray is made from the camera where the mouse is and selects the board and if there is a piece on it lets you move that piece. The Looking and Gripping sample which shows off how to manipulate a models bones to look at the mouse and also shows a character holding different items is another useful demo. Combine those with the Roaming Ralph and you've pretty much got what most people want in a 3rd person game without too much code and you actually have more control over how that works than with most engines. With what we can learn in those you can make all sorts of things happen already.

The Normal-Mapping demo, shows of not only normal mapping and some light, but a first person camera style movement. Shadows shows off, shadows, Texture-Swapping shows off even more lighting and shadowing plus its probably the nicest looking demo, along with Motion Trails which shows off some cool render effects. Glow and Fireflies show off some cool effects, using some particles and a Tron guy, both look pretty cool. Particles shows a example and how to use the tool to make them as well, it's not too hard to figure out with the manual and some experimenting but it isn't a really polished tool for beginners. Cartoon-Shader shows off how to do some toon effects, this was made even easier in the new version but I haven't tried yet (my old pc doesn't like some of the shaders).

Two more cool demos are Fractal-Plants, which randomly generates a treelike model using some of the more advanced Panda3d abilitys to make geometry and the Media-Player sample which is just fun to watch. The plant demo seems like it could be used to make some really cool stuff, from random plants around the player like grass to random little rocks or trees, even buildings I would guess. The Media Player demo shows how to load a video and not only play it but pause and slow it down too, the video of the Panda with the baby is pretty cool by itself too.

Finally, while there are plenty of demos I didn't talk about that should be looked at anyway, Asteroids!! This sample shows how to use tasks and load up a simple 2d world, along with how to shoot and destroy things. I was going to just take this and modify it some to show off GiMP and Blender, but after looking through it, I don't really like how it handles a few things, so I'm gonna do a bit more instead by making my own code using this as a theme instead, 2d shooters. I've got a start menu and some basic stuff setup so far, and it shouldn't take too long till I have a good update on how its going.

One more thing, to open the .PY files and look at them, just use any text editor. You can also edit and save them that way, but there are much better options out there. At the moment, the text editor I use has some problems with indentation, so I will be switching to a actual Python editing tool. Expect me to finally add a free text editor to the list soon.

0 comments:

Newer Post Older Post Home