Monthly Log 2024

01 - January

tlature

Did some refactoring around Commands so that I could:

  • Map commands like :wq to multiple edits
  • Make App-level commands, like :? to open the help dialog
  • Add tooltips to subcommands like :add, which are not commands in themselves, but rather components of other commands like :add plugin or :add block

Bevy Replicon

Did a cursory evaluation of a bunch of bevy networking crates. Decided to use Replicon for my current game, and wrote about the process of integrating it:

🌐 Bevy netcode - Exploring various online multiplayer solutions for the Bevy game engine
Replicon

02 - February

tlature

I probably should've been taking notes on what I'm working on while I was working on it, but in lieu of a more thorough description, here's a summary of my git log:

  • Add better RouteView and PluginView panels, including parameter editing
  • Add chain view scrolling: Instead of squeezing every processor on the page, chain view panels now have a fixed width, and the ones that don't fit aren't shown until the selection moves offscreen.
  • Add base64-encoded plugin state for non-UTF-8 plugin state bytestreams

FediCard

Nash and hexephre from labyrinth.social made a little tool for creating FediCards! It's built using Godot, which is really neat, but in the comments, there seem to be a few issues when running on some browsers and OSes.

To that end, I've been playing around a lot with web technologies, and in particular, HTML and SVG. In my naïveté, I figured I'd be able to whip up a quick browser-based editor to provide a more compatible (albeit less functional) companion application. Check out the proof-of-concept here

See also:

Monthly Log 2023 - Designing a card game?

Problem 1

My first instinct was to make an SVG file that gets edited, and directly export that. After hand-minimizing an SVG file and defining all of its style in CSS, I ran into issues with HTML <input> tags embedded in the SVG data.

In retrospect, I could've probably rigged up some sort of Javascript shenanigan, but at the time, I was hoping to get away with as little Javascript as possible. So I converted all of the SVG rectangles to <div> tags.

Problem 2

There's no way to resize the <textarea> dynamically based on its contents with just HTML. My solution to this problem was to ignore it.

Problem 3

After adding some controls for zooming into the image, I ran into an issue where the zooming was causing the image to exceed the bounds.

I turned the img tag into a <div> because I have no idea what I'm doing and the internet told me that would work. And it did.

Rowing machine mod

A while back, I found a used rowing machine on craigslist. It was in really good condition (still had the plastic screen protector, and clearly hadn't been used that much). I've been using it pretty regularly, and for the most part, I'm happy with it, but there's one issue that's been bugging me: after ~3 minutes of inactivity, the screen resets, and does so with almost no warning.

Obviously, the only solution is to reverse engineer the device so that I can build my own distance tracking device. And because the original head unit is mounted to the machine using a VESA mount, this has the added benefit of letting me mount a screen and speakers instead, so I can more comfortably watch stuff while I exercise.

Finding pinout

First step was to figure out what all the pins did. I took apart the head unit, and looked at the board to figure out what did what.

Then I probed the pins to check for voltages and any discernable signals. Under the assumption that the black wire was ground, I found pins with 9 volt and 3.3 volt signals, which I just assumed were power, but other than that, the only other pins I could identify from the 10 total pins were a pair of differential signals.

Next step was to open up the body of the machine. In retrospect, I shouldn't have wasted any time with the head unit, because everything I needed to know was in here. There is a small cylindrical sensor pointing to the air resistance wheel, and after following its wires back to the cable harness, I probed it to find that its resistance dropped when it got close to a magnet mounted on the air resistance wheel. With this, I could just treat it like a pull-up switch and use it to count revolutions.

Building on a perfboard

These days, it's really easy and cheap to get a custom PCB made. With excellent FOSS tools like [KiCad], there are very few excuses to not make a PCB. My excuse in this case was that I wanted to get this running within a few days.

TODO:

  • add pics
  • adding power switch after building the board
  • alternate mcu pins
  • reverse mount headers
  • embassy i/o interrupts
  • 48 revolutions with interleaved i2c
  • 210 when doing one every 10 buttons (maybe because of debouncing or noise? should try with hysteresis)

Next step is to get some sort of speed detection going, but in it's current state, it does everything I need it to, so I suspect that I won't get around to doing anything like that for a while.

Monthly Log

I don't want to complain too much because the fact that I've been able to do 6 months (wow!) of monthly logs without missing any by more than a day or two has far exceeded the expectations I had when I started, but I think I still haven't quite found a good "voice" for blogging yet. Plus, my posts are a bit slapdash and dry, and tend to just say "I did this, then I did this, so I had to do this", rather than outlining any actually useful perspectives or processes, or building an interesting narrative. I had also hoped to use these logs as an opportunity to practice my German, but I've yet to translate any of them yet. Maybe next month.

03 - March

more bevy replicon stuff

Tried a few libraries for rollback/snapshot netcode:

  • bevy_timewarp
    • no examples, documentation is pretty rough
  • bevy_replicon_snap
    • seems very immature, got a lot of weird behavior at high latencies. (Tangentially, tc qdisc add dev lo root netem delay 200ms is a fun command)

Overall, I spent way too much time spinning my wheels and have very little to show for it. I spent the last day of the month basically undoing most of my changes to revert it back to being a local-multiplayer game. I'm also trying to refactor it to make more sense, but seeing how I have very little experience, it's pretty tough. I think I might just start from scratch on a simpler game, with more focus on game mechanics and playability rather than spending so much time on high-complexity features like scriptable abilities and multiplayer. Maybe even enter a game jam or something.

blender mod

  • bought a $30 blender on craigslist because i was tired of holding down the cup on my smaller personal ninja blender
  • fool that I am, this one you have to hold down the button, so I still can't walk away from it while blending
  • so i soldered a toggle switch on it in parallel with the momentary switch
  • fortunately, it was easier to take apart than my old smaller blender
  • i once again forgot to take pics
  • super easy modification that i think anyone can do to almost any blender

04 - April

Mostly game development this month:

🧙 Spell Scripting - Creating a state machine scripting language to implement spells for a MOBA
Circle physics - A physics engine specifically for real-time strategy games

But also a bit of ↹lature:

↹lature - devlog - Implementing a niri-like signal chain viewer

Monthly log

It is the 27th of May, and I am just now uploading my log entries for April. I originally intended to write and post my logs while I was travelling at the beginning of May, but that just didn't happen at all. On the bright side, I spent basically the whole day yesterday revamping and reorganizing the wiki, hopefully in a way that makes it easier to write for. I'm also really proud of the two articles that I did end up with, and think that they're some of my best.

05 - May

  • went to Montréal for Open Hardware Summit
  • additional wiki features
  • hp zbook quick keys and flourish