Jump to content







Photo

2x collisions and smarter robots

Posted by SpiceWare, in Frantic 12 September 2011 · 82 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] << 8) + 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.
Attached Image


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

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
Attached File  frantic_harmony_20110912a.bin (32K)
downloads: 13

smarter ROM
Attached File  frantic_harmony_20110912b.bin (32K)
downloads: 10

Source
Attached File  Frantic20110912.zip (627.3K)
downloads: 17




May 2012

S M T W T F S
  12345
6789101112
13141516171819
2021 22 23242526
2728293031  

Recent Entries

Recent Comments

0 user(s) viewing

0 members, 0 guests, 0 anonymous users

Search My Blog

Latest Visitors