Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add broken bridge. #59

Merged
merged 1 commit into from
Jul 29, 2022
Merged

Add broken bridge. #59

merged 1 commit into from
Jul 29, 2022

Conversation

knightofiam
Copy link
Member

Preliminary features:

  • Re-center camera on player when not moving. This can reveal what's
    on the other side of a ravine from a broken bridge, for example,
    instead of just empty space.

  • Create cliff floor edge tiles to allow for creation of a ravine.

  • Create the cliffs of the far side of the ravine, including trees,
    flowers, grass, snow, butterflies, & signs.

  • Create the ravine under the broken bridge.

  • Move sign away from bridge area, to the left of the waterfall, so
    it's not in the way.

Implementation:

  • Create broken bridge graphic & place on near & far cliff edges.

  • Allow player to stand on & and drop down through bridge posts.

  • Allow butterflies to perch on top of bridge posts.

  • Add swinging bridge pieces with questionable physics on near & far
    cliff edges.

  • Swinging bridge pieces swing randomly to simulate being blown by the
    wind occasionally, and to show the player that they are dynamic.

  • Left mouse clicking on the swinging bridge pieces forcefully moves
    them around.

Limitations (Potential future features):

  • Broken bridge cannot yet be fixed.

  • Swinging broken bridge pieces cannot yet be climbed on like a rope.

  • Ravine fall doesn't kill the player yet, so player will be stuck and
    be forced to respawn.

Bug fixes:

  • Add an extra, empty texture-pixel of space at the top of the bridge
    post tiles in the tileset, so the butterflies can perch on top of
    the bridge posts - otherwise they perch "inside" the top of the bridge
    posts & disappear behind the foreground bridge posts because the
    butterflies' Z values are supposed to be behind them when flying.
    (Attempting to change the Z values dynamically when perching would
    introduce noticeable visual artifacts where the butterflies would
    appear to alternate being in front of and behind a foreground bridge
    post.)

  • Make butterflies' perching colliders larger so they don't miss their
    bridge post perches.

  • Properly scale drawable perch points for debugging clarity.

  • Properly handle horizontally / vertically flipped tiles when
    perchable. Butterflies can now perch on flipped tiles, even when the
    perchable areas are only specified for the non-flipped tile.

  • Remove magic number '16.0f' from Tools#GetTileCellAtAnyOf, and
    actually calculate local / texture tile size. This is important
    because some tiles such as bridge-post's are no longer 16x16
    texture-pixels in size.

Miscellaneous:

  • Iterate ground areas & cliff extents by group name instead of manually
    iterating by count, which caused regressions when adding new nodes of
    these types, since they were not iterated by default. Now when new
    nodes of these types are added, they will be iterated automatically,
    as long as the nodes are added to the correct groups in the editor.

  • Fix detection of when the player is entering / exiting a ground area,
    which fixes a bug where a player would be cliff hanging from the very
    top of a cliff, but when attempting to climb up to the next level of
    ground, would fall instead. This is a slightly improved workaround for
    Changing node parent produces Area2D/3D signal duplicates godotengine/godot#14578.

  • Improve cliff tilemaps:

    • Fix tree overlapping z-index bugs by making winter layers child
      tilemaps & using y-sort.

    • Use shared tileset resource among tree tilemaps for efficiency,
      simplicity & consistency.

    • Fix flower/player overlapping z-index bugs by organizing flowers
      into background & foreground tilemaps.

    • Change all tilemap origins back to zero for simplicity &
      consistency. Adjust individual tile positions to compensate.

    • Remove redundant ice tiles and only use ice-autotile for simplicity
      & consistency. Other ice tiles can still be accessed by disabling
      autotile.

    • Ensure all individual tileset tile z-indices are zero; change the
      z-index of the tilemap instead for clarity & simplicity..

    • Fix typo in cliff-floor tile name.

Preliminary features:

  - Re-center camera on player when not moving. This can reveal what's
    on the other side of a ravine from a broken bridge, for example,
    instead of just empty space.

  - Create cliff floor edge tiles to allow for creation of a ravine.

  - Create the cliffs of the far side of the ravine, including trees,
    flowers, grass, snow, butterflies, & signs.

  - Create the ravine under the broken bridge.

  - Move sign away from bridge area, to the left of the waterfall, so
    it's not in the way.

Implementation:

  - Create broken bridge graphic & place on near & far cliff edges.

  - Allow player to stand on & and drop down through bridge posts.

  - Allow butterflies to perch on top of bridge posts.

  - Add swinging bridge pieces with questionable physics on near & far
    cliff edges.

  - Swinging bridge pieces swing randomly to simulate being blown by the
    wind occasionally, and to show the player that they are dynamic.

  - Left mouse clicking on the swinging bridge pieces forcefully moves
    them around.

Limitations (Potential future features):

  - Broken bridge cannot yet be fixed.

  - Swinging broken bridge pieces cannot yet be climbed on like a rope.

  - Ravine fall doesn't kill the player yet, so player will be stuck and
    be forced to respawn.

Bug fixes:

  - Add an extra, empty texture-pixel of space at the top of the bridge
    post tiles in the tileset, so the butterflies can perch on top of
    the bridge posts - otherwise they perch "inside" the top of the bridge
    posts & disappear behind the foreground bridge posts because the
    butterflies' Z values are supposed to be behind them when flying.
    (Attempting to change the Z values dynamically when perching would
    introduce noticeable visual artifacts where the butterflies would
    appear to alternate being in front of and behind a foreground bridge
    post.)

  - Make butterflies' perching colliders larger so they don't miss their
    bridge post perches.

  - Properly scale drawable perch points for debugging clarity.

  - Properly handle horizontally / vertically flipped tiles when
    perchable. Butterflies can now perch on flipped tiles, even when the
    perchable areas are only specified for the non-flipped tile.

  - Remove magic number '16.0f' from Tools#GetTileCellAtAnyOf, and
    actually calculate local / texture tile size. This is important
    because some tiles such as bridge-post's are no longer 16x16
    texture-pixels in size.

Miscellaneous:

- Iterate ground areas & cliff extents by group name instead of manually
  iterating by count, which caused regressions when adding new nodes of
  these types, since they were not iterated by default. Now when new
  nodes of these types are added, they will be iterated automatically,
  as long as the nodes are added to the correct groups in the editor.

- Fix detection of when the player is entering / exiting a ground area,
  which fixes a bug where a player would be cliff hanging from the very
  top of a cliff, but when attempting to climb up to the next level of
  ground, would fall instead. This is a slightly improved workaround for
  godotengine/godot#14578.

- Improve cliff tilemaps:

  - Fix tree overlapping z-index bugs by making winter layers child
    tilemaps & using y-sort.

  - Use shared tileset resource among tree tilemaps for efficiency,
    simplicity & consistency.

  - Fix flower/player overlapping z-index bugs by organizing flowers
    into background & foreground tilemaps.

  - Change all tilemap origins back to zero for simplicity &
    consistency. Adjust individual tile positions to compensate.

  - Remove redundant ice tiles and only use ice-autotile for simplicity
    & consistency. Other ice tiles can still be accessed by disabling
    autotile.

  - Ensure all individual tileset tile z-indices are zero; change the
    z-index of the tilemap instead for clarity & simplicity..

  - Fix typo in cliff-floor tile name.
@knightofiam knightofiam merged commit 289a904 into develop Jul 29, 2022
@knightofiam knightofiam deleted the broken-bridge branch July 29, 2022 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant