Player Interaction


Basic interactions:

The controls so far are: 

  • WASD for 8 way movement
  • Left click for sword attack (subject to change) and to interact with buttons
  • Right click for ranged attack
  • Space to pick up items

Although this system works I may move the sword attack to space and the item pick up to 'E'. Might also hotkey the inventory button to 'I' if I figure out how.

This game uses the font "Somerset Barnyard Font" by Chequered Ink, found here. I think this font suits the game style very nicely without just being pixel text.

I also created a thumbnail image for the game, which I must admit I'm pretty proud of. 



Testing/Feedback 

A lot of the interactions with enemies were already tested in the previous devlog, but not much feedback on this build so far. 

The main feedback was that the UI is busted. This has since been fixed. The issue was it was not scaling properly with the resolution size, due to the canvas having the wrong setting, which I fixed by setting it to 'scale with resolution' and then set each button/UI element to have specific bounds within the canvas so they scale too. 

One suggestion was to randomise the movement of the bats, which was a really great suggestion and gives the game much more life!

Plans checklist: 

  • Menu / settings screen
  • HOME screen
  • Finish forest UI 
  • Player health/player takes damage
  • Money system
  • Sell screen
  • Finish drawing other sprites (WIP)
  • Chests/bushes in the forest
  • Music
  • Sound effects
  • Visual effects
  • Bats cause blindness when in range of the player
  • Maybe make the shadowman initially move towards the player after it spawns 

Other tasks finished since previous devlog: 

  • Arrows implementation
  • Items / item hover animation/ item pick up
  • Inventory menu (that pauses the movement of enemies)
  • Enemies have a chance to drop items
  • Variable saver that is not destroyed between scenes (DontDestroyOnLoad)


Implementation

The projectiles launced with right click are an arrow prefab with a rigidbody and collider that is instantiated and then given a force to aim towards the mouse. The prefab contains scripts to damage enemies on collision and also destroy itself on collision / after time.

I may add a trail effect to the arrows. maybe. 

The items are one sprite with a second version with a very light coloured outline. This is directly inspired by the items in Graveyard Keeper



(Although clearly my game is a lot less detailed hahaaa)

The player's hitbox collider used for sword attacks is also used to detect items. When picked up with space, they are entered to the player's inventory and show up on the inventory screen


When the inventory menu is opened, it sets a public bool "paused" to true, which stops all enemy movement while the menu is open. Bats can still move in place (just not drift towards the player), but since they will not inflict damage they are not a worry.


Enemies now have a random number calculated on Awake() to determine whether they will drop an item or not. It is currently a 10% chance each but I plan on making the chance variable with future upgrades. 

The "Go HOME" button leads to a second scene, the WIP game selector, where you can choose to go to the forest and fight enemies or go home and spend money on upgrades. I wanted to polish the forest before starting the HOME since I hadn't finished the sprites yet. Most are done now to an extent that I can start making it!


Sprites in my Piskel library 

Files

Build6.zip 8.3 MB
Sep 18, 2021

Leave a comment

Log in with itch.io to leave a comment.