30 Replies
this is awesome! what do you use to render this onto a window?
I'm using sdl bindings for rendering, here's a link to that project https://github.com/Ryul0rd/sdl-bindings
Congrats @Ghostfire The Insatiable, you just advanced to level 18!
Current features of the collision solver:
- Multiple collision features per body
- Multiple contacts per collision
- Position normal constraints
- Velocity normal constraints with elasticity
- Velocity tangent constraints with friction
- Circle, lines, points, (some ray and aabb)
- Contact force caching for faster convergence
- Only discrete right now
i havent pushed the repo yet, I'm waiting on a few things like getting the sdl-bindings to work from a .mojopkg, making sure bodies can get deleted without leaking, etc..
It's meant for games rather than scientific purposes.
The technical name might end up being thermojo, to avoid conflicts with any existing projects name thermo.
That is sick
On my todo list today:
- being able to change the camera pivot
- being able to remove bodies
(and some unrelated things, so hopefully i get to everything)
oh yeah, checking sdl-binding from .mojopkg aswell, to see if anythings change. i heard we might be able to get it working with a different method
Wow, does it support custom gravitation fields yet?
it supports global gravity, but i left off any restrictions, so you can have rotational gravity, and scaling gravity lol.
no skewing
We dont do that around here.
local gravity would be a good thing to get to though
I'm working on my geometric algebra generator right now, but i should probably move on pretty soon so i can get to the other things, removing bodies might take a little refactoring to avoid leaks.
also, it's kinda tied to my game framework right now but it'll get better
I'm onto my last thing for the day which is removing bodies
ok.. i found a bug with my elasticity
but at least bodies can get removed. It's still tied to my game framework, so in this case i just put some logic in their update loop which gives them a life span.
ok one of my goals today was to fix the issues i noticed with elasticity acting a little wierd
im pretty sure i fixed it
but now for elasticity = 1
since that was giving me wierd behaviour before
one of the lines got stuck hehe The boxes are just 4 lines right now
Also, setting mass and inertia to infinity works to make things static bodies, so thats a good sign. But i should still add some flags for doing it proper
one of the primitives i like to support is variable width lines
so I'll probably add that at some point
This is awesome @Ghostfire The Insatiable is the repo where you're building this private at the moment?