Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

UPDATE 4

Today's update is going to be short. This time around, my aim was to allow the player to interact with other things (i.e. kids and boogeyman). In order for me to do this, I had to decide how i'd like to interact with them.

  • I originally wanted directional movement to serve more than one function, and that's when i keep moving at a direction where i'm block by an object/person i can interact with, it will activate a "use" function.
  • Thinking about it and planning how to achieve made me realize perhaps i can continue with that after the jam, but for this one i feel that a more simpler option would be to press and hold a button to allow player to interact/use

The way I wanted to go about it is that everything i can interact with would have besides a collision test, another box that would trigger a property that would allow for interaction. A trigger box if you will. Implementing this, I did it in two steps. First, let's ensure that my player is unable to pass through these objects.

This should be simple as the I can just re-use the same logic i've used for walls. Next part is to create a new bounding box around it and for debugging purposes, being able to render this.


So as long as the player is detected to be in the trigger box, he/she should be able to press and hold the space bar to use/interact. 


When in interact mode, I have decided to disable any other movement input. While i can already go into interact mode, the main bug/problem i'm having currently is that upon entering into the trigger box and i have not released the movement input, and then hold the action button, once i release, i seem to be teleporting after releasing the action button. My code continues to compute velocity and movement during the action phase. henced once i release the action and i'm still in motion, i'll update the position afterwards. i suspect that this is due to my statekeeping. I'm unable to solve it right now. So my next update will be about fixing this and implementing more on top of this such as kid's sleepiness and the dust mechanics.


Until the next update! See ya!