Computer Science Canada Small X/Y Location Problem |
Author: | jadedknight [ Thu Jan 15, 2009 10:55 am ] | ||||
Post subject: | Small X/Y Location Problem | ||||
PROBLEM SOLVED The highlighted lines are new and correct. You may now just read the solution. Hello there, I am trying to take a go at programming a tetris clone ![]()
(2 is the pivot block)
As you can see from above I am drawing each block in the same place, however fooling around with some while statements and more iteration while incrementing a value, then multiplying it by 10 (the block size) has got me nowhere. Does anyone have any suggestions how I can accomplish this? EDIT: Basically, if you see the mesh array, everything is null except where the blocks are. Essentially I want to compute the offsets and translate the block accordingly, however I have not been able to come up with a generic way that will work for all tetris pieces. |