ashish2199 / Aidos

A beginner friendly project with aim of creating our own version of Bomberman.
GNU General Public License v3.0
41 stars 27 forks source link

Fixed collision issue. Still a small bug if movement is sporadic #46

Closed StewartWallace1115 closed 6 years ago

StewartWallace1115 commented 6 years ago

Fixed collision issue. Still a small bug if movement is sporadic.

StewartWallace1115 commented 6 years ago

I messed up the Wall class I fixed in my second commit.

ashish2199 commented 6 years ago

@StewartWallace1115 What you are doing is respawn the player back into the game, when it hits the wall. Right ? If this is correct then I would advice you to make a function for it so that it can be called only when needed. At the present state it is overwriting code for dying of player.

StewartWallace1115 commented 6 years ago

Is the player suppose to die when he hits the wall? I thought he was supposed to "glide" along the wall. I figured the dying animation was test code on whether or not the player dies when he gets near the wall.

My code is suppose to move the character back to the previous position so when the player hits the wall he doesn't get stuck in the wall.

ashish2199 commented 6 years ago

Actually no the player isn't supposed to hit the wall. In the real game he is supposed to not go over the walls. But at the time being I wanted to implement that so that we could see if the collision detection is working correctly and also it will be used in future when we introduce enemies into the game. I wanted see how we are going to implement that first as it will determine how other code will be made.

And for the pull request make it function like respawn(int steps,Direction direction) I will merge it when you do that.