posting a copy of the dev blog here to keep this thread updated. Follow the project here! https://baronvonzoomie.itch.io/circuitmind
Dev Diary #2: Kinetic Logic & Harmonic Flow
Hello again! BaronVonZoomie here. In my first update, I talked about the high-level vision for CircuitMind —the world of El Velo, the "Chassis & Chips" itemization, and the shift from stamina to Neural Flow.
This week, I am sharing the development process on player movement and dynamic bgm layering, the harmonic flow.
Kinetic Logic, the Math of "Feel"
1. The Geometry of Gating: 31 vs. 32
In a Metroidvania, movement is key to player's enjoyment of the game. To implement proper "Slide Gates" without a dedicated "crouch" button cluttering the controls, I had to change our collision bounds around.
The Stand: Our protagonist's standing height is 40px. The Gate: Our world is built on a 32px grid. The Dash: When you trigger a dash, I dynamically shrink the collider to 31px.
That 1-pixel difference means you physically cannot walk through a 1-tile gap, but the moment you dash, the math clears. It’s a "low-profile" mode that turns the environment into a series of locks and keys.
2. Tunnel Safety & Forced Continuity (The "Auto-Glide")
One of the first logical hurdles I hit was the "Stuck in a Tunnel" problem. If your dash timer ends while you are still inside a 32px gap, the physics engine normally tries to revert to your standing height, which would cause you to clip into the ceiling or get stuck in a state-loop.
I implemented an industry-standard solution which is Forced Continuity. Before exiting the dash state, the engine calls a `CheckClearance(40f)` utility. If there’s a solid tile above your head, the engine refuse to let you stand up. Instead, you will "auto-glide" at dash speed until you hit open air.
3. The "Laser Line" Dash
Originally, gravity was always pulling on the player, causing dashes that go off edges to "dip" slightly once in air. This also have the side effect of player unable to dash across gaps and lead to bad player experiences. I’ve moved to a Zero-G Dash model, which means during the dash frames, gravity is zeroed out and vertical velocity is locked. This means if you dash mid-air, you stay on that horizontal plane exactly, allowing for pixel-perfect gap crossing and "air-threading" through hazards.
4. Conservation of Momentum (The Dash-Jump)
Originally, we had a tiny, frame-perfect window right before and after a dash ended where a jump would preserve your momentum. But if you missed that window by even a millisecond, the engine would force you into a static jump windup, effectively "eating" your input and killing your velocity, which is another bad player experience.
It felt like a penalty for being human. To fix this, I updated the state machine to explicitly detect this "Dash-Jump" transition (just like in Megaman X series). Now, we bypass the normal jump windup animation entirely and inherit the full horizontal velocity. The result is a massive, high-speed kinetic arc that rewards you for timing your inputs without the frustration of lost momentum.
5. Platform Threading
Dropping through one-way platforms is a friction point in many games where the player can feel "sticky." To solve this, "Down + Jump" now triggers two specific logical shifts:
1. A 150f downward nudge is applied instantly to the velocity.
2. The physics engine enters a 0.2s platform-ignore window.
That initial nudge is the "secret sauce." It ensures the collider is physically overlapping the platform boundary on the very next frame, letting gravity take over without the player "stuttering" on the top pixel of the tile.
Data-Driven Tuning: The combat.json Suite
Finally, I’ve moved all these variables—Jump Force, Dash Speed, Apex Gravity—into a dedicated combat.json configuration. As an engineer, I hate hardcoding magic numbers. Now, I can tweak the "gravity of the world" or the "snap of a dash" in real-time while the game is running, allowing for immediate feedback and iterative polish. In addition, I am also entertaining the idea of providing this file to the player in the final v1.0 release, so that players can tune the game to their own preferences.
---
Harmonic Flow: The Code Behind "Combat as Jazz"
We are moving away from static background tracks toward a systemic model I call "Harmonic Flow." The goal is simple but ambitious: to transform every combat encounter into a procedural jazz-fusion performance where the player acts as the conductor.
1. The Stem Stack
Our current architecture uses Vertical Layering—a stack of perfectly synchronized audio files (stems) running in parallel.
To prevent "music thrashing," we implemented a Tension Linger system. When you lose aggro, the music doesn't abruptly cut; it "lingers" for 4 seconds, allowing the "Cool Noir" atmosphere to melt back into the city hum naturally.
2. The Lick System: SFX as Performance
In El Velo, sound effects aren't just feedback—they are musical "licks." We are building a library where every action follows our "Chrome & Brass" palette (Flesh vs. Tech).
For example, Dashing triggers a "chk-chk" guitar scratch, and landing a critical hit fires a sharp Brass Stab, and by tuning every impact to the Scale of the BGM, we ensure that your attacks never clash with the music. Instead, they feel like improvised solos layered over the arrangement.
3. The Vision: Enemy as Instrument
Our ultimate goal for the vertical slice is the "Enemy as Instrument" logic. We want to tie specific instrument samples to different enemy archetypes:
- Hitting a Security Guard contributes an Upright Bass pluck.
- Destroying a Drone triggers a Trumpet blast.
- Engaging a Heavy Mech brings in the Baritone Sax and low piano bottom-end.
Through Sidechain Compression, the system is designed to "duck" the background music the moment you land a hit, creating the acoustic space for your "solo" to cut through the corporate noise. You aren't just fighting the city; you are performing its downfall.
---
The Showcase Level: Putting it All Together
To wrap up this update, I’ve recorded a video of our new Showcase Gauntlet. This level was designed specifically showcase the finer details of a character's movement in a 2D game, such as coyote time, corner correction and frame canceling etc.
CircuitMind - Character movement showcase, initial iteration
This video will show case dynamic BGM layering. At first the base layer will play, then we move into enemy sight range, and that would trigger the tension layer. We then move out of the detection range and the base layer will play again and tension layer will fade out. Finally, we stay within enemy range long enough to trigger the chase, and also triggering the action layer.
CircuitMind - Dynamic audio layer showcase
---
Roadmap & Next Steps
With the movement physics and audio foundation locked in, my next focus is build up the foundation for a robust inventory system, where player can swap out gears and the cybernetic chips on their equipment.
Thanks for joining me on this journey.
— BaronVonZoomie