History Saturday, 01/11/2003 * 12:30pm : Started. Project name is "noname" for now. * 01:58pm : DoubleBuffering implemented. * 02:52pm : Cube array declaration, creation, and initialization completed. * 03:27pm : The array initialization had some mistakes. Fixed. Also now displays Play field. * 03:51pm : Changed array from integer to double. * 04:11pm : Z-rotation is implemented and working. * 04:14pm : The method name was "RotateAroundYAxis" when it was supposed to be "RotateAroundZAxis". Fixed. * 04:48pm : Implemented ToushiTouei method. * 05:06pm : Fixed problems with ToushiTouei method. It looks right now. * 05:20pm : Implemented "RotateAroundXAxis" and "RotateAroundYAxis". It doesn't look right. Need to work on it. * 07:00pm : FieldCenterX, FieldCenterY, FieldCenterZ added. * 07:29pm : Figured out the problem. There was an error in the X-Axis rotation formula. Fixed. * 07:43pm : Adjusted the rotation angles to make it look better. Also playfield is 10 x 10 now. * 08:34pm : CubeExist[][] and Color[][] arrays added. * 10:17pm : FillPolygon added. * 11:03pm : Cubes are now shaded. Sunday, 01/12/2003 * 12:05am : Changed view point distance to a=800 and b=900. * 12:16am : Now all the block are viewable. * 12:18am : Combined CubeExist and CubeColor initialization. * 12:33am : Readjusted the cube size. * 12:47am : Frame for each cube is drawn. * 02:17pm : ScrollOn is added. When this is true, scroll bars for XYZ rotation are displayed. * 02:21pm : Default XYZ angles are now 180 degrees. * 02:42pm : Trying to hide surfaces which are not supposed to be displayed. Not working propely for side 2673 yet. * 02:45pm : Fixed! The piont definition must be done clockwise in order for this to work. * 03:01pm : Shading is fixed. * 03:13pm : Limited the rotation angles to work around a bug. * 03:18pm : Lines are drawn for each sides. * 04:24pm : Default XYZ rotation angles are set to : (47, 335, 3). * 05:35pm : Rotate range are defined. X(42 to 72), Y(304 to 342), Z(0 to 45). * 06:44pm : Player block added. Monday, 01/13/2003 * 11:35pm : Player movement added. Using KeyDown Method. Note that this method does NOT work on appletviewer and also OSX machine. Need to figure out to work around this. * 11:38pm : Forgot to take care of it when capital letter 'I' is pressed. Fixed. Tuesday, 01/14/2003 * 12:07am : Again, forgot to take care of it when capital 'K' is pressed. Fixed. * 01:23am : Recursive for checking the left block of the moved block is implemented and working. Also changing color is implemented. * 02:16am : The left block check recursive had a problem. Fixed. Also implemented Right blcok check. * 03:28am : The recursive algorithm was all messed up. Rewrote them from scratch and they seem to be working now. * 06:57pm : Got rid of KeyDown method because this method is old and not recommended by Sun. Instead, implemented KeyListener and used KeyTyped(), KeyPressed(), and KeyReleased() methods. But because focus goes to Scroll bars, these methods didn't work. To make them work, I had to turn off the Scroll bar. * 07:40pm : Was accessing array out of range when hit the right most walls or down most walls. Fixed by addeing extra walls around the playfield. Wednesday, 01/15/2003 * 06:58am : There was a mistake in Recursive when calculating touched blocks in row 1, row 2, column 1, and column 2 from the last row and column. Fixed. * 07:33am : Same problem resided in row 1, row 2, column 1, and column 2. Fixed. * 07:47pm : Blocks arrangement is modified for testing purpose. * 08:44pm : FillStageArray(), EmptyStageArray(), and CheckIfStageCleared() methods are added. Also modified main program so that it fills out stages, and go to next stage when all blocks are eliminated. * 08:48pm : Made stage 1 easier for debug purpose. * 09:09pm : Got rid of CubeExist[][] and CubeColor[][] arrays. Added PlayFieldCell[][] array. (1 = Player, 29 = Wall, 51 = Red block, 52 = Yellow block, 53 = Blue block, 100 = Used for Temp) * 09:46pm : Added wall. It seems to be working but need more testing on this. * 09:55pm : Changed color blue to green because traffic lights are green. * 10:11pm : The player's X and Y coordinate weren't being set properly for stages 3 and 4. Fixed. * 10:31pm : Wall color is changed from cyan to dark gray. * 11:03pm : Fixed the rotation bug. Also made it so that FieldLength is no longer a fixed value. This value can be changed for each stage. Also worked on a few more stages. For now they are commented out in Stage1 section in FillStageArray() method. * 11:12pm : Working on another stage. For now it is saved as Stage 1. Not completed yet. Will work on this tomorrow. Thursday, 01/16/2003 * 08:14pm : Created another stage. It is saved in Stage 1 for now. Also, now displays XY Coordinate of Player. * 09:28pm : Modified the Stage 1 to make it harder. * 10:59pm : Modified the XYZ Rotation architecture so that XYZ rotated points are calculated from Original XYZ points each time rotations are made. This requires more calculations but it gets rid of off-by-little errors. * 11:29pm : ToushiTouei method wasn't working properly. Fixed. * 11:33pm : ToushiTouei method wasn't being called when scroll event happens. Fixed. Friday, 01/17/2003 * 12:20am : ScrollBar is set to false. * 08:20pm : Changed Key handling from KeyListner to keyDown(). This is because when KeyListener is used, mouseEvent is not recognized. Also added XScrollBar partially. Not completed yet. * 09:28pm : X Scroll bar is implemented and arrow increment and decrement are working. Need to implement drag&drop part of the scroll bar. Saturday, 01/18/2003 * 02:15am : ScrollBarEntireLength was being used to calculate XScrollIncrement before ScrollBarEntireLength was re-calculated. This was causing weird behavior when displaying scroll bar. Fixed. * 02:31am : Now when scroll bar is grabbed, used center point of the scroll bar to do the calculation. Also the height of the scroll bar is extended. * 02:44am : Changed variables "CurrentScrollBarPartX" and "CurrentScrollBarPartY" to "XCurrentScrollBarPartX" and "XCurrentScrollBarPartY" because these variables are only for X-rotation scroll bar. * 02:47am : The last build had "shortened scroll bar". The scroll bar was shortened from 100 to 40. Also for this build, I have adjusted the position of increment/decrement arrows for X rotation scroll bar. * 12:33pm : Code clean up for Y and Z Rotation scroll bar implementation. * 01:14pm : Some more prep for Y and Z Rotation scroll bar implementation. * 01:32pm : Y Rotation scroll bar is implemented and it seems to be working. * 01:44pm : Z Rotation scroll bar is implemented and it seems to be working. Sunday, 01/19/2003 * Snowboard at Sierra with CN Tuesday, 01/21/2003 * 12:04am : Changed calculation so that it now accepts negative numbers for XMinScrollBar, YMinScrollBar, and ZMinScrollBar. The scroll bars get messed up when the Min numbers are positive numbers. This needs to be fixed. The changes that were applied are commented with "//HERE" Wednesday, 01/22/2003 * 06:30pm : Now works even when XMinScrollBar is a positive number for X, Y, and Z. I don't like the implemetation method right now. Will work on this some more. * 06:40pm : Modified default value for XYZ Rotation.