Elements of the game - SC-SGS/surviving-sarntal GitHub Wiki
Purpose
This page aims to give an overview of the elements/entities occurring in the game.
Goal of the game
The objective of the game is for the player to achieve the highest possible score (measured as the vertical and horizontal distance)by surviving for the longest possible duration while climbing the terrain.
End of the game
As soon as the hiker gets killed (zero health points or falls behind the kill bar), the game is over.
Furthermore, the user can leave the game by pressing the esc key.
Player
The player (a hiker) is controlled by the user of the game. The state of the player is indicated by a health bar. Once the player loses all their health points, the player dies and the game ends.
The hiker has the following functionalities:
- move to left/ right
- jump and double jump within 1,5 seconds after the first jump
- crouching
- collecting & using items, dropping items
How to control the player is explained here: Controls.
Monster/ Killbar
In the current version of the game, the kill bar is represented by a Yeti figure. It is situated at the left edge of the screen and moves continuously while trying to catch the hiker. Once the monster reaches the player, the player is killed and the game is over.
Items and inventory
There are items spawning during the course of the game. There are three types of items that can help the player:
- Kaiserschmarrn: Eating the delicious Kaiserschmarrn will restore the hiker's health.
- Coin: Collecting a coin increases the coin score and increases the speed of the hiker.
- Duck: The duck provides a shield for a few seconds. As long as the hiker has the shield, they won't take damage from being hit by rocks.
- Rock bomb: Using the rock bomb destroys all rocks that are currently in the air.
The items collected by the player are stored in an inventory. The player can switch between the items in the inventory and use select them for use.
Rocks
At the right end of the screen, new rocks are continuously created that fly through the air. When a player is hit by a rock, the health points decrease.
There are different rock spawning phases depending on how far the player has advanced.
A detailed explanation of the rock physics can be found here: Physics.
Terrain
During the game, the player has to climb over a mountain terrain.
A detailed explanation of the terrain generation can be found here: Terrain
Game score
The further the player progresses in the game without being killed, the higher the score achieved. The horizontal as well as the vertical distance is displayed.