Knight trap is a 2D adventure where the player navigates a dungeon with enemies to stop a ritual. The features of the game is:
  • Killing enemies with either a mele attack or ranged attack
  • Picking up items
  • Using keys to unlock doors
  • Using healing potions or fountains to Heal
  • Checkpoints to respawn at when you die so you don't have to replay the whole game
  • Animated enemies and objects
In this project I was mostly a generalist, doing a little bit of many things.
One thing I worked on was the inventory system that is seen in below image in the top right corner. The player are able to use something that is in the inventory. The items is put in the inventory when picked up in the levels. To pick up an item two things are basically required. It needs some sort of collision box, and the item needs to be removed from the world and added to the inventory. The collision box is just a regular AABB(Axis-Aligned Bounding Box) that is spawned on top of the image. And to add something to the inventory is pretty simple, just check what type of item you have collided with, and raise the number of items you have of that type. And finally remove all traces of the item in the world.

The level is also something I worked on. Firstly we needed to know what was supposed to be a room. To do that we made a flood fill tool that Level designers could run when they exported a level. This created a file for us to read that told us what tiles are walkable, and where the doors are located to the adjacent rooms. This helped us in limiting the player to not walk outside the level, and also to snap the camera to the rooms and darken the area outside of the area.
Some environment objects in the world have animations. What I did to implement this was to specify what an environment object is and match them with their animation and make it loop on top of the sprite.

The level is also something I worked on. Firstly we needed to know what was supposed to be a room. To do that we made a flood fill tool that Level designers could run when they exported a level. This created a file for us to read that told us what tiles are walkable, and where the doors are located to the adjacent rooms. This helped us in limiting the player to not walk outside the level, and also to snap the camera to the rooms and darken the area outside of the area.
Some environment objects in the world have animations. What I did to implement this was to specify what an environment object is and match them with their animation and make it loop on top of the sprite.