Here is the usual sum-up of my recent activities, mainly water-character interactions here.
I – Swimming animation
OK! The first idea was to enhance the swimming of the character. So I first worked on the swimming animation in Blender in order to make it more believable (if you played the last demo or watched my last video, you may have noticed that there was no swimming animation).
And once the animation was done, I had to work on the transitions with the other possible states of the character. The more states already exist the more complex it is to insert and “connect” the new one. So I worked mainly on the following transitions:
- swim / climb: the character can now fall down into water while he is climbing, or jump out of water to a wall
- swim / walk: the character can progressively come from a slight slope beach into water and once he is in a deep enough water zone, he transitions to the swimming state.
The final tweaks needed were on the swimming speed and “inertia”. Of course, in water, a body is subject to the Archimedes principle as well as to some liquid friction. I started by coding the exact “realistic” forces, but those are not “reactive” enough to make the game nice to play. So I had to tweak the values and coefficients in the equations to give the game a good response time. But I’m not still quite satisfied with it. This may require more work.
II – Particles effects
Now the character swims! But visually, the moves in water seriously lack some water reaction.
I needed to add a few things:
- a more or less huge splash when the character jumps into the water from a relatively high level
- little splashes when the character walks in a bit of water
- falling droplets from the character when he comes out of water
- ripples and foam around the character while he’s swimming
- ripples and foam around land and platforms immersed in water
- little water splashes for small object falling into water (arrows and stones mainly at the moment).
And finally, I had to set up the exact same water particle systems for ennemies.
A few more updates are coming, hopefully with a new level in the next demo at the end of the week.