- Fixed a typo inside the bounce code
- bump.lua was declaring '_' as a global variable by mistake. Added automated tests to prevent other global vars in the future
- Fix floating-point issue when using coordinates like 100.1298374892437, by adding a 10^-10 delta margin in some operations
- Add and remove less stuff when updating an item
- Add world:getItems and world:countItems
- Bugfix in rect_detectCollision where goalY was not correctly initialized
- The
filter
parameter ofworld:move
,world:check
andworld:project
now has the signaturefilter(item, other)
instead offilter(other)
.
- Renamed
world:move
toworld:update
world:move()
now implements a basic collision-resolution algorithm - no need for the user to do the "complex loops" he needed to use in 2.0.x- Collisions no longer have methods. Instead,
filter
now returns "the type of collision", and "move" handles that internally. The collisions are now "plain tables", which are returned byworld:move
after all the collisions have been dealt with. - Added a new type of collision:
cross
, for when it's good to know that a collision happened but item's trajectory should remain unaltered world:check()
does the same thing asworld:move
, except without callingworld:update
. Useful for planning/studying alternatives without moving things.world:project()
now does more or less whatword:check()
did in 2.0.0. It's a key method for collision resolution.world:getRect
now returns 4 integers instead of a table- Collision detection is handled by the function
rect.detectCollision
. - The
rect
module is now available to the user. - It is possible to add new response types to the world
- Added
world:hasItem(item)
- Massive interface change:
- moved the state to worlds
- Only 1 element can be "moved" at the same time
- Introduced the concept of "Collision methods"