Week 8 Devlog: Basic Player Movement.


BASIC MOVEMENT

The Player in Wraiths Revenge moves using an 8  way movement system, using W A S D to move UP, LEFT, DOWN and RIGHT, and combinations to move in the diagonals, e.g. W and A to move UP to the RIGHT:


The Player can increase speed momentarily with a dash using LEFT SHIFT:

The Wraith has a number of special abilities allowing them to get the drop on their enemies, such as travelling straight through a wall to attack unsuspecting FILTHY PEASANTS on the other side:


Might change this to be an ability that teleports the player forward through the wall instead of just moving through normally, this ability would probably have a cooldown to give those FILTHY PEASANTS a chance :)


SPAWNING OBJECTS

So far the player can spawn:

  • ZOMBIE spawners, which periodically create a ZOMBIE who will attack ADVENTURERS
  • TORCHES, which light up the area
  • BLOCKS, which block the path of ADVENTURERS to the dungeons loot, allowing the player to create pathways for the ADVENTURERS to take, slowing their advance and guiding them into traps and monsters.


IMPLEMENTATION

The Movement uses a simple 8 way movement script that gets the inputs of the movement keys and sets the players velocity based on whatever keys are pressed, the same script changes the variables in the animator to change the players sprite based on the direction they are moving.

Pressing the DASH key multiplies the players speed by a set amount.

For going through walls, the player has a trigger that detects when they are in a wall, when in a wall the players movement speed is lowered.

The spawning of objects has been implemented by first getting the location of the player, and rounding it to the centre of a grid square, a new game object prefab is then created in that location


PEER FEEDBACK

Thanks for the feedback :)

Looks very good so far. You can stack the zombie spawners and torches on top of each other at the moment which can cause some shenanigans.

Will make spawnable items check the space before creating, so they wont stack :)


the movements are awesome! just adding collider will make it perfect. Also, when the player move towards the torch you can give explosion so that it can interact with the player, make the player lives decrease as it is hot when you go near it:)

I think I will implement this for the enemies, so torches will do slight fire damage to ADVENTURERS who get too close.


Camera could probably be smoothed a little when changing direction as well. It can be a little jerky at times especially while dashing. Though now that I think about it the slight jerkyness could be good because as the game gets more intense I imagine the player will be dashing around trying to keep on top of things which would make it feel more frantic.

Will test out some different camera movement settings to find what works best.


Yeah super fun, just me but might be nice to have some like sliding rather than like moving then stopping instantly, like you move a little then the wriath doesnt stop moving straight away, since he/she/it is a wriath

Will experiment with Inertia so the player moves a little moving, for sick dungeon drifting

Files

Builds.zip Play in browser
Sep 08, 2021

Leave a comment

Log in with itch.io to leave a comment.