Devlog #009 - Commit #2248 (Patreon)
Content
Wait, it's been nearly a month since the last general devlog? Where did the time go?!
Game Implementation
Since last time, Episode 3-4, 3-5, and 3-6 have all been fully completed. That's quite a lot!
In terms of episodes, the game's just about halfway done.
The "challenge" stages (like C-1) are on hold for now. Though they are meant to be focused on challenging operations and thus, story-light, I did want to make use of the opportunity to tell a small optional 'side story'.
Primarily, I'd use them to smooth out the "why don't we see that many other surgeons around" kind of story hole that currently exists. (The real answer is introducing more surgeons "just because" would dilute the main story. It doesn't call for any extra surgeons.)
But as it's, well, small and more optional content, it'll have to wait a bit.
Alpha Testing
Most recently, 3-2 and 3-3 were put to the test. The operations seem to be in a good state, with a few minor but expected bugs which have mostly been fixed already.
The current design for when a character is calling from somewhere else.
Story-wise, things also seem to be progressing fine, though there are a few points that I will probably go back and rewrite slightly. Hey, you gotta make it exist first, right?
Demo Improvements
You can touch it
With an event in May fast approaching, I had planned to take some time this month to make general improvements and fix some bugs discovered shortly after the public demo released last Fall.
The most significant recent upgrade is the implementation of proper touchscreen support!
Until now, touchscreens sort of worked, but could be really... bad. Tapping in one location and then another would result in things like a scalpel cut spanning halfway across the screen, jittery teleporting syringe injections, and screws quantum tunneling through the tray.
This was especially apparent on the Steam Deck, which I do want to add support for.
With Chapter 3 mostly done, I figured I'd go and start fixing these longstanding issues...
It's some relevant code. I hate camera transformations, by the way.
...and it actually works, for the most part!
Yes, Spark, it is indeed actually a touchscreen.
I played through every single operation that exists so far (20 of them!) using touchscreen controls, and it was actually pretty fun. There's some... questionable "tech" you can do with this control scheme (oh no, is this the 'two stylus technique'?), but overall it worked well.
Some other nice, related things were added as well:
An option to touch/click on the tool icons directly to swap to that tool.
The ability to swipe up and down on vertically-scrolling menus when using a touch device.
Jank reduction.
Jank reduction
A fortunate consequence of implementing all of that is it served double-duty at fixing another thing: jank when going too fast.
Since the public demo, multiple people have reported tools feeling like they 'lag behind', especially when performing actions such as moving a screw off of a tray too fast.
The NAIL's position hasn't been updated even though its sprite was. It's still in its slot in the tray when it should be on the Driver.
The cursor is to the right of the vial. Though it's just been released and pressed again, the syringe "teleported" back to the vial.
Turns out the method I was using for keeping track of certain collisions was simply too slow. I swapped to an instantaneous check, and the issues disappeared*.
If you're curious, here's a short explanation:
The game tracks collision events when bodies enter and exit certain areas, which is in theory computationally cheap. But these events fire on physics ticks. Cursor movement can occur outside of these ticks.
As an example if you start in a "blocked" area such as the tray or over a pool of blood; then rapidly move the cursor to an open area; and then tried to use the Driver, if you "beat the physics tick", the game will not yet have realized that the "blocker" had already been cleared.
Basically, the game would think, "there is 1 blood blocking you". If you moved out of the blood and tried to do an action before the game was told "1 of the bloods is no longer blocking you, you now have 0 things blocking you", the game would prevent you from doing that action, even if visually the tool was clear of everything.
The fix uses a ShapeCast2D to immediately check for collisions, which is in theory more expensive, but shouldn't ultimately matter.
And all this came about while adding touch support. What a perfect time to just... use it to fix these other issues.
*By "disappeared", I mean, "I had to figure out what was causing the issue in the first place, come up with a solution, implement it, and then wrangled with all of the cases in which I checked for tool-related collisions in the game until it worked". But "disappeared" sounds cooler.
Other improvements
I'm knocking out several other TO-DO items while I'm in this groove.
Added the ability to choose tools with the mousewheel. I mean, it's slow, and I don't recommend it, but if you want to, you can.
Added a Next/Prev tool keybind (essentially mousewheel up/down), because why not?
Fixed Novel sections sometimes getting "stuck", caused when a Dialogic text event wasn't properly listening for an await to resolve.
Fixed V-Sync option not actually being applied (even though its button in the options menu said the correct thing).
The goal is to do a QoL update for the demo sometime in early May. Hopefully, if you have a touch device, you'll find things vastly improved.
Next Time
I aim to have these 'Spring Cleaning' tasks done (or at least significantly reduced) soon so I can get back to developing the actual game. Chapter 4 awaits...
Now there's something you don't operate on in Trauma Center...
Music?
By the way. I've made significant progress on scoping the game's music requirements. But I still lack a musician.
If you know someone who could be a good fit... -> hello@wizbirdgames.com
My inbox is open~