Unreal Advent of Code
Advent of Code is a yearly coding challenge that happens in December. A coding puzzle (typically centered around elves or Santa) is revealed every day until Christmas. It’s a great way to brush up on old languages or learn new ones, and in 2022 I used it to stay sharp with C++ and Unreal. My self-imposed restriction was that I had to visually represent the “solving” of the puzzles in real-time using the engine.
Here are a few excerpts
This puzzle involved calculating how a series of Rock Paper Scissors games would play out, given a predetermined strategy guide. The guide was a list of letter pairs like [A Y] [B X] [C Z]
with letters corresponding to which shape each player would choose. The solution was calculated using a score based on game outcome and shape chosen.
This puzzle involved finding matching “items” in sections of an “elf’s rucksack.” A rucksack was represented as a series of item characters like vJrwpWtwJgWrhcsFMMfFFhFp
. Each matching item was scored based on its ASCII value, then summed for the solution.
This puzzle involved finding the “elf” with the highest calorie count among their snacks. Snack calorie counts were represented in a list with separators dividing each elf. Individual elf counts were summed, then solved for the max.