- Yay! I just fixed a bug that took me at _least_ 12-20 hours to find. What was it? A simple for-loop incrementation bug. *facehoof* 4 days ago
- I knew that using the "Ponify" extension was going to make some things feel odd for me... and now I feel like an idiot 4 days ago
- RT @DeathStarPR: Awkward.... http://t.co/o1nlqxn5Hp 1 week ago
- When someone calls on me: youtube.com/watch?v=yFDn8a… 1 week ago
- RT @LinuxUpdate: The ISS Has Ditched Windows Entirely--For Linux - Gizmodo sns.mx/Bhl6y9 1 week ago
A listing of random software, tips, tweaks, hacks, and tutorials I made for Ubuntu
libsatcr – A 2D collision detection and response library
December 30, 2012Posted by on
This month, I’ve been working on a top-down adventure horror game with a friend of mine, and one part that I got stuck on was the field of collision detection and response. Since it was an online game written in JS, I tried to use Box2DWeb for the task, but of course, it didn’t work out the way I wanted it to. I’m sure that my problems could have been resolved some way or another, but really, if my only purpose of using a physics engine is for the collision detection and response, why don’t I just take a collision detection and response library? After a bit of googling, I stumbled upon SAT.js. I’ve been really impressed with how minimalist, yet powerful it was. It did the job of collision detection and response without needing to rewrite the whole codebase. So while I was waiting for my friend to do the art, and since C was my favourite programming language, I wrote libsatcr, a port of SAT.js to C. TL;DR version of this paragraph: libsatcr is a port of SAT.js to C.
Since this is my first real library in any language, it has bound to have errors here and there, so please don’t expect it to be by any means perfect. I have not thoroughly tested the library either, I have only estimated that its outputs are correct, but I will do more extensive testing later.
I would really appreciate any kind of constructive criticism, even if it has to do with minor style changes, clarification, spelling/grammar errors, etc…