v0.1 Update - SolarLune/resolv GitHub Wiki
v0.1 - Major API changes!
-
Resolve() now take x and y speeds, rather than a speed and a boolean for X axis or not.
-
Collision resolution is now defined a bit differently (though it appears to work the same, normally). Essentially, now the Shape is moved to the destination, and then moved backwards until it is no longer colliding. This could allow for tunnelling, but it allows for a smoother experience overall, since it's easier to resolve and doesn't force you to resolve back to the original location of the Shape if that was colliding already.
It also should perform better, since if the movement is valid, it moves there at once, rather than needing to loop through each frame of movement to see if it would work. This should also allow for zips if you wish to include them (a speedrunning mechanic); see 1:05 in this video to see exactly what that might look like.
In accordance with this, I've added a new Teleporting bool to the Collision returned by Resolve() functions. This lets you know if any movement that is offered by resolution might be considered teleporting (defined as moving 50% faster than the speed provided to the resolve functions).
-
Taking out CollisionDirections; they don't really serve any purpose if you know which direction the movement is attempted in and which direction the collision resolution is happening in.
-
Adding tag setting functions to Shapes to make it easier to set tags on them. These take multiples to make it easier to stack tags. Note that currently, there aren't any methods to add or remove tags individually, which could be useful (i.e. to take a tag from something that could deal damage, but doesn't temporarily, and then add it back later if necessary).
-
Adding Space.Contains to see if a Shape exists in a Space.
-
Taking out tag arguments from functions; now you have the ability to filter the Space out using tags beforehand using Space.FilterByTags().
-
Space.IsColliding is now just Space.Colliding(). It now no longer takes a tag argument, and now returns a Space consisting of the Shapes that are colliding with the Shape you provide.
-
Fixed up World1.go to allow you to spawn bouncers with the Up key.
-
Added lowering FPS with the 1 and 2 keys to see resolution clearly.
-
Updated readme.md.
-
Cleaned up some other things.