Closing Pipes for Advent of Code 2023 - Day 10

Date

Day 10 of Advent of Code had us trace the layout of a pipe and then determine which spaces remaining that were completely enclosed by the pipe. Once the pipe was traced and closed, an application of the even-odd rule was used to determine the enclosed spaces.

I chose a simple solution of always just casting my ray to the left. This ended up simplifying my code, as there are cases where the ray only went over parallel lines, never intersecting a truly vertical line. In this case, I only needed to consider pipes that went downward for the even-odd counting.

Advent of Code 2023 - Day 10

Score Card 3.0.1 Released

Date

Score Card 3.0.1 has been released! This minor release fixes an issue of scores losing focus when shifting to face up positions.


Restructure 2.1.1 & 2.1.2 Released

Date

It turns out I never used the close method in Restructure in any of my production code. This led to crashes cleaning up statements, as well as fully deleting the database. There was even a lone issue on GitHub pointing me to the problem, but I never fixed it for over 3 years.


Spacing Out Elves for Advent of Code 2022 - Day 23

Date

Or Dance of the Sugar Plum Fairies?

Day 23 of Advent of Code had us simulate a group of elves spacing themselves out to plant fruit. This one is a little slapdash, but it’s still fun to look at. The ground and view could have been nicer, but the holidays always limit what I can attempt in a reasonable amount of time.

Dance of the Sugar Plum Fairies

Path Finding for Advent of Code 2022 – Day 12

Date

Day 12 of Advent of Code is a path finding problem, which is ripe for visualization. I used the A* algorithm for my solution, which should get to the closest path as fast as possible. It’s always crazy to watch these algorithms in action as they search and narrow down the solution near the end.

Searching for a path. Running up that hill.

Lessons Learned

This is the first visualization with a large amount of nodes. For just the terrain, there are 5,904 nodes. The renderer uses one giant buffer for storing constants and allows a max of 3 renders in flight at a time. This means I can only use 1/3 of the buffer per render pass. In my original implementation, I was breaking past the 3MB buffer, which at best causes artifacts, and at worst causes slow downs and lock ups. To fix this, I added:

  1. The ability to specify the buffer size at initialization.
  2. A check after a render pass to fatally crash the app if more than the maximum buffer allowance is used.