Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ptsfa!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: I've Got Sprite Troubles Keywords: Why me? Message-ID: <5223@well.UUCP> Date: 12 Feb 88 20:03:18 GMT References: <1669@ssc-vax.UUCP> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: The CIA: Third-World Governments Destabilized While-U-Wait. Lines: 48 In article <1669@ssc-vax.UUCP> dmg@ssc-vax.UUCP (David Geary) writes: >However, when I move the sprite (ball) around on the >screen, the previous image of the sprite does not >completely disappear before the sprite is redrawn >at the new position. As a matter of fact, at >a higher speed, I can distinctly see 3 images >at once. > >Can anyone help me? I'm on an A1000, using >Lattice 3.03. [ ... ] >^^^^^^^^^^^^^ >help, > help, > help... > There's your problem right there :-). Seriously, I don't know what the problem is; I can only guess. Have some guesses: There are two possibilities that I can think of. One is that you're not moving the pointer fast enough. You have to move it at least 15 frames per second to eliminate most of the jittering effects. Have you tried writing a short standalone program that does nothing but move the pointer in a tight loop, and see how that works? The other possibility is that you're moving the pointer *too* fast. That is to say, your program is running so fast that your sprite location data and hardware registers are being updated faster than the field rate. The hardware displays the sprite. Meanwhile, you've updated the position, and called MoveSprite() (which is really ChangeSprite() in disguise). The routine stomps the hardware sprite data register, and the hardware starts DMA'ing from that point. It sees the new position, waits for the video beam to go there, and starts displaying it again. This seems highly implausible to me. Nevertheless, are you using WaitTOF() between each of your calls to MoveSprite()? Note that I'm just guessing. I have a hard time believing the problem exists at all, since I've never seen it before. If these suggestions don't work, I'd be willing to take a look at the executable. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Recumbent Bikes: dual ---> !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor