Jump to content
IGNORED

PacManPlus' Blog - Difficulties with Frenzy's Maze


RSS Bot

Recommended Posts

Ugh.

 

I've been having a hell of a time with Frenzy/Berzerk's maze collision detection for the past week. I'm actually stumped for the time being.

This detection is different than the others I've worked on because it's not *just* the maze piece if it's there or not, but it also matters *where* the player hits the maze piece. To make matters worse, the zones are 8 scanlines high, and the sprites can be 16 scanlines high. This means that any sprite can occupy up to 3 zones at one time.

 

To give you a better example, Here is the screen with a grid to show how I split it up (I tried to find the best way, and this was it):

blogentry-1787-126266138671_thumb.png

 

 

I had to reduce this by 2 zones, to get 23 zones high + 1 for the score zone. There are also 32 columns (the max). You will notice that the maze is on the left and bottom of each cell. I cannot center them as that will split the 'bubbles' in half, making for too many maze cell variations.

This means that the player *can* occupy the top right of each maze cell without issue. Plus, I have the entire height of the sprite to worry about. I chose three points (for the three zones a sprite could potentially occupy) on the left side or right side of the sprite: top (0), bottom/2 and bottom. The 'bottom' varies, as all of the sprites are top justified, and the objects themselves are different heights (i.e. player, robot, skeleton, etc.) Plus I have to check the top or bottom (depending of which direction the player is moving).

 

I'm just having a very difficult time coming up with an algorithm for this.

 

I imagine in the arcade some type screen buffer is used, so that if the sprite hits any 'non-black' area, a collision is registered. Wish I could do that here...

 

I'm open to ideas...

 

These are how I have the maze peices in my character mode:

blogentry-1787-126266100864_thumb.png

 

 

http://www.atariage.com/forums/index.php?app=blog&blogid=17&showentry=6720

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