Jump to content



0

Two-line kernel and sprite motion weirdness


1 reply to this topic

#1 Luigi301 OFFLINE  

Luigi301

    Chopper Commander

  • 242 posts

Posted Sun Nov 21, 2010 8:10 PM

I'm trying to convert my program's one-line kernel into a two-line kernel. It works perfectly with the one-line kernel, but I can't get it to work with a two-line kernel. The problem is, something's broken somewhere and I can't figure out what.

In theory, each time a sprite is drawn on the line, its position (SpriteYPosition) is shifted down one line so it can be drawn on the next line. At the beginning of the next frame, it's shifted back up the number of scanlines it was shifted down.

In this converted kernel, it goes up with no joystick movement no matter what I set the sprite's height to in the repositioning code. Worse, no matter if I press up or down, it speeds up going up. This is probably related to my hacky collision detection code.

Can someone help me get my sprites to stop moving on their own?

#2 Luigi301 OFFLINE  

Luigi301

    Chopper Commander

  • 242 posts

Posted Sun Nov 21, 2010 8:12 PM

Well, there was an attachment. I don't know where it went.

Attached Files






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users