Skip to content

Loki Tasks

Jonoym edited this page Oct 12, 2021 · 2 revisions

Loki Tasks

Based on the research and concepts created in Loki Characteristics and Behaviour, the tasks that have been chosen to further develop are:

  • Teleportation
  • Shapeshifting between enemies
  • Trailing pillars of fire
  • Explosions of fire

These tasks are subject to change depending on balancing and testing whether more tasks need to be implemented or not. Some tasks out of the few that may not be implemented are the teleportation as this was said to delay gameplay if the boss is to teleport without any reason, both lore or gameplay wise. Other feedback about the types is that the explosion of fire is very similar to the task from the Elf King.

Changes

After implementation of the teleportation to the boss. There was difficulties in the gameplay since the Boss was able to teleport onto areas of lava, making the gameplay feel unnecessarily drawn out as well as much more difficult and tedious when it did occur. The shapeshifting ability has been added such that Loki will transform into one of the basic enemies of the map as well as spawn a few more.

A new task that has been added is that Loki is able to spawn both ranged and melee versions of Loki himself, this adds to the confusion and trickster aspect of the character while also adding pressure to the boss fight since the player needs to kill of the decoys before the map is filled.

The explosion of fire has been replaced by the spawning of enemies. Although the change is not as visually drastic, it adds a similar effect so the player is unable to stack on top of Loki and kill him quickly.

SpawnLokiDecoyTask(Entity target, float cooldownMS)

This task has been used to periodically spawn decoys of Loki, the ranged versions of Loki will have similar tasks such as they will also be able to spawn extra decoys as well as spawn fire pillars at the location of the player. The melee Loki decoy will have the behaviour as the HellEnemyWarrior that has already been implemented into the Hell maps. All of these decoys will have 1 HP and can be killed instantly.

Using

These tasks need to be added to the AITaskComponent that will be added to the Loki NPC. The parameters required for the implementation of this task is the Entity target, the entity that this Entity will target as well as float cooldownMS the cooldown of the task in milliseconds.

AITaskComponent aiComponent = new AITaskComponent()
                          .addTask(new SpawnLokiDecoyTask(target, 8000));

FirePillarTask(Entity target, float cooldownMS, float shootAnimationTimeMS)

The FirePillarTask() makes use of secondary tasks that will aid with the spawning of the indicator of the Fire Pillar spawn and the actual Fire Pillar. This design is required to allow for a brief window of time where the player is able to interact to the attack without taking damage instantly.

Periodically, the Entity with the task will periodically spawn the weapon entity FirePillarBase which will wait a delay of 200ms then spawn the FirePillar which will deal damage on contact with the player.

Using

The Entity target is the Entity that this enemy will target, the second parameter cooldownMS, is the cooldown between the spawning of the pillars in milliseconds and the third is the animation time of the attack in milliseconds.

AITaskComponent aiComponent = new AITaskComponent()
                          .addTask(new FirePillarTask(target, 800, 150));

SpawnDecoysTask(Entity target)

This task will allow for the spawning of 4 Hell Warriors surrounding the Loki enemy as well as the transformation of Loki into a matching enemy. This transformation will be triggered once Loki has passed a Health threshold and he will return back after taking enough damage.

Using

The parameters for this tasks is the Entity target which will be the player. This is used as a parameter to provide the enemy entities a target Entity to follow and attack.

AITaskComponent aiComponent = new AITaskComponent()
                          .addTask(new SpawnDecoysTask(target));

Table of Contents

Home

Design Document

Design Document

Design Document

Game Engine

Getting Started

Entities and Components

Item Drops from Entities

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Map Generation

Concurrency & Threading

Settings

Troubleshooting

MacOS Setup Guide

Clone this wiki locally