Sorry for the late-ish post :L. After finish university I immediately began creating a new project, so I’ve done a lot of work for it. I have created object translation to simulate a moving camera, collision detection for the player and blocks which allows the player to smoothly slide along the block, player rotating to the mouse, the player’s gun firing like a machine gun, basic enemy AI (see player, moving towards player, don’t see player, do nothing etc.) and I’ve made a small demo level (a maze).
The few problems I’ve had with the code I’ve manage to fix myself (usually the problem was rushed, messy coding). Here’s a quick list.
The player’s bullet not moving towards the mouse when fired, but the program was messy coding that I couldn’t really follow myself :L. The coding was cleaned up, more functions created and an array holding the vertical and horizontal speeds.
The player ‘getting stuck’ in blocks. This was because the block couldn’t tell which direction the player was coming from, and would stop their speed dead and the player couldn’t move again. I changed the code to detect what direction the player was coming from as well, and then stop the players speed accordingly.
Enemies walking through walls to get the player. This problem was because the enemy couldn’t see the player through a wall, but there was nothing stopping an enemy walking through a wall. So I duplicated the player’s collision detection code for the enemy to fix the problem.