Chapter 4. The Adventure Begins
In this chapter, we will create a fun little action adventure game that will build upon our foundational knowledge. We will start with an animated player character that can navigate the world and has a short range melee attack. The game world will consist of multiple rooms, and the player will be able to move from one room to another while keeping all their stats. We will place all the code for the player controls and deal with wall collision in a single script to create a more efficient project.
As can be seen in the next screenshot, the theme of this game is the horrors of high school, and there will be three enemies in the world with basic artificial intelligence: a Ghost Librarian, a Brawl, and a Coach. The Ghost Librarian will appear if the player approaches its resting place and will chase the player until it gets too far away, and then return to where it came from. The Brawl will wander through the room on a path, and if it spots the player, it will...