DEV Community

Kamy Uwambaye
Kamy Uwambaye

Posted on

Game Analysis Report

The Hidden Math Behind the Mobile Games I Already Play
Nov 13, 2026 ·
For an ALU assignment on math in games, I had to stop playing games like someone killing time and start playing them like someone looking for the geometry underneath. I picked three off the assignment's recommended list Subway Surfers, Vector, and Rocket League Sideswipe plus one of my own choosing, 8 Ball Pool, because once you actually look, pool might be the most mathematical "casual" game there is. Here's what's really going on under the hood of all four.
Subway Surfers: lerp doing all the heavy lifting
Subway Surfers is probably the simplest game of the four, and that's sort of the point. You're a runner dodging trains in three fixed lanes, and almost every bit of "feel" in the game comes down to one thing: linear interpolation, or lerp. When you swipe to change lanes, your character doesn't teleport and doesn't walk over — it smoothly slides from one lane position to the next over a fraction of a second. That's a textbook lerp: a starting x, an ending x, and a timer in between.
Distance matters too, just not in a complicated way: your score is literally how far you've run, and obstacles are spaced ahead of you by a set distance that gets tighter, relative to your reaction time, as you speed up. There's barely any dot or cross product happening, because you're always facing forward — no angles to check, no rotation to compute. It's a game built to be played one-handed on a bus, and the math matches that: distance, a bit of algebra for the score, and lerp making everything look smooth.

Vector: timing windows and vectors you can feel
Vector flips the formula a bit. It's still 2D and still about dodging things, but instead of three lanes, you've got a free-running parkour system where almost every move — vaulting a wall, sliding under a pipe, running up a surface — is really just your velocity vector getting redirected for a second before gravity takes it back.
What stood out to me is how much the game runs on tight timing windows instead of spatial decisions. A vault only triggers if you tap within a specific distance of the obstacle — too early or too late and you just crash into it. That's distance and algebra doing quiet work behind a game that looks purely physical. Cross and dot products barely show up since it's a side-view game with no real rotation, but the one thing that's unmissable is the shrinking gap between you and the guard chasing you — that distance is the entire tension of the chase sequences, with nothing but a silhouette getting bigger to tell you how close you are to getting caught.

Rocket League Sideswipe: 3D physics squashed into 2D
This one surprised me the most. Rocket League Sideswipe is the mobile spin-off of the full 3D Rocket League, flattened down into a 2D side-view arena — but flattening it didn't get rid of the vector math, it just made it way easier to actually see.
Your car's velocity, the ball's velocity, where you're aiming when you boost — it's all just x/y vectors now instead of x/y/z, and you can watch dot product happen in real time: how square you're lined up with the ball decides whether you get a clean hit or just clip it. Cross product survives too, just collapsed down to a sign — clockwise or counterclockwise — which is exactly what decides which way your car flips when you flick a direction mid-air. And because the whole arena (floor, walls, ceiling) is drivable, the game is constantly recalculating which way is "down" relative to wherever your car currently is, which is a more interesting bit of vector math than I expected from a free mobile game.

8 Ball Pool: the one game where you can see the vectors
Out of all four games, 8 Ball Pool is the one where the math stops hiding. There's no running, no jumping, no time pressure — it's just you, a cue, and geometry. And the game actually shows you the geometry: when you aim, it draws a straight line out from the cue ball in whatever direction you're pointing, which is literally your intended velocity vector drawn on screen.
Where it gets interesting is what that line does next. If it's heading for another ball, a second shorter line shows where that ball's going to go based on exactly where you hit it — a dead-center hit sends it mostly along your original direction, while a thin cut sends it off at a much wider angle. That's dot product, visualized. And if your aim line hits a cushion first, the game reflects it off like a mirror, same as a real bank shot would bounce. Then there's spin: hit the cue ball off-center and you get rotation that curves its path after contact — pure cross product, and it's the entire reason "english" works the way it does in real pool. For a game people mostly think of as a time-killer, it's doing more visible vector math than anything else I played.

So what did I actually learn
Lerp was the thing I noticed in literally every single game — camera movement, menu transitions, meters filling up, characters sliding between positions. It's the reason games feel smooth instead of robotic, and it's invisible enough that I never thought about it before this assignment. Dot and cross product, on the other hand, are usually running quietly in the background of any game with direction or rotation: Subway Surfers barely uses them, Vector uses them a little, Rocket League Sideswipe uses them more than I expected, and 8 Ball Pool puts them front and center as the entire mechanic.
What this assignment actually changed for me is how I think about "feel" in games. I used to assume that stuff was mostly art and sound design. Turns out a lot of what feels intuitive — a vault that works exactly when you expect it to, a boost that bends around a wall the way you'd guess, an aim line that bounces off a cushion correctly — is a tuned math system wearing a layer of animation on top. Sometimes that math is shown to you directly, like in pool. Most of the time it's deliberately hidden. Either way, it's there, and now I can't really stop noticing it.

Top comments (0)