Sonntag, 5. Mai 2019

Stairs Velocity

It's been a while since the last update so I think it's time to show something here, even if it's not a big update so you see I'm still working on the ditor ;)

Thanks to DontBaguMe and Reaven0 I was able to add the stairs camera velocity information to the editor.

There is a data table at 1A95E which holds several camera movement patterns.

Here is the explanation of this data from Raeven0, I couldn't explain it better for myself:

These are stair-climbing camera movement speeds. A staircase in map data has a byte whose high nibble defines whether it's a down-going ($4x) or up-going ($8x) staircase, and the low nibble points to one of these speed sets. Each 2-byte word is a "step" in the camera movement, first byte is the number of frames for this "step" to last, second byte is its speed (but the high nibble of the speed byte is ignored, so the range is only 0-F). Will can't do anything until the camera movement finishes -- he's stuck inside the staircase. Once the camera finishes moving, Will exits the staircase and regains control, and the camera centers on Will if it isn't already. There are no internal corrections or consistency checks to make sure that when the camera stops, it's centered on Will. You just have to choose the right stair velocity to make the camera traverse the correct vertical distance.

And now I added this information to the editor (and renamed steps to stairs which is much more fitting):




3 Kommentare:

  1. A small update is still an update. :)

    AntwortenLöschen
  2. Here's a related fact that's not currently very useful, but could become useful in the hands of an ambitious coder.

    There is code for moving the camera horizontally, instead of vertically, while Will is in a staircase. This code is invoked if the staircase byte is $1x or $2x.

    But this code doesn't work quite right, for one reason. When you enter a normal ($4x/$8x) staircase, Will's sprite moves upward for a few frames before vanishing. On-screen, this looks okay, because staircase entrances are always on the north wall of a room. When you enter a sideways ($1x/$2x) staircase, Will's sprite moves to the left instead, but continues facing up. This looks unnatural.

    I don't think sideways staircases are used in the vanilla game, and they probably shouldn't be used in a hack until someone patches the behavior of Will's sprite.

    Bonus chatter, even less useful: A staircase byte of $0x is also accepted. It behaves the same as either $4x or $8x, I forget which one.

    AntwortenLöschen
  3. Hi Rae,

    very interesting! I think sideways staircases would be a great new feature since it allows more flexibility in map/dungeon design!

    AntwortenLöschen