Log In  

PIco3e is a 3D collision engine written in PICO-8! As far with the alpha release, what it does is...

This was the alpha version, in wireframe. It does work with arbitrary rotated bodies and solve the forces correctly. It took me about 3 weeks of learning & coding, and below is the demo cart I've been using it for proof of work.

Implemented features from reference project qu3e:

  • 3D Oriented Bounding Box (OBB) collision detection and resolution
  • Discrete collision detection
  • Collision test via the Separating Axis Theorem
  • Collision manifold generation via face-to-face method and the sutherland clipping

Token usage: 2873 (with current scene). Thus space is sufficient for some game logic. Unfortunately cpu usage is a bit high, with collision between each 2 bodies takes 5% cpu in 30 fps and doubled in 60 fps. Therefore it's assumed optimal number of bodies is <= 4.

v1.0.0 Known issues:

  1. edge to face collision's force center is biased
  2. body doesn't rotate if supporting force is aligned to mass center
  3. cannot handle multiple body collisions / compound forces

And especially thanks so much to @freds72 without his help I couldn't make this happen.


Aug 13th, 2019. Update with a playable scene and fixed the edge to face collision bug.

Press Z to take a screenshot when the same color faces are aligned to camera.

Cart [#hayonuzoyu-2#] | Code | 2019-09-05 | License: CC4-BY-NC-SA | Embed
9

P#66779 2019-08-19 13:41 ( Edited 2019-10-30 10:18)

For some reason I want to see more of known issue #2 😍

It's giving me some oddly satisfying feels.

P#66781 2019-08-19 15:14
:: a2

Got a bug at some point. Not sure what I did wrong?

P#67095 2019-09-01 11:18 ( Edited 2019-09-01 11:21)
:: bctr

@a2 As of speaking the bug should be gone. If anything similar happened again, please let me know!

P#67219 2019-09-04 07:23 ( Edited 2019-09-05 13:35)
:: zlg

I held left for two seconds, then right for a few seconds, and got a crash in the Web player:

I tried to reproduce it inside PICO-8 itself via SPLORE and can't seem to trigger it. Still, this might be useful. Looks like an edge case.

P#67348 2019-09-07 04:23

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-11-14 18:25 | 0.027s | 4194k | Q:36