kodokoto / Eldermyst

A 2.5D wizard-themed platformer, with combo-based spell system
https://kodokoto.github.io/Eldermyst/
4 stars 0 forks source link

Add more enemies #18

Open kodokoto opened 12 months ago

kodokoto commented 12 months ago

More enemies should be added to the game.

It would be good if we think about the design of the creatures, i.e. how they fit into the world. Then we think about the combat mechanics.

Stupid AI

We could start by implementing a "stupid" AI, where enemies are given a path (when building a level) and the enemies go back and forth in that path, without any regard for the player.

Enemies that could work for this would ideally be small magical creatures that are not aggressive, but if the player touches them they will do damage (maybe like some fire blob that bounces around?).

Basic AI

After that, we could upgrade the AI by making the enemy attack the player when the player is within their vision.

This would be easiest to implement for ranged enemies or enemies that can fly. The former would simply stop moving when the player is seen, and fire projectiles at the player (this is already partially implemented). The latter would fly back and forth in some path and when the player is in their vision, the enemy flies towards the player, attacking them via melee. This would be significantly easier as we don't have to code much in terms of terrain for flying towards the player.

Really good AI

Here we would look into implementing some sort of pathfinding algorithm where the AI can find a path towards the player even if they cannot directly see them. That would mean implementing some sort of A* algo, or ideally, just using a package for it (if we are allowed to).

kodokoto commented 12 months ago

NOTE: The basic path defining system could also be the same system described in #17