Article content:

Real-time liquid in mobile games? It’s not a fantasy anymore!

Are there liquids in mobile games? If you asked me if there is water on Mars, you would get the same answer — in theory, there is, but there are no benefits from this water. When we talk about liquids in mobile games, we often mean absolutely flat 2D water in casual games.

Where’s My Water?
Where’s My Water?
Royal Offense
Royal Offense

Two main approaches to representing liquids in mobile games are 2D liquids and 3D liquids. Why do most mobile game developers use primitive flat liquids? It is difficult and expensive to simulate a realistic liquid. But what about the solutions for working with liquids on the market? You can find Unity and Unreal Engine tools, but they are not suitable for working on mobile devices. The implementation of existing plugins is too heavy for mobile phones to handle. The existing solutions do not fit in the performance of the game. With the amount of water these plugins can simulate, you can’t do the gameplay. You buy a ready-made instrument, and with its help, you can create the volume of liquid in 1 glass. What kind of gameplay will you create in a mobile game with such a volume of water? That’s right, none. This is why the water we see in games is often used just for visuals alone.

GTA: San Andreas

WAR FOR MILLISECONDS

All 3D development is a war in milliseconds. The main difficulty is poor performance. For normal interactivity and controllability of the game on the phone, a performance of at least 30 frames per second is required. What does this mean for the developer? He wants to add water to his scene. And it takes him, say, 20 milliseconds out of 33 to render water. That means he has only 13 milliseconds to draw the rest of the scene. The creators think it is easier for them to give up on the water in the scene. Game developers are forced to throw away their created content and simplify scenes.

Let’s imagine that you have a game in which a button must be pressed from a volume of water that pushes on it. What are you going to do? That’s right — spend hours and hours working to fake the process of transferring power to the object. Most likely, you will create a trigger where the button is pressed when water reaches it. On the other hand, you could use real-time simulation by running the water in 3 clicks. In this case, the liquid would interact with the object automatically.

The game should have a consistent visual style from the promo video all the way through to real-time gameplay. What does this mean for the player? The game lives up to his expectations obtained from the promo video. Developers often create cinematics not on the engine but by using third-party programs. As a result, we see a classic story. You watch the game trailer and think — oh my, how cool it looks, 10 out of 10. Launch the game and you feel the following: WHAT? In real-time, it looks very different.

This expectation vs. reality effect will not happen with Zibra Liquids. When you run the game, the scene will look exactly the same! Сheck out how the fluid scene in the mobile game would look like if the water in it had been created using Zibra Liquids.

WHAT DO WE OFFER?

A month ago, we released the first version of Zibra Liquids on iOS. Physically correct simulation of fluids of this quality was previously impossible on mobile devices. Take a look at the current stats:

  • iPhone 6s — 33k particles, 30fps
  • iPhone 7–33k particles, 40fps
  • iPhone XS — 70k particles, 40fps

We aim to get smooth simulation on mobile devices produced in 2015 — iPhone 6s and later models. We provide performance control. You can test the plugin on a weak phone, realizing that it will definitely run much better on a newer model. Android is currently in development; we expect to start the first beta test in January. OpenGL API and then Vulkan will also be available soon.