Jump to content

SpiceWare's Blog - Station revisions


Recommended Posts

Reworked the stations to fire from the 2 closest pods. For that I revised the closest pod to player tests from before, it now shows the 2 pods it'll fire from as well as the targeting line from the closest pod:

Additionally I finally tracked down a bug where you could shoot a station pod that you shouldn't be able to. For that I built another test build (though I forgot to save a copy of the bin, sorry) which would show the last pod destroyed, and the shot that destroyed it. I also had it show the shot further down using another missile, and once more below that using a sprite to show which collision image was used (as the image data to draw a missile is different than the image data for collision detection)*.

In reviewing the results the collision didn't make sense - unless the pod image was being treated as a 2X sprite. One of the things I'd recently done was revamp the sprite state to hold flags for various things like 2x, whereas before I used a ranges of image ID values to denote things like sprite sizes. I made the change to use bits in the state variable as those are much faster to check for than a range of values:


The sprite info is stored in arrays:
unsigned short int gSpriteState[MAX_SPRITES+1]; // +1 is used for Station Pod collision detectionunsigned char gSpriteImageID[MAX_SPRITES+1];    // +1 is used for Station Pod collision detectionunsigned short int gSpriteX[MAX_SPRITES+1];     // +1 is used for Station Pod collision detectionunsigned short int gSpriteY[MAX_SPRITES+1];     // +1 is used for Station Pod collision detectionunsigned char gSpriteColor[MAX_SPRITES];

Lastly I created all new station arrangements for the Gamma Quadrant (these may be revised by Nathan at a later date).


For Harmony or Stella (requires * This is the data to draw a horizontal shot:

ShotHorizontal:        .byte %11110000        .byte %11110000ShotHorizontalHeight = * - ShotHorizontal
Attached thumbnail(s)
  • blogentry-3056-0-26334600-1497927001.png
  • blogentry-3056-0-08204900-1497927049.png
Attached File(s)

Link to comment
Share on other sites

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

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