Thursday, January 20, 2005

One Hour of Productivity

The past 24 hours have been fairly productive! I managed to get 1 hour of game dev time into my busy school and work schedule. Last night I scaled the whole map down (trivial in Torque). I also started adding support for arbitrary "tetris-like" pieces. I almost finished, then had to go to a dinner meeting. While there, I tried to come up with an algorithm to find areas surrounded by a wall. I thought I had some good ideas, but each of them failed in one case or another.

After I got home, I looked up an algorithm for finding closed-in areas on a grid (areas surrounded by a wall). It took about 10 minutes to understand how the algorithm works. It's pretty neat, but will be fairly slow on my tentative 256x256 grid. But then it only needs to be done once every couple seconds at most. Optimization can wait.

I woke up early this morning to put in another half hour, and finished up the arbitrary piece code. It still has one small problem, but I'll sort that out soon enough. I also added rotation support, so each piece can be rotated 90 degrees. That's not tied to any controls yet, but that's not difficult. Once I polish off the piece code, I'll go back to the projectile aiming code to get rid of the problems. After that, it's changing the control scheme to use the keyboard for movement and piece rotation/placement. The mouse will be used to control the camera view. After that, the code to check for contained areas, and then it will be half playable!

No comments: