Inspiration
Akina Night was inspired by the iconic cup-of-water training scene from Initial D. The idea is simple: if you can drive fast without spilling the water, you are controlling the car smoothly.
Modern iPhones already contain precise accelerometers and gyroscopes, so I wanted to explore whether that fictional training concept could be turned into a real interactive driving experience.
What it does
Akina Night turns an iPhone into a driving smoothness challenge.
The phone is mounted inside the car and uses motion sensor data to detect acceleration, braking, and cornering. A nearly full cup of water is simulated on screen, reacting to the movement of the vehicle.
Smooth driving keeps the water under control. Sudden acceleration, braking, or aggressive cornering causes stronger sloshing and can eventually spill the water over the edge.
The app also uses lateral G-force to generate dynamic tire scrub and squeal audio, giving the driver additional feedback about how aggressively the car is being driven.
The goal is not simply to drive fast, but to drive fast while remaining smooth.
How we built it
Akina Night is built natively for iOS using Swift.
Core Motion provides accelerometer and gyroscope data, which is transformed into a vehicle-relative coordinate system before being passed into the simulation.
The water surface is rendered with RealityKit using LowLevelMesh, while Metal compute shaders update the water geometry in real time. Instead of playing a predefined animation, the water continuously reacts to forces generated by the vehicle.
The simulation pipeline is roughly:
iPhone motion sensors → motion processing → vehicle forces → water simulation → Metal rendering
A separate audio system analyzes lateral G-force and controls multiple looping tire sounds. Smoothing, thresholds, and hysteresis are used so the sounds respond naturally instead of abruptly switching on and off.
The project also integrates technologies such as RevenueCat and Google AdMob for the production version of the app.
Challenges we ran into
The biggest challenge was that reading motion data is easy, but turning that data into convincing physical behavior is not.
Core Motion does not directly provide "car acceleration." Device orientation, gravity, road vibration, sensor noise, and phone mounting position all affect the measurements.
Simulating a nearly full cup of water was another major challenge. A simple tilted plane does not look convincing. The water needs inertia, delayed response, oscillation, recovery, and eventually overflow.
Overflow was especially difficult. Early versions allowed water to leave a large section of the circular rim at once, creating something closer to a curved waterfall than a localized spill.
Rendering transparent water also introduced problems. Geometry that was clearly visible with diagnostic materials could become extremely dark or almost invisible with the final water material.
The tire audio system had similar problems. A single G-force threshold caused sounds to appear and disappear unnaturally, so the system needed smoothing, hysteresis, and continuous gain control.
Balancing physical accuracy, visual believability, and real-time performance on an iPhone became one of the central engineering challenges of the project.
Accomplishments that we're proud of
One of the accomplishments I am most proud of is turning real iPhone motion data into an interactive water simulation that runs in real time on an actual device.
The water is not simply an animation triggered by turning the phone. Its geometry continuously responds to changing forces and can transition from normal sloshing into overflow.
I am also proud that the driving feedback is not limited to visuals. Tire audio reacts continuously to lateral acceleration, making the experience much more connected to what the car is actually doing.
Most importantly, Akina Night turns an idea from a fictional racing story into something that can actually be experienced with just an iPhone and a car.
What we learned
One of the biggest lessons from this project was that sensor data and physical meaning are very different things.
Getting accelerometer values is easy. Transforming them into stable, believable vehicle behavior requires filtering, coordinate transformations, experimentation, and a lot of real-device testing.
I also learned that a physically perfect simulation is not always necessary to create something that feels believable. For an interactive mobile experience, perceptual correctness can sometimes be more important than reproducing full fluid dynamics.
Metal compute shaders also proved to be a powerful tool for simulations that require many geometry updates every frame.
Finally, the project reinforced how important audio is as feedback. Tire sounds can communicate changes in vehicle behavior immediately, even before the user consciously notices the numbers or animation.
What's next for Akina Night
The next step is to continue improving the water and overflow simulation so that spills behave even more naturally under different driving conditions.
I also want to turn the underlying motion data into a meaningful driving smoothness score based on acceleration, braking, cornering, and how much water is spilled.
Future versions could include different cups, liquid levels, driving challenges, additional vehicle feedback, and competitive scoring.
The long-term goal is to make Akina Night a small but unique driving companion: a modern version of the cup-of-water challenge that can be experienced by anyone with an iPhone.
Log in or sign up for Devpost to join the conversation.