crunch@well.UUCP (John Draper) (12/01/85)
HOW I THINK BOUNCING BALL WORKS - John Draper I think there is an outer loop which scoots along getting addresses of a round object (The ball). The ball appears to be the same size, which must be a "Bob" type object. Probably the Anamation routines were used. Each X, Y coord for the next incremental position would only be stored in a table. The outer loop just increments a pointer along the table (And no doubt arranged it "wrap around" fashion). At the same time, the color registers were changed which gives the ball a "Solid appearance" by drawing prescribe squares. Each of the bitplanes were grouped as twos. Because the inside of the ball is in two colors. This can give up to 8 positions the ball could be in during one incremental phase. The built in collision detection is used to trigger the "Boing" sound when the ball collides with the bottom and the sides. There are possibly two "Playfields" involved, because on the other playfield, the "Shadow" could be drawn. When you put it all together, the loop might look like this: forever: get next coords and data from table "blit" the ball to the new position and do the same for the shadow. "toggle" the color registers to make it look like the ball rotated, by selecting one of eight bitplanes containing a "position" of the ball handle collisions messages (if any). loop back to "forever". The kaleidescope program works in a similar fashion, except the different mode where the image is "Stamped" or "Blitted" onto the screen, then "Not erasing" itself. This must be some flag set somewhere. Now, to you Amiga Folks, this is the best guess I have as to how it's done. I based this assumption when one of the Amiga folk said that "sneaky tricks" were used to render the ball. I spend a lot of time staring at the Amiga screen, wondering how all that fast "Blitter" is done, along with collecting a large amount of example source code. I am posting the majority of the code into the Networks. BIX, WELL, Usenet, and Delphi. Sorry, Compuserve but you are two expensive for me. John Draper The Crunch