Plan for wall pushout (already detecting collision)
-----------------
grab the position from the previous frame oldp, the new position p
loop checking if oldp+((p-oldp)*x) is colliding, where x is a factor
the factor would start at 0.5, if not colliding it adds half the current factor, if its colliding, it would substract half the current factor
and then I'd repeat until I hit a fixed threshold for (p-oldp)*x (one unit, probably)
and if at the end of the loop it's still colliding, I'd just set the position to oldp.
If it works, I'll post another update
Edit: it worked! Wall collision working
http://octavoarte.cl/25d_concept.exe
TODO:
Collision from below (right now it just goes through and lands on top of platforms)
Slopes
Edit2: crashes reported with framerates below 20, loop goes infinite even though it's capped with a counter.... which is strange, will do isolated tests. If "while" is bugged doesn't matter, as behavior won't use events