DEV Community

Audran Ndayisenga
Audran Ndayisenga

Posted on

Game Analysis Report

Game 1: Subway Surfers

  1. Game Information Game Genre: Action/Puzzle Detailed description of the platform: Mobile (Android and iOS) Style: Endless Runner / Arcade Publisher: SYBO Games and Kiloo (original publisher) Year of Release: 2012
  2. Game Overview Subway Surfers is a game that involves endless running and the player has to run along the railway tracks, avoiding a dog and an inspector. The primary goal is to survive for as long as possible without getting hit by trains, barriers and other hazards, picking up coins and power-ups. The player may move left or right, can jump and slide to avoid the obstacles. The running speed of the game is raised as the game goes on, increasing the difficulty of quick reactions. One cool part of playing Subway Surfers is its ease of control. The controls are easy to understand, but will take concentration and split-second decision to survive at higher speeds. The game is interesting from a game development point of view due to its combination of character movement, collision detection, distance calculation, scoring systems and smooth animation, which enable continuous game play.
  3. Game Overview
    This gameplay loop encourages players to keep trying to beat their previous scores.

  4. How to use math in Subway Surfers.

While playing the game, I noticed the following mathematical concepts in Subway Surfers. These include: Distance, Direction and Vectors, Algebra, Dot Product, Cross Product, and Linear Interpolation (Lerp).

I don't have access to the source code for this game, but I can describe how these ideas are probably implemented based on the gameplay that I went through.

4.1 Distance

Distance is a key factor in determining the distance between the character and any obstacles, trains, and collectibles.

During the time that I am playing, I saw that the character had to jump, slide or change lanes to get to an obstacle. If I do not react quickly enough, the character will bump into some train or barrier.

For instance, if the character is 10 units from a train and begins to walk towards it at a speed of 5 units per second, then the time before reaching the train is approximately:

Time = Distance ÷ Speed

Time = 10 ÷ 5 = 2 seconds

This is a very simple example, not taken from the game.

Distance calculations are important for identifying if something collides with the player and how much time the player has for reacting.

4.2 Direction and Vectors

Vectors represent the direction and strength of a movement.

Character movement: I moved the character left and right with swipe controls, jumped over obstacles and slid under barriers.Movement of character: I moved character left and right with swipe control, jumped over obstacles and slid under barriers.

A vector for the simplified movement:

  • Move right: (1, 0, 0)
  • Move left: (-1, 0, 0)
  • Jump upward: (0, 1, 0)

These vectors are expressed in terms of an X (horizontal) and Y (vertical) axis.

This is important because the character will be able to move on a vector, and the character will move towards the direction of the player's swipe.

4.3 Algebra

When the values of things in the game change, either up or down, according to math, use algebra.

My observation: As I was searching for coins, I realized that my coins had increased in number. My score went up as I ran more and the game got quicker as it went along.

The basic coin calculation is:

The number of new coins = Number of previous coins + Number of collected coins

For example:

120 + 15 = 135 coins

A very crude scoring system might be:

Score = Base points x Multiplier.

Why it matters: Algebra is used to manage the changing values of the game, such as scoring, currency, progression, and others. These examples show possible calculations and not the actual formula used to score the test.

4.4 Dot Product

Dot product is a mathematical calculation which can be used to identify if an object is in front of or behind another object.

When my character was running, I could see the approaching trains and barriers in front of my character.

The dot product of the character's forward direction and direction to an obstacle can be used in a game.

  • Positive Dot Product: The obstacle is generally in front.
  • Negative dot product: The obstacle is generally behind.
  • Zero dot product: Obstacle is perpendicular to the forward direction.

It is important because a dot product can be used to determine if an object is in front of a character or if it is in a specific direction. But I can't say for certain that Subway Surfers uses this approach to its obstacles.

4.5 Cross Product

The cross product result is a vector orthogonal to two given vectors. Can be very useful in 3D games as a way to determine orientation and rotations in the game.

My observation: I was knowing that the character was changing direction while running between lanes and the camera stayed consistent with the running path.

Cross products may be useful to determine a right direction in a possible 3D implementation, from a forward vector and an upward vector.

For example:

Right Direction = Up Vector x Forward Vector.

The outcome will vary depending on the coordinate system and the order of the vectors.

The reason for their importance: They can be used for camera orientation, character alignment, and calculating 3D movement. This is one way to implement the technique rather than to see or check it in the game.

4.6 Linear Interpolation (Lerp)

Linear interpolation is a mathematical technique for estimating a value in between two positions or numbers.

My observation: The character seemed to move between lanes rather than teleporting. I also saw smooth movement while playing through the animation.

A simplified Lerp formula:

New Position = Start Position + t (End Position − Start Position), where t is the fraction of the time elapsed.

For a value of t between 0 and 1.

For example, if the character moves from X = 0 to X = 2, and t = 0.5:

New Position = 0 + 0.5 × (2 − 0)

New Position = 1

This means the character is in between the two postures.

The importance is that interpolation helps to produce smoother lane transitions, camera movements, and animations, resulting in a more fluid and responsive gameplay experience. Note that the observed smoothness is not a proof of the use of Lerp in the game.

Summary

I noticed from the games that distance, vectors and algebra are some things I can easily see in Subway Surfers. Another possible explanation for smooth motion is that the object moves via a process called interpolation. The dot and cross products are not directly visible, but may be used indirectly in 3D calculations.

The knowledge of these concepts enabled me to see that a game like a simple mobile game relies on some mathematics to make the game click and enjoyable to play.

*
Gameplay Mechanic

Character Movement

The player changes lanes by swiping.
The game utilises vectors to move the character to the left or right, without losing speed.
Strengths
Smooth controls, Bright graphics, Easy gameplay and Fun power-ups.

Improvements

I would add in streaks of how long a player played in succession, and a few more environments and multiplayer mode to make it more interesting.

Game 2: Brawlhalla

  1. Game Information
  • Title: Brawlhalla
  • Platform: PC
  • Developed by: Namco Publisher: Big Fish Games
  • Publisher: Ubisoft
  • Release Year: 2017
  1. Game Overview

Brawlhalla is a fighting game in which different characters and weapons can be used to fight against opponents. The main objective is to knock opponents out of the arena and win the match.

It is a fun game due to its competitive play, combat speed and fighting styles.

  1. Gameplay Flow

To view the result of the knockout round, press Next Match.To see the result of the knockout round press Next Match.

  1. The Game of Mathematics.
The concept Its use in Brawlhalla
Distance: Identifies if an attack is close enough for an opponent to be hit.
Vectors Direction and distance of character movement/knockback/jump
Algebra is used in damage calculations and in scoring.

May be able to check if opponent is in front of character using Dot Product.
Not directly used in this 2D game, but could be used for orientation calculations.
Lerp could be used to achieve smooth camera movements and UI transitions.

  1. One Gameplay Mechanic: Knockback:

Knock Back: When a character is hit and pushed back by the attacker.

Knockback can be also described mathematically by a vector:

The direction of knockback is multiplied by the force of knockback.

If the opponent is hit towards the right, for instance, then they are pushed in that direction. The action that ensues can also depend on damage, attack type and other game mechanics.

This will challenge the players to play the game with a little more strategy and care, as they will be less likely to be thrown over the side of the arena.

  1. Strengths
  • Basic controls and several attack combos.
  • Responsive Combat & Smooth Character Movement. -Watches make for interesting matches, since they have various weaponry and characters. The competitiveness of the game will encourage players to refine their skills.
  1. Suggested Improvements

I would add a more in-depth beginner mode that would teach attack range, movement, and knockback.

This will help beginners understand how to engage in combat and even become proficient at it before they meet with experienced players.

  1. Reflection

I believe I discovered the term 'vector' and 'distance' effects when playing brawlhalla, it was there I came up with the idea. Character movements, Attack range, Knockback is a way that math can impact gameplay.

I also learned that game developers should balance the movement, physics and combat systems so that the games can be performed fairly and be fun.

  1. Conclusion

Brawlhalla is a maths based game which demonstrates the application of math to movement, combat, and collision detection.

Some of the most apparent are vectors, distance and algebra. These mechanics were studied to find an understanding of how Maths can be utilized in a competitive game.

Game 3: Minion Rush

  1. Game Information Title: Minion Rush Platform: Mobile Genre: Endless Runner Developer: Gameloft Release Year: 2013
  2. Game Overview Minion Rush is an endless runner game based on the Despicable Me movies. Players control a Minion as it runs through different locations, collecting bananas, avoiding obstacles, and completing missions. The main objective is to run as far as possible while collecting bananas, achieving high scores, and completing challenges. The game is enjoyable because it has colorful graphics, fun animations, exciting missions, and different costumes that give players new abilities. 3.Gameplay Flow Main Menu Choose Mission Start Running Collect Bananas Avoid Obstacles Complete Mission / Reach High Score Unlock Rewards Play Again
  3. Mathematics in the Game Concept Observation Distance The game calculates the distance between the Minion, obstacles, bananas, and power-ups to detect collisions and item collection. Direction & Vectors Swiping left, right, up, and down changes the Minion's movement direction while running forward. Algebra The score, bananas collected, mission progress, and rewards increase based on calculations during gameplay. Dot Product The game may use direction checks to determine whether the Minion is facing objects or approaching obstacles. Cross Product Used to help control turning, rotations, and the orientation of animations during movement. Linear Interpolation (Lerp) Smooth camera movement, character animations, and transitions between lanes are achieved using interpolation.

5.One Gameplay Mechanic Explained
Character Movement
The player controls the Minion by swiping in different directions to switch lanes, jump, slide, or dodge obstacles.
The game uses vectors to determine the direction of movement while maintaining a constant forward speed. Distance calculations help detect collisions with obstacles and determine when bananas are collected. Smooth animations and camera movement are likely achieved using linear interpolation.

  1. Strengths
    Smooth and responsive controls.
    Bright and colorful graphics.
    Fun missions and objectives.
    Creative character costumes and power-ups.
    Engaging sound effects and animations.

  2. Suggested Improvements
    More multiplayer features to compete with friends.
    Additional maps and environments.
    More daily challenges and rewards to keep players engaged.
    More of it based on online stuff so playing it offline might be enjoyable than playing it online

Reflection

The maths concept that stood out most in my mind as I played through Subway Surfers, Brawlhalla and Minion Rush is that of distance. Using distance to check for collisions, pick things up, avoid obstacles, and check for interaction between objects are used in all games.

I had a totally different perspective towards games after completing this assignment as I now know that mathematics is a key element to producing movement, animations, scoring systems and realistic gameplay. I now have a player's and a developer's point of view of games.

Conclusion

I took the time to learn about the role of math in game development after studying the example games of Subway Surfers, Brawlhalla, and Minion Rush. Distance, vectors, algebra, dot product, cross product, and linear interpolation are all concepts that help bring in a smooth movement, realistic interactions, collision detection, and enjoyable gameplay. I learnt the vast importance of mathematics in creating contemporary video games with this assignment.

Top comments (0)