You are browsing as a guest. Sign up (or log in) to start making projects!

7h 7m 59s logged

Unnamed Platformer - Devlog 10

I’m tired 😭

What I did: I ported the rest of my entities over to SAT collision. Every tile that can be collided with now uses SAT. I refactored some of my functions to handle the new logic properly across the board, and got rid of the old standalone AABB collision code for ground tiles. I also decided to make pushable blocks hybrid for simplicity: aside from general environment collisions which use SAT, I didn’t change much of the old AABB code.

I also added an O(1) center/radius projection for circles to fix random micro-stutters, and updated drawdebug() so it stops drawing every vertex and instead renders one dynamic vector targeting the nearest tile vertex. (Circles in SFML are actually 30-sided polygons, so earlier the collision checks were looking at 15 different axes + all those axes were being drawn in the debug overlay.)

Challenges: Thankfully most of the porting to SAT stuff was easy, I only had a couple of minor setbacks here and there.

However, the harder part was getting the circle center-to-vertex collision logic down. I had to find out how to do it + add completely new logic to my function + add checks in my collision code to determine if the shape was a circle + rewrite my drawdebug() code. It took a while and a lot of my sanity but I got it done in the end

AI used, if any: Used AI to help debug the updated circle collision detection system + its separate debug overlay code.

Plans for next time: I’m going to work on rolling physics for real. I hope it goes well 👍

K bye guys

0
5

Comments 0

No comments yet. Be the first!