Jump to content
IGNORED

Mord's Blog - P0/P1 Collisions


RSS Bot

Recommended Posts

I've worked on that some more since the last time I looked at it. And I was apparently wrong with it being a problem with the Tick based code. (That might have been a problem as well, but fixing it didn't change the behaviour)

 

The real problem, (this time I'm pretty sure it's the case!) is that I was examining the P1P0 collision during the Vertical Blank of the following frame in AI routines. The problem is that, by necessity, the AI routines are processed after the Object Manager does it's work.

 

What does the Object Manager do again? It handles the object flickering of course. So basically, unless there was no flickering going on, by the time we examined the detected P0P1 collision, our key object would have been swapped out with a different object to be displayed. Because of this, when the key touched the gate it would fail to recognize it because it would be checking the new object loaded into the hardware sprite to see if it was the key - and of course it wouldn't be!

 

I could probably test this by having just 1 other object in the room touching the gate instead of the key. What would happen is that that object would be touching the gate and causing it to react as if it were the key - so long as the key was on the screen.

 

So I'm re-writing the approach and at the same time making the GateMovement routines generalized enough to handle all possible gates. There will be probably up to or more than 8 gates in total. (1 bit per gate to keep track of if it is currently open or closed)

 

Hopefully I'll have it done by the end of the weekend. The code is 2/3 written (just the AI to do) but you know there's going to be weird bugs all over the place.

 

http://www.atariage.com/forums/index.php?a...;showentry=4044

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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