Search found 3548 matches

by pgimeno
Fri Nov 10, 2023 5:09 pm
Forum: Libraries and Tools
Topic: moonODE (Open Dynamics Engine (ODE)) bindings
Replies: 17
Views: 69140

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

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
by pgimeno
Fri Nov 10, 2023 12:07 am
Forum: Libraries and Tools
Topic: moonODE (Open Dynamics Engine (ODE)) bindings
Replies: 17
Views: 69140

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

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
by pgimeno
Thu Nov 09, 2023 2:51 pm
Forum: Libraries and Tools
Topic: moonODE (Open Dynamics Engine (ODE)) bindings
Replies: 17
Views: 69140

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

kikonen wrote: Thu Nov 09, 2023 2:45 pm I did look into Lovr, and might look into it more later (when getting VR headset and having inspriration to experiment with that).
I believe lovr supports traditional 3D without a VR headset (just so you know; since you already have ODE it seems you're all set anyway)
by pgimeno
Thu Nov 09, 2023 12:30 pm
Forum: Libraries and Tools
Topic: moonODE (Open Dynamics Engine (ODE)) bindings
Replies: 17
Views: 69140

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

The problem with binary libraries is platform support. I don't have a windows machine to check it.

Anyway, lovr has built-in 3D physics (although lovr doesn't work well on my machine for some reason).
by pgimeno
Mon Nov 06, 2023 7:33 am
Forum: Support and Development
Topic: [solved] why does love.filesystem.getInfo return nil on a file that is definitely there?
Replies: 6
Views: 2258

Re: why does love.filesystem.getInfo return nil on a file that is definitely there?

MWTab wrote: Sun Nov 05, 2023 9:21 pm Btw, is there a way to mark this topic solved?
By editing the first post and changing the topic.
by pgimeno
Sun Nov 05, 2023 6:26 pm
Forum: Support and Development
Topic: More filesystem questions
Replies: 5
Views: 6263

Re: More filesystem questions

EAFP (Easer to ask for forgiveness than permission) ;)
by pgimeno
Sun Nov 05, 2023 6:14 pm
Forum: General
Topic: Code Doodles!
Replies: 196
Views: 261867

Re: Code Doodles!

To get back on topic, I was watching a video about an Arkanoid-type game which abuses physics, and found it very interesting, so I tried to reproduce the setup of one of the levels (level 3, minute 4:35 in the video) with Löve using love.physics. The result, while not as polished, was mesmerizing en...
by pgimeno
Sun Oct 29, 2023 9:13 am
Forum: Support and Development
Topic: UTF-8 encoding error when erasing accent characters
Replies: 5
Views: 21818

Re: UTF-8 encoding error when erasing accent characters

Each UTF-8 character above the ASCII range consists of a byte in the range C0-FF followed by one or more bytes in the range 80-BF (the exact range is a bit more restricted but that's irrelevant here). If you don't remove all the bytes from the character, you get an error like the one you're getting....
by pgimeno
Wed Oct 25, 2023 6:14 pm
Forum: General
Topic: Shame I'm leaving the Love2D Reddit
Replies: 7
Views: 32167

Re: Shame I'm leaving the Love2D Reddit

Reddit is cancer. Try twitter I guess. These forums are good. They used to be. Nowadays there are a few unfriendly, unhelpful people that lower the quality of the community support in these forums quite a bit. Thankfully, most issues are already posted in previous threads, so just searching a littl...
by pgimeno
Tue Oct 24, 2023 8:49 pm
Forum: General
Topic: Gravity
Replies: 6
Views: 7297

Re: Gravity

tourgen has a point IF you are going to need more forces to be applied to the object. You first calculate the force due to gravity times mass (i.e. the weight), then add it to all other forces acting on the object, and then obtain the final acceleration of the object by dividing the resulting force ...