bump.lua
(and bump.lua simple demo)
I ported the 'bump.lua' collision library & 'bump.lua simple demo' to Picotron.
Due to the considerate way the library was built, this was actually a pretty easy process :)
bump.lua: https://github.com/kikito/bump.lua
bump.lua simple demo: https://github.com/kikito/bump.lua/tree/simpledemo
Please take note of file 'MIT-LICENSE.txt' found inside the cart. This is not CC.
bump.lua
Lua collision-detection library for axis-aligned rectangles. Its main features are:
- bump.lua only does axis-aligned bounding-box (AABB) collisions.
If you need anything more complicated than that (circles, polygons, etc.)
give HardonCollider a look. (I don't believe anyone has ported this to Picotron) - Handles tunnelling - all items are treated as "bullets".
The fact that we only use AABBs allows doing this fast. - Strives to be fast while being economic in memory.
- It's centered on detection, but it also offers some (minimal & basic) collision response.
- Can also return the items that touch a point, a segment or a rectangular zone.
- bump.lua is gameistic instead of realistic.
bump is ideal for:
- Tile-based games, and games where most entities can be represented as axis-aligned rectangles.
- Games which require some physics, but not a full realistic simulation - like a platformer.
- Examples of genres: top-down games (Zelda), shoot 'em ups, fighting games (Street Fighter),
platformers (Super Mario).
bump is not a good match for:
- Games that require polygons for the collision detection.
- Games that require highly realistic simulations of physics - things "stacking up", "rolling over slides", etc.
- Games that require very fast objects colliding realistically against each other (in bump, being gameistic, objects are moved and collided one at a time).
- Simulations where the order in which the collisions are resolved isn't known.
bump.lua simple demo:
This simple demo creates a world populated by random boxes, and allows to move a player around
using the keyboard arrow keys.
The player has constant velocity and can will "slide" over the boxes without penetrating them,
similarly to some classic games such as Zelda.
Pressing TAB will display some debug information.
[Please log in to post a comment]