Original Post
I've recently written my first ever falling blocks game (see Bugz in the GameDev contest), and now I'm working on my second, and I have a few questions.
First I'll explain my problem.
In other games I've written (like Space Invaders), when the user presses a direction key (the left arrow, for example), I simply update the users movement velocities, and on the following frames the animation is smooth as that velocity is applied. However, in a falling blocks games (Columns for example), the only legal places for a block to exist is in one of the vertical columns with other blocks. This is so that when it falls to the bottom, it lines up nicely with other blocks. This doesn't make for very smooth movement, however.
Does anybody know a nice solution? (Am I explaining the problem well enough?)
And my other question: What is the best way to store the data? In Bugz, I used a 2d array of a structure called BugStruct, and when pieces moved, I simply shifted data around in the array. This isn't a very quick way to do things, and won't work very nicely if I try to implement the smooth movement I described above. I could use a linked list of all the blocks currently in play, but then I'd need to run collision tests with a high number of blocks constantly, and lose the efficiency I'm trying to gain.
Any thoughts?
Jesse Chounard
Edited by - Jesse Chounard on 5/7/00 7:38:04 PM