Need help/advice on using Ogre for 3D Tetris

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Ephon
Gnoblar
Posts: 18
Joined: Tue Jan 18, 2005 8:33 pm

Need help/advice on using Ogre for 3D Tetris

Post 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.
User avatar
Kanma
Halfling
Posts: 61
Joined: Sun Feb 22, 2004 3:41 pm
Location: Martigny, Switzerland

Post 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).
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark

Post 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.