Hahahaha thank you thank you thank you
cat gives the water a weary eye
...keep projecting! That's the juice this entire machine runs on!
You guys seem so enthusiastic I'm gonna give you another one today ~
Update 346Worked some on drowning mechanics, and I'm pretty happy with it! Basically, it's an interaction between two paramaters, Air In Lungs and Lung Exhaustion. The air meter is just an air meter, when it reaches zero you die. At 2/3 air left, the slugcat will give a single bubble, which can be spotted by an attentive player and is basically your cue that it's time to stop doing whatever you're doing under water. At 1/3 air, the slugcat will start to move its arms more and faster, emit a lot of bubbles, move a bit slower, the input direction will involuntarily tend upwards. This is the panic mode, now it's really time to just get up to the surface.
Here's the thing though, when in panic mode, your lungs get exhausted. This is bad for several reasons - when your lungs are exhausted, you take in air more slowly once you've gotten up. If you dive down again with your lungs still exhausted, you lose air faster. Once your lungs have become exhausted, you need to get up, fill the air meter (which is now slower) and then when the air meter is full the lung exhaustion meter will start to tick down. You can see that the slugcat is exhausted because it's closing its eyes and breathing heavily - once it opens its eyes it's safe to go down again.
This sounds complicated, but when actually playing it the implications are pretty simple: go up for air every now and then, and you'll be fine. If you really try to stretch your stay under the surface though, you'll need to stay up longer the next time you get up, to get rid of the exhaustion. This means that if for example some creature is harassing you above the surface, you can't stay away for ever by just popping down and up - if you're down for a long time, you'll need to be up for a long time as well.
If you dive down with fully exhausted lungs, you get only half as much time on the air meter, 4.5 seconds instead of 9.
I have implemented a mechanic which is that if you're in panic mode, and the only input you give is straight up, the air meter will deplete slightly slower. Basically I'm just cutting the player some slack - you're moving straight up towards the surface, it just feels unnecessarily unfair to have you die 40 pixels from the surface, especially as rain world death is a binary switch.
The entire system means that if you're just like, in a pool swimming and diving, it's perfectly comfortable. You can be confident you're not going to die. But as soon as you're trying to do anything under the surface it becomes tricky as you'll really have to work with the swimming mechanics and the air meter. Especially anything that involves swimming in under a ceiling separating you from the surface feels super uncomfortable - which is just the way I want it.
Here's the slugcat almost drowning, but getting up, recovering and continuing its dive.