- My new sounds: Bonds of Friendship (WIP 3) soundcloud.com/mijyn/bonds-of… on #SoundCloud 2 days ago
- My new sounds: Happy-ish epic-ish music idea-ish soundcloud.com/mijyn/happy-is… on #SoundCloud 4 days ago
- I just checked out "Star Citizen"... MAN! The graphics!!! And the shaders!!! I have NEVER seen anything as good as that before!! 5 days ago
- Man, the track, with the video .... it's pure brilliant!!! It's soooo amazing! youtu.be/G2n3mNoSITY via @youtube 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…