| creating a game something like mah jong, with painted tiles |
|
 |
|
 |
|
 |
|
 |
Group: microsoft.public.win32.programmer.directx.graphics · Group Profile
Author: terryastoneterryastone Date: Apr 25, 2007 05:39
I am trying to create a set of tiles, a bit like the game mah jong.
Each tile can be moved around the screen. Like playing cards, each
tile has a unique picture on the front of it.
For the basic tile I have created a mesh box, and cloned the mesh to
hold texture information. I have a bitmap for the six sides of the
tile, and this bitmap is loaded as a texture and plastered onto the
tile as it is rendered. At this point I have a set of tiles, all
blank.
What about the individual image for the front of each tile? I don't
want to create an individual tile texture bitmap for each tile, as
there could be over 50 tiles. I was thinking of loading the image of
the tile faces as a seperate texture and using a vertex buffer on top
of each tile to draw the individual image on each tile.
This does not sound very efficient. Also I have to rotate the vertex
buffer for each tile so that it is always on the front of each tile.
Is there a way of drawing a texture on a mesh, on top of another
texture?
What is the best way of doing this?
With thanks,
Terry.
|