Jump to content
IGNORED

Multisprite collision problems


atari2600land

Recommended Posts

Sorry to plug up the board like this, but 2600IDE or bB is not liking the fact that I put the following code into its program:

if collision(player3,missile0) then goto comp_move_2

 

I'm using the multisprite kernel, so player3 should be possible, but it's saying it's an unknown collision type. I know there's a label comp_move_2. Bug, or what?

 

EDIT: Forgot to upload the program :dunce:

tictactoe.bas

Edited by atari2600land
Link to comment
Share on other sites

bB is not liking the fact that I put the following code into its program:

if collision(player3,missile0) then goto comp_move_2

 

I'm using the multisprite kernel, so player3 should be possible, but it's saying it's an unknown collision type.

The Atari 2600 doesn't have a player3, so it has no way to detect any collisions involving player3. The multisprite kernel lets you display something it calls "player3," but which is actually player1. So if you want to check for a collision between "player3" and something else, you actually need to check for a collision between *player1* and the other object. However, if a collision is detected, then it could have involved anything that's drawn using player1-- player1, "player2," "player3," "player4," or "player5." So if you do detect a collision, you'll need to compare the y positions of those sprites with the position of the other object in the collision, to see which of those sprites was in a position to have collided.

 

If you want to design a custom multisprite kernel, it should be possible to reset (clear) the collision bits involving a particular multisprite player just before that player starts being drawn, and then check the collision bits after it's finished being drawn, and save them in some RAM variable. That would use up some of the drawing time from the multisprite kernel, not to mention some of the zero-page RAM, but it should still be doable.

 

Michael

Link to comment
Share on other sites

bB is not liking the fact that I put the following code into its program:

I'm using the multisprite kernel, so player3 should be possible, but it's saying it's an unknown collision type.

The Atari 2600 doesn't have a player3, so it has no way to detect any collisions involving player3. The multisprite kernel lets you display something it calls "player3," but which is actually player1.

 

I'm pretty sure this is covered in the manual. You may want to go back and read it again. Now that you have an understanding of the system in general, the details will make a lot more sense.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...