top of page

Intensity System

See the below code as well as the video to the side for context of the scoring script in the game and as it was written.

​

To determine the player's experience and the difficulty of the game, I created a script to increase the intensity of the game as the player progressed.

Intensity Code.png

To the left, is the part of the Spawner script I created, specifically the update function which handled the how the score and the intensity (number of enemies on the screen at once and their spawn rate) was determined each frame.

​

A problem which that occurred was creating a way to determine the intensity of the game that was proportionate the pace the player was playing at. We wanted a player who was scoring higher and going faster to have a harder experience to create a high risk, high reward play style. To do this, I made the difficulty directly proportionate to the score.

I quickly found that the player needed time to enter a flow state and, through testing, found that the number of deaths a player had significantly decreased after the the player had at least 1500 score, so I used this as a marker for which algorithm to use to determine the score. The first algorithm, which only calculates the timer based on the score, being used first as it was more relaxed.

​

I used an array of levels (although a simple integer would have been fine, the array allowed for easier access and implementation for the UI intensity bar) to determine the total number of enemies allowed on screen at once and change the level based on the score.

bottom of page