Jump to content
  • entries
  • comments
  • views

Collision detection fun.

Sign in to follow this  


It's one of those cases where the game looks exactly the same but the code is different. In this case a lot different. I noticed some stuff. Like how sometimes if the burger is touching the cloud and the fry hits the broccoli the broccoli doesn't disappear. So I slowed the game down a little. Didn't help. I saw something though. I wondered if I could determine the sprite collisions of more than two sprites if I used $D019. A few false starts later I got it working.

Sprite 0 is the burger, sprite 1 is the cloud, sprite 2 is the fry and sprite 3 is the broccoli. I put this in:

          LDY $D01E ;Read hardware sprite/sprite collision                    CPY #$0C          BCS VEGGIE_FRY_COLL

Meaning that if the sprite collision register always had sprite 2 and 3 touching no matter what other sprites were touching them, it would go off. Because %1100 is $C and anything above it would mean that the cloud and/or the burger were touching when the collision was happening as well.

Now my brain is completely fried. I unplugged the Commodore 64 because I was done with it for now. I plugged in and played my X-Box for a little bit. I will plug the Commodore 64 back in because I bought a game on ePay: Congo Bongo.

I went to sleep at 10:30 last night and I got up at 10:30am and said "I don't want to get up even though I really should," but I didn't get up and slept more until about 1pm. I wish I wasn't so sleepy all the time.

Sign in to follow this  


Recommended Comments

There are no comments to display.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...