The last piece of new tech for the map editor is in place. There are still some bugs to iron out, UI updates, and such, but all of the critical code is written.

Walls are added by clicking to add points, e.g., click to start adding walls, move the mouse and click to end the wall section and begin another, repeat. When you’re done, you simply double-click and you can start adding whole new sections of the map. If you’re creating walls and floors at the same time, when you double-click the section you’re completing will auto fill with floor tiles.

Here’s a preview of the auto floor fill in action.

Work on arbitrary walls is almost complete. The initial intention was to add angled walls a parallel system to the current wall implementation until everything was ready to be moved “off the grid.” It became apparent fairly early on that it made more sense to move everything off the grid now, rather than attempt a merge of two separate systems later. This does require some structural changes to the map that, while beneficial, have to happen all at once. In the video below, you can see the current state of the new wall system with debug information being rendered.

In the first step, as walls are created, you’ll see the parallel rays cast to determine the accessibility of spaces on the grid are determined. This same method will be used to calculate the accessibility on a hex map with 60 degree rays.¬†In this step, the map square the wall belongs to is also determined. Objects on the map are now stored as object pools and referenced by the map structure.

An additional tool for checking visibility has been added to the map editor. You can see, in the second part of the video, line-of-sight being tested at arbitrary points on the map.

In the released build, most of this debug information will not be displayed, although the splines representing the paths for the walls will likely be shown when editing walls.

Some advantages that we’ll gain for the new walls and map structure:

  • Potentially smaller memory foot print for map data. The current scheme uses 48 bits per wall piece. New scheme uses 112 bits to describe any length wall section.
  • Wall patterns. The new system allows for patterns of wall types to be used. For example. a pattern could be created using 3 different wall pieces and, when a wall is created, the length of the wall section will use the pattern. e.g., A-B-C-A-B…
  • Different wall types can be assigned to the interior and exterior of walls. For example, a brick exterior could be used with a plastered wall interior.
  • Different wall sizes. Currently, all wall sections¬†are 5′ wide. The new system will support walls of different widths.
  • Curved walls. The spline system, as implemented, supports curved splines.
  • Editing wall sections by modifying the existing splines.

I should be releasing a new build as soon as all of the previous functionality has been restored and we’ll see the new features come online following that. The functionality for all the advantages outlined above either exists or has the proper hooks in place. Much of the work remaining is the interface for users to create and edit using these features.

Thanks to everyone for their patience.