moonODE (Open Dynamics Engine (ODE)) bindings

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
pgimeno
Party member
Posts: 3550
Joined: Sun Oct 18, 2015 2:58 pm

Re: moonODE (Open Dynamics Engine (ODE)) bindings

Post by pgimeno »

I believe he meant:

Code: Select all

  for k,v in pairs(t) do
can be replaced with:

Code: Select all

  for k,v in next,t do
You can replace them all at once, by overriding the default pairs() function with this one:

Code: Select all

function pairs(t)
  return next, t, nil
end
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: moonODE (Open Dynamics Engine (ODE)) bindings

Post by zorg »

As for when the next version releases (probably both 11.5 and 12.0), soon(tm) maybe, but it's just a mildly informed and moreso assumed hunch :3
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
kikonen
Prole
Posts: 14
Joined: Wed Nov 08, 2023 6:40 pm

Re: moonODE (Open Dynamics Engine (ODE)) bindings

Post by kikonen »

LÖVEly, learned importanat didbit on how Lua and "pairs" actually works in iteration
kikonen
Prole
Posts: 14
Joined: Wed Nov 08, 2023 6:40 pm

Re: moonODE (Open Dynamics Engine (ODE)) bindings

Post by kikonen »

Compiled LÖVE 11.5 from the HEAD of main, doing trials to see if it fixes oddities I've encountered.
User avatar
pgimeno
Party member
Posts: 3550
Joined: Sun Oct 18, 2015 2:58 pm

Re: moonODE (Open Dynamics Engine (ODE)) bindings

Post by pgimeno »

I said:
pgimeno wrote: Fri Nov 10, 2023 12:07 am You can replace them all at once, by overriding the default pairs() function with this one:

Code: Select all

function pairs(t)
  return next, t, nil
end
Alas, that won't work. You need a different name, otherwise it compiles to the same thing.

Code: Select all

function xpairs(t)
  return next, t, nil
end
kikonen
Prole
Posts: 14
Joined: Wed Nov 08, 2023 6:40 pm

Re: moonODE (Open Dynamics Engine (ODE)) bindings

Post by kikonen »

ok, I've had my app running for 20+min now in bacjground, and it's still working fine. With LÖVE 11.4, couldn't run it this long without hitting strange issues (like all objects disappering, random "table" becomes nil/number and such).

Thus with pretty good confidence I state that LÖVE 11.5 is fixing those rather major bugs I encountered

EDIIT: Just to be double sure, compiled love 11.5 also in my VMWare linux guest, and similarly there it seemed to work much more robustly.
kikonen
Prole
Posts: 14
Joined: Wed Nov 08, 2023 6:40 pm

Re: moonODE (Open Dynamics Engine (ODE)) bindings

Post by kikonen »

Just for the sake of reference and completeness, issue what I created in 3DreamEngine for this topic https://github.com/3dreamengine/3DreamEngine/issues/67 (in case anyone else tumbles over this same topic).
josip
Prole
Posts: 21
Joined: Tue Oct 03, 2017 1:55 pm

Re: moonODE (Open Dynamics Engine (ODE)) bindings

Post by josip »

Interesting work, I never heard of moonODE.

I worked on lovr's physics, so to elaborate some points: at this moment lovr also uses ODE library as external dependency. Unlike moonODE, lovr's bindings are opinionated to make physics usage simpler and straightforward. Many ODE features are omitted on purpose, and supported ones are made to be very nice to use from Lua. For example, you can build and render newton's cradle in ~10 lines of code.

Most lovr users are actually quite frustrated with the ODE's simulation. Some colliders have very jerky and unreliable collision responses (cylinders in particular are awful) and other features don't work well. Notably the mesh collider is treated as triangle soup, so it won't detect collisions if body is completely inside the mesh. Also ray casting against terrain is broken in latest version. The community around ODE is getting thin and engine is not actively developed. For all these reasons and some more we are currently moving towards Jolt, the most modern and actively supported open source physics engine.

BTW the desktop (non-VR) support in lovr has improved a LOT over past year. It no longer requires rendering workarounds and there's now built-in support for keyboard and mouse (and lib for game controllers). But it won't work on some old GPUs if their driver doesn't support for Vulkan.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 65 guests