<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Melissa Isimbi</title>
    <description>The latest articles on DEV Community by Melissa Isimbi (@melissa_isimbi_e02867c07d).</description>
    <link>https://dev.to/melissa_isimbi_e02867c07d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4241606%2Fa30936e6-74e9-4a97-88be-9a5a76a2168b.png</url>
      <title>DEV Community: Melissa Isimbi</title>
      <link>https://dev.to/melissa_isimbi_e02867c07d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/melissa_isimbi_e02867c07d"/>
    <language>en</language>
    <item>
      <title>I Played Three Mobile Games to Find the Math Hiding Inside Them</title>
      <dc:creator>Melissa Isimbi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 14:09:20 +0000</pubDate>
      <link>https://dev.to/melissa_isimbi_e02867c07d/i-played-three-mobile-games-to-find-the-math-hiding-inside-them-1eb9</link>
      <guid>https://dev.to/melissa_isimbi_e02867c07d/i-played-three-mobile-games-to-find-the-math-hiding-inside-them-1eb9</guid>
      <description>&lt;p&gt;By Bulamba Isimbi Melissa  &lt;/p&gt;

&lt;p&gt;Games feel like pure fun, but every jump, camera swing and score counter is powered by math. For a class assignment I stopped playing like a player and started playing like a developer. I analysed three free mobile games: Subway Surfers and Vector from the recommended list, and Temple Run as my own pick. I looked for six ideas from class: distance, vectors, algebra, dot product, cross product and linear interpolation (lerp).&lt;/p&gt;

&lt;p&gt;I can’t see the source code, so what follows is based on what I observed. Where I’m inferring how something works, I say “likely”.&lt;/p&gt;

&lt;p&gt;I played each game for at least 30 minutes across 12 sessions, took screenshots and wrote notes as I went. You can also watch my video walkthrough: &lt;a href="https://youtu.be/Mz7PZpl1Eoo" rel="noopener noreferrer"&gt;https://youtu.be/Mz7PZpl1Eoo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Game 1: Subway Surfers
&lt;/h2&gt;

&lt;p&gt;Quick facts: Mobile, endless runner, Kiloo and SYBO Games, 2012.&lt;/p&gt;

&lt;p&gt;You play a graffiti artist running along train tracks, dodging trains and barriers while collecting coins. It is easy to learn (just swipe), speeds up gradually, and small missions keep giving you a reason to play one more run. My best run during testing scored 2,776, and a later run passed 6,000.&lt;/p&gt;

&lt;p&gt;Where I saw the math&lt;/p&gt;

&lt;p&gt;Distance: Score climbs as you travel forward, and coins are collected when you get close enough. A pickup check likely compares the gap between player and coin to a small radius: d = sqrt(dx^2 + dz^2) &amp;lt; r.&lt;br&gt;
Direction and vectors: The runner always has a forward velocity, plus sideways movement between three lanes. The forward speed grows over time, which is how the game gets harder.&lt;br&gt;
Algebra: The x2 multiplier, the coin counter and the mission bars (20/20 coins, 5/5 jumps) are all simple formulas. Score is roughly distance points times the multiplier, and mission progress is current / target.&lt;br&gt;
Dot product: Obstacles ahead matter and obstacles behind don’t. A check like forward . toObstacle &amp;gt; 0 would tell the game that something is in front of me.&lt;br&gt;
Cross product: Lane changes are left or right. The sign of the cross product of the forward direction and the direction to the target lane would tell the game which way to lean the character.&lt;br&gt;
Lerp: The runner glides between lanes instead of teleporting, and the camera follows smoothly.&lt;/p&gt;

&lt;p&gt;One mechanic explained: lane switching&lt;/p&gt;

&lt;p&gt;When I swipe, the game likely sets a target lane, for example x = -1, 0 or +1 times the lane width. Every frame the runner moves a fraction of the way there:&lt;/p&gt;

&lt;p&gt;x_new = x_current + (x_target - x_current) * t&lt;/p&gt;

&lt;p&gt;That is lerp, and it is why the character glides. Jumping is probably simple physics: y(t) = v0*t - 0.5*g*t^2. Collision detection then compares the runner’s box with the boxes of trains and barriers. Since lanes are fixed, the game only has to check obstacles in the same lane, which keeps it fast on phones.&lt;/p&gt;

&lt;p&gt;What works well: The controls are simple and responsive, the missions give clear short goals, and the bright colours make obstacles readable at high speed.&lt;/p&gt;

&lt;p&gt;What I would improve: Fewer video-ad prompts on the mission screen, because they interrupt the flow. I would also add adaptive difficulty that adjusts obstacle patterns to how well the player has been doing, and a swipe sensitivity setting for different screen sizes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Game 2: Vector
&lt;/h2&gt;

&lt;p&gt;Quick facts: Mobile, parkour platform runner, Nekki, 2012 .&lt;br&gt;
Vector is a 2D side-view parkour game. You control a silhouetted runner across rooftops, using a few on-screen buttons to jump, slide and vault. The art style and fluid animation are what make it enjoyable.&lt;/p&gt;

&lt;p&gt;Where I saw the math&lt;/p&gt;

&lt;p&gt;Distance: Bonus cubes (1/6 in the HUD) are collected when the runner reaches them, and the camera keeps the runner at a set distance on screen.&lt;br&gt;
Direction and vectors: In my screenshot the runner slides down a sloped roof, so the movement follows the slope, not a flat line. On a slope of angle theta the velocity is likely v = speed * (cos theta, -sin theta).&lt;br&gt;
Algebra: Collectible counters (cubes, objectives, coins), star ratings and unlock costs like 600 coins are numbers that increase or are compared to thresholds.&lt;br&gt;
Dot product: A dot product between the runner’s facing direction and the direction to an obstacle shows whether it is ahead, which could trigger a vault or slide.&lt;br&gt;
Cross product: The runner’s body tilts to match the roof. Aligning a character to a surface needs the surface normal, which comes from a cross product in 3D or a perpendicular in 2D.&lt;br&gt;
Lerp: Running, sliding and jumping blend into each other instead of snapping between poses, and the menu panels slide in smoothly.&lt;/p&gt;

&lt;p&gt;One mechanic explained: sliding down a slope&lt;/p&gt;

&lt;p&gt;The game needs the direction of the surface, the tangent vector t = (cos theta, -sin theta). Gravity pulls straight down, but only the part along the slope speeds the runner up. A dot product finds that part:&lt;/p&gt;

&lt;p&gt;a = g . t = g * sin theta&lt;/p&gt;

&lt;p&gt;A steeper slope means a bigger sin theta, so the runner accelerates faster. The body is rotated to match the roof angle, and when the roof ends, the speed is kept and the runner enters a jump arc. That is why timing your tricks matters.&lt;/p&gt;

&lt;p&gt;What works well: The silhouette against a detailed background keeps the runner easy to see, two buttons trigger many context-sensitive moves, and the cube and bonus goals encourage replaying levels.&lt;/p&gt;

&lt;p&gt;What I would improve: A shorter step-by-step tutorial, because the Lab text covered a large part of the menu with many pop-ups. I would also add a ghost replay of my best run so I can learn better lines, and a small trajectory hint when jumping off a slope.&lt;/p&gt;

&lt;h2&gt;
  
  
  Game 3: Temple Run (my own pick)
&lt;/h2&gt;

&lt;p&gt;Quick facts: Mobile, 3D endless runner, Imangi Studios, 2011.&lt;/p&gt;

&lt;p&gt;An explorer steals a cursed idol and is chased through temple ruins by demon monkeys. I chose it because it is free, it runs on mobile, and it clearly uses 3D vectors, a chase camera and pursuit. The monsters are always visible behind you, which keeps the tension constant.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where I saw the math
&lt;/h3&gt;

&lt;p&gt;Distance: Score grows with distance run (260 at the start of one run, 42,070 later). The gap between me and the monsters works like a danger value that likely shrinks after a stumble, and coins are picked up with a distance check.&lt;br&gt;
Direction and vectors: The player runs forward and turns 90 degrees at corners. Position updates each frame by velocity * time, and tilting the phone adds a sideways component.&lt;br&gt;
Algebra: Score, coins (0, then 279) and the achievement count (57) are running totals compared against thresholds.&lt;br&gt;
Dot product: Coins and obstacles ahead are relevant while the monsters are behind. A dot product between the forward vector and the vector to an object decides front or back.&lt;br&gt;
Cross product: At a corner the game must know if my swipe turns left or right and rotate the camera the same way. The sign of the cross product gives that direction.&lt;br&gt;
Lerp: Turns look smooth, the camera swings behind the player after each corner, and coins spin.&lt;/p&gt;

&lt;p&gt;One mechanic explained: the chase camera&lt;/p&gt;

&lt;p&gt;The camera sits behind and above the player. Each frame its target is:&lt;/p&gt;

&lt;p&gt;camera_target = player_pos - forward * d + up * h&lt;/p&gt;

&lt;p&gt;It doesn’t snap there. It moves toward it with lerp:&lt;/p&gt;

&lt;p&gt;camera_pos = camera_pos + (camera_target - camera_pos) * t&lt;/p&gt;

&lt;p&gt;When I turn at a corner, the forward vector rotates by 90 degrees and the camera swings round smoothly. This is what gives the long stone bridge such a strong sense of depth and speed.&lt;/p&gt;

&lt;p&gt;What works well: The monsters behind you create real urgency, the swipe and tilt controls are intuitive, and the camera sells the speed.&lt;/p&gt;

&lt;p&gt;What I would improve: Modernise the textures and character models, add daily challenges such as “collect 100 coins without jumping” for variety, and add a subtle screen-edge effect that grows as the monsters get closer so the chase distance is easier to read.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I learned
&lt;/h3&gt;

&lt;p&gt;Lerp and algebra showed up the most across the three games. Lerp is behind the smooth lane changes in Subway Surfers, the animation blending in Vector and the camera swing in Temple Run, so almost every smooth motion on screen seems to use it. Algebra is in every score, multiplier, coin counter and mission bar. Distance was a close third, because pickups, chasers and obstacles all depend on how far apart things are.&lt;/p&gt;

&lt;p&gt;Before this assignment I only noticed whether a game was fun. Now I notice why the camera lags slightly, why a character glides instead of jumping between positions, and how a simple multiplier shapes what I do next. Vectors and distance control movement and detection, dot and cross products handle direction, algebra drives scores and rewards, and lerp makes everything feel smooth. The best designs make that math invisible, and I can now imagine building these mechanics myself.&lt;/p&gt;

&lt;p&gt;Watch my video walkthrough: &lt;a href="https://youtu.be/Mz7PZpl1Eoo" rel="noopener noreferrer"&gt;https://youtu.be/Mz7PZpl1Eoo&lt;/a&gt;&lt;br&gt;
Screenshots from all three games: &lt;a href="https://imgur.com/a/8Bx9eOZ" rel="noopener noreferrer"&gt;https://imgur.com/a/8Bx9eOZ&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>math</category>
      <category>beginners</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
