Week 47: Annotating surfaces

A screenshot of the Godot level editor showing a few different surfaces that have been marked as un-navigable.
I can now easily mark surfaces that should be un-navigable.


tl;dr: I created a new system for annotating surfaces by drawing marks on tile-map tiles.


What happened last week?

Highlights

  • Created a new system for annotating surfaces.

Laundry list

  • Tile-marking system:
    • A system for marking tiles in the level editor, and for then making corresponding updates to the underlying surfaces and the resulting platform graph.
    • Tile marks are painted over the level using Godot’s standard TileMap drawing tools.
    • Any underlying surface that intersects with a tile-mark cell will be matched.
    • Each tile annotation is specific to a given list of characters.
    • Each tile annotation can be set to either exclude or exclusively-include the marked surfaces.
    • Add support for excluding surfaces from the platform-graph surface-set for a given character.
    • Configured using the new tile-marking system.
A gameplay screenshot showing that the character is unable to navigate to the surface that had been marked as excluded.
The character can't navigate to a surface that was marked as excluded.
  • Add new intersection checks:
    • segment-rectangle
    • polyline-rectangle
    • surface-rectangle
  • Start creating a system for assigning distinct surface properties.
  • Miscellaneous:
    • Finish debugging recent surface-parser changes.
    • Fix a subtle bug from a dictionary key value being assigned as a float but accessed as an int.
    • Fix a bug where the legacy function calculate_time_for_passing_through_waypoint did not treat the new mid-surface-protrusion waypoints correctly.
    • Fix a bug where collision-checks could produce false-positives for pre-existing collisions.
    • Track frame-iteration count in check_frame_for_collision.
    • Resolve a couple old FIXMEs in SurfaceParser.
    • Refactor cell_size configuration to be level-specific and stored in the level-config file, rather than global and stored in the gui-config file.
    • Add support for also configuring level IDs on the level scene nodes (in addition to in the level-config file).
      • This allows logic to query level-config state when running in-editor.
    • Update edge calculators to ignore surfaces if they aren’t present in the corresponding platform graph.

What's next?

  • Finish creating a system for assigning distinct surface properties.
  • Add support for collinear neighbor surfaces.
    • This involves changing my surface-parsing logic to sometimes not merge adjacent collinear surfaces if they have different properties.
    • For example, an icy block could have different friction than a neighboring dirt block, and I would need to store separate floor surfaces for each of these blocks.
  • Add support for referring to categories of characters, rather than individual characters, throughout my frameworks.


🎉 Cheers!


This is a simple icon representing my sabbatical.

Comments