Here is some code:
(x,y) = position of player
(x0,y0)(x1,y1) = line to check
colradius = radius of player
((X1 - X0)*(x - X0) + (Y1 - Y0)*(y - Y0))/((X1 - X0)² + (Y1 - Y0)²)->a
if (0<a and a<1 and ((x - X0 - a*(X1 - X0))² + (y - Y0 - a*(Y1 - Y0)))² <= colradius²)
;react to collision
that should check if the player collides with the given line.
I used a different routine in FPA. No squares/roots
Thanks to Quigibo for this
And this is late (sorry guys) but I've finally
started to work on some documentation
. Tried to format it as BBCode so I could post it here, but finally gave up and sticking to HTML.EDIT:
Not finished yet, by the way. So far all I've done is the spring and door arrays.