Jump to content

What is the best way of handling collisions between sprites and backtab?

Recommended Posts

It wouldn't look elegant, as the sprite needs to be over the background item to signal collision.


But at same time collision bits are only readable until next frame.


This means it would collision in one frame, collision detected in next frame and then you would have to make it back a few pixels, so it would jitter.

Link to comment
Share on other sites

Title. So I can e.g. make game area with backtab end won't need to hardcode where player can go and where he can't.

It depends on what you mean by "best way." IntyBASIC supports reading the Intellivision's built-in hardware collision registers for each MOB. For information on how to do this, check out the documentation that comes with the IntyBASIC SDK.


Alternatively, you can create your own mechanism using bounding-box or similar algorithm to test for collisions in software.


Neither is "better" than the other, though; both have their pros and cons: hardware collisions are very fast, but they are available after rendering the current frame, which presumably was computed during the previous frame; so it is always one frame behind.


Software collisions give you full control over its timing and mechanics, but require custom code, which obviously incurs a performance hit over the rest of your game loop.



Link to comment
Share on other sites

For checking which tile is under your sprite convert sprite coordinates to a backtab address


If (#backtab(x/8+y/8*20)=const) then ... else ...


As nanochess says the HW collision bits will occur after the collision has been displayed so if you mix sw and hw tests you have to take into account this delay

  • Like 1
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.

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.

  • Recently Browsing   0 members

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