Show Santa on the map

Issue #1 open
Ryan fae Scotland repo owner created an issue

It would be great to see a marker for Santa on the overview map!

Here’s a break down of what’s required:

  1. Create a Santa sprite, or just a lame X to mark the position with.
  2. Work out how the position in game corresponds to the position on the map.
  3. Write some code that loads the Santa sprite into VRAM when the map is opened
  4. Make sure the VRAM we write into is restored when the map is closed.
  5. Write some code to iterate over the EARTHLINGS_IN_LEVEL list and pluck out Santa’s location (assuming he is in it).
  6. Write some code to place the sprite in the right location on the map.

Comments (6)

  1. Ryan fae Scotland reporter

    I should be able to implement this fairly easily (as easy as anything is in this project!) it’s just that there is quite a lot of work involved in doing so. Here is the itemized list:

    1. Create a Santa sprite, or just a lame X to mark the position with.
    2. Work out how the position in game corresponds to the position on the map.
    3. Write some code that loads the Santa sprite into VRAM when the map is opened
    4. Make sure the VRAM we write into is restored when the map is closed.
    5. Write some code to iterate over the EARTHLINGS_IN_LEVEL list and pluck out Santa’s location (assuming he is in it).
    6. Write some code to place the sprite in the right location on the map.

    Simple.

    I’ve already found the location in the source that does this for Toejam, Earl, the Elevator and the Ship Piece, and given the Ship Piece is actually treated as if it were an Earthling, this shouldn’t be too hard to do. Actually, I think I’ll make this the next thing I implement. Watch this space!

  2. Ryan fae Scotland reporter

    Worked this through last night, stepping through the Ship Piece code and seeing how it handles things whilst commenting up the source. Fairly straight forward all in all. The calculations to get the correct values written to the VDP are a little obscure but I’m sure with a bit of re-reading and usage they’ll become second nature.

    Something that muddies the waters a little is that the Ship Piece sprite is 16x8 rather than 8x8 like the player sprites. Seeing the difference will be good for learning though and I think this exercise might finally cement in my brain just how the sprite table and VDP relate.

  3. Log in to comment