DEV Community

Maiu
Maiu

Posted on

Maiu Online - Browser MMORPG #indiegamedev #babylonjs Ep24 - SAT 2D collision detection

Hello,
I added collisions detection with environment obstacles, to make it happen I used SAT 2D collision detection algorithm.
Player is simple point and obstacles can have collision shapes of circle or rectangles with arbitrary orientation.
Still there are some bugs mostly with calculating collisions response on the edges of the rectangles but it works quite good, for the first iteration it's enough.
Still don't know how I will handle collisions/navigation in the future. I will need something simple with capabilities for integrating with path finding and line of sight algorithms. I need to do some research and think it through.

Next update will be probably about monster system. I want to add walking, chasing, attacking, death and spawning monsters.

Top comments (0)