Sumo Fight Technical Document

Introduction

This is the technical document for my Sumo Fight game for the GPR5100 course at SAE Institute Geneva. We needed to do an online game with rollback on the Neko Engine (https://github.com/EliasFarhan/NekoEngine).

Sumo Fight is a 2 player game where the goal is to push the other player outside of the ring. Each player has a charge ability that can push his/her opponent farther than usual.

Mechanics

Player movements

The player can move forward and backward using the W and S keys and rotate using the A and D keys.

Player_movements

To do this, I used the A and D inputs to modify the angular velocity of the player, giving the player a direction and then multiply this direction by the W and S inputs to modify the linear velocity of the player.

player_movement

Charge

Using the Spacebar, the player can charge for a small amount of time, unable to move or stop themselves while charging. When colliding with the other player, it transfers its speed to him and pushes him away.

Player_charge

To do this, I used a few timers to decompose the different steps of the charge:

First, There is the preparation step where the player stops in its tracks to move a bit backward and turning yellow to tell the other player he is going to charge. Second, the player turns white, and I multiply its velocity by a certain number to make him go faster, also removing the player’s ability to change its direction and speed.

player_charge timers_update charge_visuals

When one player is touched by the charge, his veloctiy becomes the same as the charging player and he is pushed in the direction of the charge.

collision_detection collisions

Ring and Win/Loss condition

End_of_game

The ring delimiting the fighting area is spawned at the startof the game, when the game manager initializes. When one player is pushed out of the ring, he loses.

ring_spawn

To do this, I test if the player’s position’s magnitude is bigger than the ring’s radius, and if so, he is dead and the other player is declared the winner.

CheckWinner player_out_of_ring