Page 1 of 1

Need help/advice on using Ogre for 3D Tetris

Posted: Wed Mar 16, 2005 11:04 pm
by Ephon
Hi

I need some help on how to proceed in creating a Tetris game in 3D.

What i want, is to make it something like the one showed here:

Image

So what I basicly need is to know things like best/easiest way to make the wireframe box, the blocks etc. using Ogre.

Any help on this issue is appreciated.

Posted: Thu Mar 17, 2005 9:37 am
by Kanma
DWORD made a tetris clone and released the source (look at http://www.ogre3d.org/phpBB2/viewtopic. ... ght=tetris ), you can take some inspiration from it.

He did the blocks by combining some basic cubic meshes (with one, two or three faces not present) if I remember correctly.

For the wireframe box, there is a Line3D example in the wiki (or you can make a mesh for it and display it only as a wireframe, don't know which is 'best'/easier).

Posted: Thu Mar 17, 2005 10:06 am
by DWORD
Good initiative. :)
Kanma wrote:He did the blocks by combining some basic cubic meshes (with one, two or three faces not present) if I remember correctly.
Yes. That was to get the filleting on the edges, but it took 15 (2^4-1) different meshes for my situation with 4 possible neighbours. In 3d you'd probably have up to 6 neighbours, and that's 63 meshes although some could be rotations of others. That's a lot to make by hand, so I'd recommend sticking with one simple cube mesh (for a start at least).

For the wireframes the Line3D is good as Kanma says. You can also ake your own SimpleRenderable subclass and use Line3D for inspiration.