Mixing Drinks!

I’m finally getting closer to completing the physics implementation of the game! Unfortunately, introducing last week’s fluid simulator into my existing code created many, many bugs and I had to rewrite a few of my older functions to accommodate for this new method of mixing drinks.

I also had to change how I was rendering the fluid in the glass, which I had been doing natively in the simulator’s code, but I swapped to using a sprite for masking. It created a different issue with rendering the surface of the drink, but it’s nothing a normal map can’t fix! ◡̈

As you can see above, I’ve also updated the colours to better represent some of the ingredients we’ll get to play with in the game (water, espresso and milk). I do still need to reprogram the interactions between items and the glass, as well as import a few more animations but these are pretty straightforward. The trickiest part has been completed!

I’ll see you in the next update!

Sprites drawn:

  • Normal maps for 22 drink states

  • Adjusted pouring animation for each drink state

  • Adjusted ice cube animation

Implemented in code:

  • Replaced old layering mechanic

  • Added random eddies to fluid simulation

  • Fixed sprite mask, adjusted scaling

  • Added colours for each ingredient

  • Added simulation freeze

  • New implementation of add_to_drink function

Bugs fixed:

  • Broken sprite mask

  • Fluid adding position not updating according to sprite mask

  • Broken foam layer


Next
Next

Fluid Simulations!