Tile collision detection with irregular sprites

Viewed 48

I have to detect ground collision and fix it but because of irregular sprites, I have to allow collision in certain states like 'ATTACK' because the height of sprite increases. I have done it to my best but still there are many problems remaining which I think could only be understood if one downloads the project and plays the game himself/herself.

I've been trying so hard from past 2 days to implement tile collision detection. Irregular sprites have made the scenario complex. I have tried every single technique I could think of and could find on the Internet: Detection based on player states Detection based on speed values Detection based on geometry

It seems like a deadlock in this situation and I have given up. Fixing one thing breaks another.

All of the code is connected but I think there are 2 files which would need changes 'player.js & playerStates.js'

Here is the link of project: https://github.com/M-AdilAhmad/Platformer

0 Answers
Related