Documents
Systems
Random Level Layout
Description:
This system generates a unique arrangement of specified actors within a single collision box. The actors include:
-
A collectable actor (glowberries)
-
An obstruction actor (trees)
-
A decorative actor (grass)
Explanation:
A random number of actors is determined using the Random Int in Range node. These actors are spawned in a For Loop and added to an array. When the player progresses, all previously spawned actors are destroyed, and the array is cleared to make way for a new layout.

Spawns all actors within a bounding box.

Destroys all specified actors and clears their array.

Spawns all actors within a bounding box.
Enemy Movement
Description:
This system progressively increases the enemy's movement speed as the player survives longer.
Explanation:
The enemy moves forward by 50 units based on a Base Interval float controlled by a Set Timer By Event node. The movement speed increases over time using a formula that factors in the player's survival time, a scaling factor, and the base interval:
New Movement Interval = Base Interval × 1+(SurvivedTime × ScalingFactor)/1
A second Set Timer By Event node is used within the Move Forward function to continuously update the timer.

Initiate TimerByEvent

Enemy moves by units of 50 in speeds based on BaseInterval

Calculate the TimeSurvived with ScalingFactor and the BaseInterval to get a new BaseInterval

Initiate TimerByEvent
Projectiles
Description:
The projectiles are interactive actors that serve as both a tool to repel enemies and a mechanism for progression.
Explanation:
The number of glowberries collected is checked using a Branch node before spawning projectiles. The required amount is subtracted accordingly.
If the projectile's collision overlaps with an enemy, the enemy is delayed and pushed back by 50 units.
Progression to the next stage depends on the player's glowberry count. If the player has more than 0 glowberries, the level transitions without any negative effects. However, if the player has no glowberries, the enemy advances 200 units closer during the level transition.

Checks how many glowberries the players have as they progress to the next level.

If the player progresses to the next level with no glowberries the enemy moves closer by 200 units.

Spawn projectile if player has more than 0.

Checks how many glowberries the players have as they progress to the next level.