- Nathan's sent in a test of one of the large asteroids with line-by-line shifting. It's purdy!
- Beginnings of a 2-player competitive mode. It's functional, but there's still more work to be done.
- Revised init wave routines so asteroids shouldn't start on top of the player's ships
- Revised respawn routine, there's now 5 different locations a player can respawn at - this was added because of the new 2 player mode.
- New temporary immunity when ships respawn. The ships will cycle their luminance for the duration of immunity.
- Fixed the collision detect bug.
Can you tell which asteroids are using the new image?
Note: For testing, set Left Difficulty to A to make the asteroids rotate in place. Note that "next wave" detection requires the asteroids to be moving, so switch it back to B if you've shot all the stationary asteroids.
New PLAYERS option
Fights start in opposing corners
To track down the collision detect bug, I modified the program so the 2nd joystick would move a missile and the score was used to show collision info.
Shot next to ship, no collision expected
Shot correctly colliding with ship
Shot next to ship, no collision expected
Shot not colliding with ship, it should be.
The problem turned out to be that the collision routines did not use the Y Adjustment values. Images like the ship are drawn using 16 rows, but not all 16 rows are actually used. Here are the facing up and facing down images:
Ship_NoFlame0: .byte zz___X____ ; 0 .byte zz___X____ ; 1 .byte zz___X____ ; 2 .byte zz___X____ ; 3 .byte zz__XXX___ ; 4 .byte zz__XXX___ ; 5 .byte zz__XXX___ ; 6 .byte zz__XXX___ ; 7 .byte zz__XXX___ ; 8 .byte zz_XXXXX__ ; 9 .byte zz_XXXXX__ ; 10 .byte zz_XXXXX__ ; 11 ; .byte zz________ ; 12 ; .byte zz________ ; 13 ; .byte zz________ ; 14 ; .byte zz________ ; 15 Ship_NoFlame0Height = * - Ship_NoFlame0 ... Ship_NoFlame16: ; .byte zz________ ; 0 ; .byte zz________ ; 1 ; .byte zz________ ; 2 ; .byte zz________ ; 3 .byte zz_XXXXX__ ; 4 .byte zz_XXXXX__ ; 5 .byte zz_XXXXX__ ; 6 .byte zz__XXX___ ; 7 .byte zz__XXX___ ; 8 .byte zz__XXX___ ; 9 .byte zz__XXX___ ; 10 .byte zz__XXX___ ; 11 .byte zz___X____ ; 12 .byte zz___X____ ; 13 .byte zz___X____ ; 14 .byte zz___X____ ; 15 Ship_NoFlame16Height = * - Ship_NoFlame16
In the facing up image, the last 4 rows are blank so they aren't stored in the ROM (semicolons ; tell the compiler that what follows is a comment, so even though we can see them, the compiler ignores them). In the facing down image the first 4 rows are blank, so likewise they aren't stored in the ROM. By leaving out the blank rows, the player (TIA sprite) is freed up for reuse 4 scanlines sooner on the upward ship and likewise the player can be used to draw something else during the first 4 scan lines of the downward ship. A Y adjustment table is used to control skipped rows at the start of the ship. (The image height is used to control skipped lines at the bottom). The Y adjustment table has this for this ship:
.byte 0 ; Ship_NoFlame0 .byte 0 ; Ship_NoFlame1 .byte 0 ; Ship_NoFlame2 .byte 1 ; Ship_NoFlame3 .byte 2 ; Ship_NoFlame4 .byte 3 ; Ship_NoFlame5 .byte 5 ; Ship_NoFlame6 .byte 4 ; Ship_NoFlame7 .byte 3 ; Ship_NoFlame8 .byte 3 ; Ship_NoFlame9 .byte 2 ; Ship_NoFlame10 .byte 2 ; Ship_NoFlame11 .byte 2 ; Ship_NoFlame12 .byte 3 ; Ship_NoFlame13 .byte 3 ; Ship_NoFlame14 .byte 3 ; Ship_NoFlame15 .byte 4 ; Ship_NoFlame16 .byte 3 ; Ship_NoFlame17 .byte 3 ; Ship_NoFlame18 .byte 3 ; Ship_NoFlame19 .byte 2 ; Ship_NoFlame20 .byte 2 ; Ship_NoFlame21 .byte 2 ; Ship_NoFlame22 .byte 3 ; Ship_NoFlame23 .byte 3 ; Ship_NoFlame24 .byte 4 ; Ship_NoFlame25 .byte 5 ; Ship_NoFlame26 .byte 3 ; Ship_NoFlame27 .byte 2 ; Ship_NoFlame28 .byte 1 ; Ship_NoFlame29 .byte 0 ; Ship_NoFlame30 .byte 0 ; Ship_NoFlame31
Because it wasn't using the Y adjust value, the collision detection routine was off by 4 rows for the downward facing ship.
ROMs for Harmony or Stella 3.7.1 or later
Edit: test of new 2x vector sprites. It also fixes the invisible ship bug that Omegamatrix found.
spacerocks20120617_new_vector.bin
Edit: latest version of the first 2x asteroid.
Source
21 Comments
Recommended Comments