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 collissions #48

Closed ItsStolas closed 6 years ago

ItsStolas commented 6 years ago

Hey guys, Sorry I've been gone so long.

I implemented proper collision. So now when we move we first move the collision box for the player to the new position and check if it collides with anything. If it does collide with something we will not move the player.

There are obvious flaws in this, using the players collision box is TEMPORARY, because if we move this box AI will have trouble checking if they're colliding with the player. I suggest maybe we make an entirely new collision box to check for collisions when moving, unless someone else have a better idea?

ItsStolas commented 6 years ago

I think this could also be optimized by only checking for SOLID objects. If an object isn't solid, don't even bother trying to see if we're colliding. In its current state, it checks if we're colliding with every single object.

I'm sure we can later on further improve this by checking only close-by objects etc.

ItsStolas commented 6 years ago

Stewarts is much better than this, going to close this.

ItsStolas commented 6 years ago

Re-opening because after testing Stewarts, this is more fluid.