How hard can a floor plane be...?

Absolutely new, about 1/2 the way through the Manual, head spinning with all the inputs about this library, can’t wait to make something out of it.

For the game, think of Tron Lightcycles combined with the Sphere Bonus Stages from Sonic 3. The character will be running around a grid of tiles, collecting bits and avoiding traps/steering into powerups. Levels will be built in a 2D Tile Map Editor, for simplicity. The floor plane in the game will be made up of simple plane meshes containing the floor’s texture, one plane per “tile” in the tile map.

Decided that the first step would be to generate a simple plane, with a texture map on it, based on the “Generate A Cube” demo. Two hours later, frustrated, I deleted the code and played some Half Life 2.

Yesterday I made a plane in Blender (have very basic experience in Blender), applied a pink material hue to it, and exported it in Chicken Exporter for Blender. Opened the egg in Panda View… absolutely nothing.

So I’m going to try again this evening… any pointers on a better method/correct method/“silly person here’s a code snippet from the manual you must have missed” would be greatly appreciated. As I said, the actual geometry for the game will be very, very simple: floor tiles which make up the jogging grid, and billboards floating above the geometric centers of tiles if that tile is defined to contain a item or powerup or hazard. Your character will ALWAYS be jogging on the same plane, with collision detection with the billboards deciding if you speed up, slow down, earn points, die, etc.

Hi, and welcome to panda.

for creating plane-like objects i highly recommend the cardmaker.
a simple example of usage can be found here panda3d.org/manual/index.php … eplacement
the api-reference contains more information when you need to create cards with a specific size.
you can, of course, go with the blender approach,too. in blender you need to UV-map the model and asign a texture image.
you can use materials but they wont show up unless you add a light to your scene. texturese will appear without lights.

if you build a up your floor from many individual planes your game will slow down extremly due to the high number of individual nodes. this can be fixed by using “Flatten” so dont worry about it too much for now.

for powerups. if you only have a hand full of them, you can simply keep a list of those and check each against the current player’s position using the getDistance() call. if your map is covered with dozens and hundrets of powerups, using the collision system might be beneficial (it’s more complex to use)

in case you want to achive some beam-effect like the walls in tron i’d recommend the meshdrawer class.

Hmm! Upon reading the page again, I think it’s almost, but not quite, what I’m looking for, or maybe I’m just not reading it right.

The camera angle won’t be top-down, it’ll be over-the-shoulder (See: this, except on an “infinite flat plain” not a sphere). So I need a way to be able to spawn tiles “on the floor” in that view which the character will run over. It looks like cardmaker is for quads which sit, like cards, on the screen’s plane, yes?

I guess either I’m going with the 3D Model Of A Plane or try to build a geometry generator that makes planes on request… seems kinda silly just for two tris! Hence why I wanted to see if there wasn’t something already like this.

Or is Cardmaker usable for billboards and other “cards” in 3D space and I’m missing the point?

First run, I just want to get the tiles/cards working for the floor, then I plan to expand out to the entire level. However, I’ll be using fog to help alleviate the render times, as after a few tiles out at a over-the-shoulder camera angle you would lose definition on the tiles anyway, and in either case I don’t want you to see the whole map, just the closest areas.

As your character moves in discrete steps, I’ll eventually be “building/unbuilding” the floor tiles as you move across the map out past the fog distance so that I’m only really rendering a subset of the floor. Because I would like to build huge levels, but I don’t want it to be too hungry.

Thanks for the pointer, looks like I’ve got more reading to do…

in panda, all geometry is, per definition, 3-dimensional. even a quad as it appears flat is a 3d-model made from 2 triangles.

so all you have to do is, to reparent it to render, rotate and move the quad to its final position.