A Walnut's Thoughts

Self taught developer. Interested in systems programming and game design. I love reading, especially epic fantasy. My favorites are Malazan and Wheel of Time.

The space time complexity tradeoff

I encountered a neat example recently while solving Advent of Code 2015, day 6. The problem can be boiled down to "There is a 2D array of values. Given a range and instruction, apply the instruction to all values in that range. How many values are 'on' at the end?". There are only 2 possible states for each value: on and off, and only 3 possible instructions: on, off, and toggle. I won't focus too much on parsing the input or the structure of the algorithm here, I just want to investigate the hot loop which applies the instruction to each value.

2024-03-09 · 10 min · 1998 words · Walnut356

Protoss has always had a cost efficiency problem

2024-02-07 · 28 min · 5434 words · Walnut356

Can you estimate playtime from replay folder size?

I've seen this question come up a few times on r/ssbm and while I've given hand-wavey answers before, I find myself in a good place to answer more rigorously now. We can break this question down to more basic ones: "how many bytes of replay data correspond to a single frame of gameplay?" and "how many bytes in the replay are unrelated to frames?". From there, we can estimate a duration by simply translating the 16.667ms per frame to minutes and seconds.

2024-01-25 · 13 min · 2591 words · Walnut356

Syntax Test

Edge case testing for this site's syntax highlighting

2024-01-01 · 1 min · 11 words · Walnut356

Search

2024-01-01 · 0 min · 0 words · Walnut356