Making the juice vat solid and climbing the party out
The vat is now a solid drum, the camera climbs over its rim, and the new party stays unsteady until one of them takes juice. Cancel asks first.
The juice vat is solid now, 2.2 m across with its rim at 2.35 m, and nothing walks through it. Once I’ve chosen the four, the camera climbs out of the juice, over the rim and down beside the vat. The new party is unsteady until one of them takes juice, and Chief Scientist Carl now says so.
How does the climb work?
The climb is 4.5 seconds of real time, because the game clock is stopped for the whole opening. Each frame adds the elapsed time, eases it with a smoothstep, and reads the camera’s place from five keyframes. Each keyframe is a share of the climb, a distance out from the vat’s middle, an eye height, a pitch and a roll:
[0.00, 0.00, 2.22, -6, 32] # lying in the juice, eye 0.12 m over it
[0.30, 0.55, 2.75, -18, 14]
[0.50, 1.10, 2.95, -42, -6] # over the rim, looking down
[0.72, 1.60, 2.55, -30, -10]
[1.00, 1.85, 1.60, 0, 0] # beside the vat, level
The four values are blended between keyframes with cubic_interpolate, using the neighboring keyframes as tangents, and a 2 degree sway fades out on the roll. The camera is moved, not the party’s body. The body stays on the start square until the end, and then it’s put 1.85 m from the vat’s middle, facing the way the start square looks. The controls come back and the clock goes back to what it was, so no game time passes from the menu to the first step. Pressing interact skips to the end. A wiped party wakes in the vat and climbs out the same way.
I thought the climb might need a higher ceiling, but it doesn’t. The chamber is 4 m high and the eye peaks at 2.95 m.
Why can the party stand inside a solid vat?
A new game and a wipe both put the party on the start square, which is the vat’s square. That’s why the stand-in vat from the last post had a rim of 0.45 m and no collision. This time the vat is a StaticBody3D named Wall with one CylinderShape3D, radius 1.1 m and height 2.35 m, since nothing stands on the rim and the inside needs no shape. The steel mesh, a disc of juice at 2.10 m and an OmniLight3D sit beside it. I used the real vat’s numbers so the finished model can replace the stand-in without changing the climb.
The party’s physics step would push a body out of the wall while the camera is still lying inside it. So the vat’s node runs its physics at priority -10, before the party’s step. When the party is within 1.3 m of the middle (the radius plus 0.2), it adds a collision exception between the party and the wall, and it removes the exception once the party is outside. If a party is found inside with nothing under way, like the development start that never goes through the vat, it’s stood beside the vat right away.
Why does the party wobble after waking?
After waking up the party was still wobbly, which I kind of liked. I decided it should last until juice ends it, and that Carl should say the juice will fix it, as a way to teach what experience is.
The wobble was already a bug. The vat’s hand-over ran the level’s usual hand-over, which clears the groggy flag, and then set it again with nothing that could end it. groggy isn’t saved, so loading a game cured it, which is why it looked like an accident.
Now there’s a small node, VatLegs, that holds groggy on. It listens to members_changed, so the level clearing the flag can’t undo it. It ends when the party emits xp_awarded with an amount above 0 for any member, whether from Carl’s ampoule, a kill or anything else, so one needle steadies all four. The pace while unsteady is 1.8 m/s against 5 m/s running, with no running, jumping or crouching and a swaying view. The node saves itself as a vat_legs section holding {"on": true} while unsteady and nothing otherwise, so a save from before this loads as steady.
Only the vat’s opening turns it on. The old bay’s opening, the development start and a wipe don’t. A wiped party isn’t unsteady again. I decided against that.
What does Carl say about it?
Carl has a new first option, “The floor keeps moving”, with two replies that alternate when it’s asked again. The first says the vessels are new, that there’s an ampoule of juice in his coat to take off him once he’s finished with it, and that juice is what they grow on. The second says juice is everything a thing ever learned, rendered down and kept warm. He still dies as the talk closes, and the ampoule is still taken off his body. I decided to keep it that way, so getting the ampoule still takes his death. The words are placeholders and I’ll rewrite them.
Asking before leaving
Cancelling the creation screen at the vat now asks “Leave without a party?” and a yes goes to the main menu with nothing made and nothing saved. The default is “No. Go back.” and Esc answers no. It’s a small separate page, because the menu’s question is made to sit on top of another page. The creation screen’s title is now “CREATE PARTY” instead of the machine’s culture-selection text.
Also done
- A test that waited a fixed time after a wipe and expected the party on the start square now waits out the climb and expects it beside the vat.
- The extended
new_game_partytest passed 123 checks and none failed when I ran it alone. A run of 29 related tests had one failure,menus, with 8 checks. It still asserts the old bay’s opening text. I haven’t fixed it and I didn’t run the whole suite.