I struggle with trigonometry at the best of times, trying to also animate it is a death sentence |D

Artboard 1 copy 3M-eyeFollow

I still have no idea how to set the various sin parameters to look nice, but here's one bunch of parameters that works.

The recolouring underwater's pretty gross, I'll have to mess with that later.

And of course, the entire reason for doing dynamic water instead of tile-based water: spring physics 8D

First gif is with the Dive ability, second is without.

I'll need to change how the impact affects the surface to avoid that big wide glorb where you land in the water, but other than that, it's turning out alright ;3;

I made it so the background waves make characters bob in the water when they're at the surface :D

I like the effect, but given the chance, the camera also bobs and it looks awful. If I want to keep this, I'll have to rewrite my camera logic and I don't even know how to approach that ._.

@RAPIDPUNCHES Only if I don't let the camera move ;_; This is awful, instant dizziness.

@eishiya oh true owo! I believe in you though 👍 you can solve this. Changing the camera when reaching the water sounds tricky.

@RAPIDPUNCHES I probably won't change the camera just for water, instead I should make the camera always stay in one place unless the character moves far enough or quickly enough. A bunch of 2D games do that, I just need to figure out how to code it.

@eishiya Do you have the camera pinned to the draw location of the character sprite, and/or the draw location pinned to the sprite's game location? Because if you don't, you could do the bob with a draw offset instead of moving the character itself, which is probably easier than redoing the camera logic entirely

@InspectorCaracal I thought about that, and it would probably be easier to rewrite the camera than do that ;D The sprite draw location is pinned to the game location, and physics knows *nothing* about sprites. There's no way to have this affect only the sprite but not the camera. It would be easier to make the camera ignore small movements.

@eishiya Ah yeah in that case it makes sense to just make the camera tied more loosely to the sprite movement.

@InspectorCaracal Yep :'D Won't be the first time I've rewritten the camera logic, probably won't be the last.

After trying a bunch of different methods to minimise unnecessary camera movement, I found nothing that works without breaking something else. I'll just not have the bobbing, and instead make the swimming animation bob more than it currently does.

Having failed to make my camera play nice with waves, I decided to drown my sorrows in splash particles instead. Particles remedy all ills.

I also added a slight bob to the swimming animation since I can't have a real one.

@eishiya not to be a dudebro and ask about things you're clearly the expert in (whereas I am not, because I have animated 0 things let alone a game), but is there any way to like. freeze the vertical camera while in the water? I don't even know if "the water" is a condition you can program for and idk what you're doing. but I would figure that 'water' as a condition is easier than specifically water while at the surface. if that makes sense? feel free to ignore me lol

@renardroi It's a good concern and I am hardly an expert, so you're not dudebroing :D

I spent 3+ hours today trying to do exactly that and failed horribly. The slight camera bobbing while you stabilize at the surface isn't too bad, I think, especially considering most players will probably not be spending their time in one place.
I am still working on finding the best values for buoyancy to avoid too much bounce while still having some.

@renardroi It's theoreeeeetically possible to have separate camera logic for when the player's in water (and, more importantly, when they're in water and not Diving), but I'd really like to avoid such special-case logic if I can. The swimming camera bob is something I'll let sit for now, and see how playtesters feel about it when I get to that stage.

@eishiya hmmm this is so interesting. is there a way to set a minimum sprite movement requirement before the camera can move? like maybe the sprite needs to move at least 15 px out of center in order to trigger the camera readjusting?

anyways it looks stunning as usual. honestly the game looks so beautiful and I look forward to every single update. no matter what u do I'm sure it'll look good

@renardroi It's possible, and that was one of the things I tried today :'D It made for jarring camera jumps when a movement just hit that threshold, and this can happen with just about any threshold.

It also resulted in the camera settling inconsistently depending on where the last time it hit the threshold was, e.g. sometimes it would end up focusing above the water, and sometimes below.

@renardroi And thank you <3
Hopefully it'll be fun to play too ;3; I'm a better pixel-pusher than I am a game designer.

@eishiya oh please you're doing great! you've obviously put a lot of thought and work into it!! 💚

@renardroi Haha, thanks!
Thought and work don't always translate into *good* results though. I think in terms of visuals and movement I'm doing alright, but I'm not confident in the game's overall progression, "plot", etc. Games are hard :'D

@eishiya all of the gifs of your work make me want to Live In Your Game and if that's not high enough praise idk what is

@renardroi Hahah thank you <3 It's based on some of my fondest memories, so I'm glad that comes across.

@eishiya Splash particles! O: The water looks really fun to play around in.

Sign in to participate in the conversation
Mastodon.ART

Mastodon.ART — Follow friends and discover new ones. Publish anything you want & not just art of all types: links, pictures, text, video. All on a platform that is community-owned and ad-free.