DEV_LOG (4, 31/10/22)


Commencing development on my prototype, I began by creating a custom sprite class for the player. This allows me to give the player it’s own properties and methods and will greatly improve the readability of my code.

Custom Player Class

Next, I implemented movement controls for the player; I opted for full mouse control for my movement, having the player track and follow the crosshair.

Player Movement Controls

I then created another sprite class for the ghost, with movement logic that instructs the ghost to move in the direction of the player at all times. Originally I was hoping to implement pathfinding, however decided that would be too much work for the scope of this project.

Ghost Movement Logic

Finally for this week, I decided to create all the logic for spawning the ghosts in waves. I created a function that would spawn a mathematically determined number of ghosts from multiple corners of the level; the function is called by a timer event that is initialized in the game’s create function, looping once per minute.

Wave Spawning Logic

Leave a Reply

Your email address will not be published. Required fields are marked *