October 22, 2026
Leaving the Campground Better
Consistent formatting, linting and care for the tooling help keep Settlement 2x86 easier to maintain.
Looking back: October 19, 2026 to October 20, 2026
I want Settlement 2x86 to be easy to maintain as it grows. That includes the game’s C code, the Python tools, the tests and the Makefile that ties the work together. They all need care.
The campground should always be left better than one found it. That’s the principle I want to apply across the project.
Consistent formatting is a practical part of that. Indentation, braces and import order shouldn’t depend on which file I’m reading. When those choices are settled, it’s easier to follow the code and see what changed in a diff. A small behavior change should be easy to pick out from the surrounding lines.
The quality work that went into v0.5.20 gave the project shared checks for that. Ruff checks and formats Python. clang-format handles the handwritten C. Cppcheck looks for problems in the C code, and checkmake checks the Makefile. The same quality suite runs locally and in CI, so the expectations stay consistent across both places.
The Makefile belongs in that list. So do the scripts that generate maps and artwork, the emulator runners and the dependency setup. A tool that produces part of the game is part of what I have to maintain. It needs readable code, consistent conventions and checks of its own.
There were concrete fixes during that work too. The pause panel had a medkit text buffer that was too small for its HP FULL message. That was a real buffer overflow, addressed as part of the quality pass. Formatting makes the source more consistent; analysis and tests help check what it does. I need both.
Generated files need a slightly different approach. The project commits its generated C, but the generators and their inputs are where changes belong. Formatting the output by hand would leave a change that the next generation could overwrite. Those files are excluded from direct formatting, and the build checks their generated data. The rules need to match how each part of the project is actually maintained.
Setup matters as well. Dependencies are recorded with a lockfile, and the quality tools have pinned versions. A fresh checkout has a documented setup command. Local hooks run the checks before a commit, and CI runs them again. That gives future changes a repeatable starting point, including changes to the tooling itself.
Passing those checks doesn’t settle whether a fight feels right or a room looks right. The recent rifleman timing changes still needed playing and feedback. The checks handle another part of the work: keeping changes consistent and catching problems before they become harder to track down.
An automatic fix still needs to be read. If a hook rewrites a file, I need to review the diff and stage it again before the commit goes through. The tools do some of the tidying, and I still need to check what I’m leaving behind.