Week 29: Better Surfacer player movement, and wrapping-up Scaffolder GUI work

An animated GIF of a recording from Momma Duck showing new and improved fox-running and duckling-following behavior.
Better fox-running and duckling-following behavior!


tl;dr: Last week I made some final Scaffolder GUI improvements, before moving back to Surfacer work, where I made improvements to player movement behavior.


What happened last week?

Highlights

  • Refactored my accordion-panel widget.
    • One of the important benefits of this new system is that it lets me clip panel-body contents when closed, but _not_ clip the focused-outline outline of the button when focused.
    • Another benefit is that this new system is more decoupled, and will be much easier to maintain. My previous accordion implementation was pretty brittle, and would frequently break when I made changes in the codebase.
  • Started refactoring how players are configured.
    • Moving things out of scripts, and into scenes.
    • More in-tune with the "Godot way", rather than my very-custom, very-code-heavy approach.
    • It should now be easier to configure both simple players and complex players.
    • Create a new system for easily configuring collision-detection and proximity-detection for a player.
  • Refactored get_collision_tile_map_coord.
    • This fixes a class of occasional bugs I’d see, where my surface calculations would try to find non-existent surfaces inside walls.
  • Fixed lots of player-behavior bugs in Momma Duck.
    • Still more fixes to come!

Laundry list

  • Finished implementing a new accordion-panel header-and-body wrapper system.
    • One of the important benefits of this new system is that it was needed in order to clip body contents when closed, but _not_ clip the focused stylebox when focused.
    • Another benefit is that this new system is more decoupled, and will be much easier to maintain.
  • Fixed all pre-existing accordion-panel usages to work with the new accordion-panel header-and-body wrapper system.
  • Fix an issue with theme stylebox scaling breaking, because it was being saved to the theme file.
  • Create a ScreenTransition data-wrapper.
  • Add support for aborting pre-existing screen-transitions when a new transition was triggered from one of the screen-transition-start lifecycle events.
  • Fix a bug with a missing caret-rotation param.
  • Inclusion-list another memory-leak false-positive on-app-quit error message.
  • Fix a bug where we try to reference an InputMap action before the action has been registered.
  • Fix a regression with level-select-item rendering post unlock-animation.
  • Fix a bug with the total-ducklings count not accounting for ducklings that are currently running away.
  • Fix tween usages to listen to tween_all_completed instead of tween_completed.
    • I noticed this bug, because of jitter during the level-select-item post-unlock-animation accordion-open animation.
    • The accordion-open toggle function was being called three times instead of once!
  • Fix a bug with theme duplication breaking scroll-bar positioning.
  • Add support for configuring a color-pulse when a HUD key-value box value changes.
  • Add support for configuring whether keyboard controls are enabled, and for toggling them from settings.
  • Add support for conveniently accessing different types of position representations for a given player.
  • Fix a bug with duckling-following behavior, which made them get left-behind a lot.
  • Fix a couple small edge-case bugs.
  • Fix a bug in SurfaceParser which was causing false-negatives for has_surface_for_tile.
  • Add a handy export property for drawing tilemap indices, to help with debugging.
  • Move surface-state update logic out of Player and into PlayerSurfaceState.
  • Fix a subtle bug where jump/land-position calculation could incorrectly mutate a provided origin parameter for fall-from-floor edges.
  • Fix sector-arc-length when rendering small exclamation mark annotations.
  • Refactor get_collision_tile_map_coord.
    • It's now based slightly more off of whether there is a tile in a given adjacent cell.
    • This fixes a class of occasional bugs I’d see, where my surface calculations would try to find non-existent surfaces inside walls.
  • Remove obsolete is_godot_floor_ceiling_detection_correct flag.
  • Remove extra newlines in player_surface_state.gd.
  • Clean-up some Player properties.
  • Fix fox run-from-momma navigation.
  • Fix bug with confirm-data-deletion button not firing.
  • Fix bug with ducklings multiplying when running away.
  • Add support for mapping layer names to bitmasks.
  • Add support for getting a list of layer names from a given bitmask.
  • Add support for easily configuring player collision detection.
  • Add support for easily configuring player proximity enter/exit detection.
  • Create a new ProximityDetector scene, which is automatically found and registered by the parent Player scene.
  • Create new dashed-shape-outline drawing utility functions:
    • draw_dashed_circle
    • draw_dashed_arc
    • draw_dashed_capsule
  • Fix some pre-existing `tool` scripts to call `update_configuration_warning()` in some places that it was missing.
  • Add support for parsing the accompanying PackedScene file in order to find the configured shape data, rather than requiring MovementParams instances to manually define this redundantly.
  • Move some of the really verbose and unlikely-to-change configuration state out of the App class and into a reusable DefaultAppManifest parent class.
  • Make the Player class a `tool` script with exported variables that can be configured from within the scene-editor view.
  • Refactor the MovementParams script to be a scene with exported variables that can be configured from within the scene-editor view as a child of a Player scene.
  • Update MovementParams definitions to automatically calculate action-handler and edge-calculator lists according to `can_grab_walls`, `can_jump`, `can_dash`.
  • Add more structure to MovementParams variables, define which variables will have global defaults, define setters for validating updates in-editor, update new editor icons.
  • Update editor icons.

What's next?

  • More Surfacer work!
    • Finish refactoring how players are configured.
    • Create support for high-level navigation behavior for easily configuring some common types of movement. For example:
      • Walking back and forth
      • Climbing around along adjacent surfaces
    • Debug some important navigation bugs.
      • Players sometimes stop navigating for some reason.
      • Navigating to and from in-air end-points sometimes fails.


🎉 Cheers!


This is a simple icon representing my sabbatical.

Comments