This topic is now archived and is closed to further replies.

jason f

roll me a solution to this one...

Recommended Posts

jason f    122
just fooling around on my spare time trying to make a clone of ''devildice''. basically you control a 3d rep of a standard 6 sided die. it''s a tilematching concept where if the top value of the selected die is the same as any of it''s immediate neighbour squares, then the matching squares disappear. you move the die by rolling it on the x and z axis... I have a structure that holds an x and z grid coord for each dice a few state vars and some x and z rotation values. When I rotate the dice, I increment the rotation value in the structure by the same amount. Of course, as matrix ops are non-commutative this is not going to work. since you are going to get different results depending on the order of rotation, the updated dice, after being rotated by the amounts in the structure won''t be positioned as it should. So obviously, rotation values may not be the correct information to store. I''ve also considered some sort of algo whereby you store the front and top dice values (using the face normals), thereby setting it up for the correct rotation values, or using a linked list to store a sequence of rotations for each dice, although that would have the potential to get very large. Do you have any ideas on a more efficient method of dealing with this? Any algo''s that would fit the bill? any advice you guys can offer would be appreciated. :jason

Share this post

Link to post
Share on other sites