[132] Sector Boundary
- Conlan Walker
- Jun 7, 2024
- 1 min read
More collision stuff this week (and I'm not sick!)

Colliding with the environment works with quarter divisions of tiles, known as subtiles.
When checking for collisions, all subtiles that the player is touching are looped through over a specific pattern to check for a collision, whereupon a delta can be applied to the player's position to avoid any relevant obstacle(s).
The whole 'resolving collisions' thing is a WIP, but here's the code I have so far:
Also, I think I technically made this last week, but I didn't show it.
This is a sin, cos, and tan approximation implementation using Bhaskara I's sine approximation formula. I had to do some domain stuff to make it work for all cases though:
(Something real cool is that this doesn't rely on the C runtime library at all, not even headers.)
Comments