- My new sounds: Yet another happyish melody thingy soundcloud.com/mijyn/yet-anot… on #SoundCloud 1 month ago
- My new sounds: Death Defying Superjump soundcloud.com/mijyn/death-de… on #SoundCloud 1 month ago
- @TitusHuang uh oh, the hi war is commencing! XD 1 month ago
- @TitusHuang hi! ^^ 1 month ago
- @dannyimusic I liked What My Cutie Mark is Telling Me the best =) But both are great =D 1 month 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…