Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!uw-beaver!ssc-vax!dmg From: dmg@ssc-vax.UUCP (David Geary) Newsgroups: comp.sys.amiga Subject: HELP - Need help on ANIMATION/GRAPHICS in C Keywords: Why doesn't RectFill() work correctly when using bobs? Message-ID: <1603@ssc-vax.UUCP> Date: 5 Jan 88 22:54:37 GMT Organization: Boeing Aerospace Corp., Seattle WA Lines: 58 I am writing my own version of Arkanoid in C. Everything works great, except for the fact that I cannot make my boxes completely disappear when the ball collides with a box. My paddle and ball are both bobs. My boxes are not bobs, I simply use DrawImage() and RectFill() to create them at the beginning of the game. Then, when the ball collides with a box, I call RectFill(), to blank out the box that was hit. Sometimes, the entire box gets blanked (as it should). However, most of the time, only part of the box gets blanked out. There is seemingly no pattern to when the box gets blanked or not. I have a forever loop which calls SortGList(), DrawGList(), MakeScreen(), and RethinkDisplay(), and then goes on to check for collisions, make adjustments if collisions are detected, and move any objects which need to be moved. Then the loop goes back to the top. I have a feeling that something to do with animation is not letting my RectFill() command finish. I am not using any Animcomp's or Animob' s, just bobs. I have no idea if my thinking here is correct. This is driving me nuts! I' ve tried everything I can think of to correct the problem, namely: 1) Use DrawImage() or WritePixel() repeatedly instead of RectFill(). 2) Move the RectFill() call nearer to the top of the forever loop. 3) Call WaitTOF() before the RectFill(), and WaitBOVP() afterwards. 4) Call MakeScreen() and RethinkDisplay() after RectFill(). 5) Call LockLayerInfo() before RectFill(), and UnlockLayerInfo() afterwards. This has an interesting effect. The box gets blanked correctly, but then the program S T O P S. No guru, no nothing. It just sits until I reboot. Obviously, none of the above worked, or I would not be posting this message. I have no idea what to do next. Can someone please help? I've spent over 100 hours on this thing, and I' m very close to being finished (if i could just make the boxes disappear). I have considered not using the animation routines (that means not using bobs), and using the Layers library to do my own animation, but what a pain that would be just to get the stupid boxes to disappear. Thanks in advance for the help. . -- *********************************************************** * David Geary, Boeing Aerospace Co., Seattle, WA * * (206)773-5249. --I disclaim everything I've ever said--* ***********************************************************