Jump to content
  • entries
    657
  • comments
    2,699
  • views
    900,547

2x collisions and smarter robots


SpiceWare

700 views

Updated the collision routines to handle the 2x players. To do this I needed to double-up the pixels of the sprites so that a 2x image of _X__X_X_ would be tested as __XX____XX__XX__

const unsigned char double_nybble[] = { 0x00, 0x03, 0x0C, 0x0F,
                                       0x30, 0x33, 0x3C, 0x3F,
                                       0xC0, 0xC3, 0xCC, 0xCF,
                                       0xF0, 0xF3, 0xFC, 0xFF};

int DoubleBits(int bits)
{
   return (double_nybble[(bits & 0xf0) >> 4] <<  + double_nybble[bits & 0x0f];
}
 

 

One more step and he's toast. Note: there's a lot of flicker in ROM A as the 2x sprites can only be drawn using player 1.

blogentry-3056-0-64807500-1315866579_thumb.png

 

 

revised the robot collision routines so they won't run into each other, or the walls, in the Frenzy variation.

blogentry-3056-0-58087300-1315866586_thumb.png

 

The collision routines also correctly detect the flickering walls. In prior builds you could shoot thru, and even safely touch, some of the flickering blocks.

 

2x ROM

frantic_harmony_20110912a.bin

 

smarter ROM

frantic_harmony_20110912b.bin

 

Source

Frantic20110912.zip

0 Comments


Recommended Comments

There are no comments to display.

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

Loading...
  • Recently Browsing   0 members

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