Its is only three weeks until the game need to be finish and we have alot to do. We need to make a bigger map, put in health kits and make the last enemy which is the military enemie. But i think if we work hard we can do it.
This week we made some small changes to the map so it becomes harder so the player cant speedrun it. We did that by creating bigger distance between the tiles so the player had to jump longer. We also put in the platform tile so now we got mostly all the tiles we wanted for the game.
We also added some more enemies to the map by adding them to their list and then write the position in x and y lines so they spawn where they need to stand. For exampel if i wanted a new enemie at the position x 45 and y 45. Then i write a code that add the enemie to its list then i write the position i wanted and the next time i pass the position i set it to it would be there.
I worked on my player class and fixed the attack and walk problems. The player class got three different states. One that is attack. In that state the player will play his attack animaiton by changing the current anime to the new and add a hitbox infront of him by just adding a new rectangel and set it to the position infront of him. Then if he wanted to kill enemies i just wrote that if the attack hitbox intersected the enemie hitbox the enemie will die.
The second state is the regular state. The regular state is the state you are most in. In that state there is all the key inputs code for exampel "if key is down A" this make is the player press A something will happen. In this case the player will walk left because his speed vector will add -8 to his speed so he will start walking left. In the regular state there is also the code to jump to attack state. I do that by writing the code if key is down P change state to attack and after 40 frames you jump back to regualar state.
The last state is the damage state. In that state the code if your hitbox intersect the military hitbox your speed will change to -9 so instead of walking right you will get pushed back to the left and you cant move. I also got a timer in that state so after a few frames it will go back to regular.
The things i hade to fix in the player class was that i got a delay on the attack so the animation would fit the time in that state. But that made so the walk got messed up. So it got delayed too. I fixed that by changing the time you are in the attack state. I did that by changing the frame counter to 40 instead of 60, This made so the animation did not mess up when i jumped back to the regular state.
We talked also what we had to skip in the final game because we had no time to do them. The things we skipped was a boss because then we had to make a whole new class and add all the things a boss need. For exampel an attack pattern and his hitbox. The other things we had to skipp was some small animation to the civilans and other small things.