Search found 3548 matches

by pgimeno
Fri Dec 30, 2016 8:23 pm
Forum: Libraries and Tools
Topic: Lists; a fast way to store objects.
Replies: 36
Views: 20134

Re: Lists; a fast way to store objects.

This sounds like a slippery slope. Depending on assignment order falls into the "don't do it" category. Kind of like the famous i=i++ in C. I wouldn't be surprised if that changed between Lua and LuaJIT, or between versions of Lua or of LuaJIT.
by pgimeno
Thu Dec 29, 2016 1:29 am
Forum: General
Topic: Move an object from a point A to a point B
Replies: 8
Views: 6965

Re: Move an object from a point A to a point B

Well, it would work (when fixed), but it would not be constant speed. The reason I suggested to normalize the velocity is to make the speed constant at any angle. What raidho said also works (taking the angle and then the cosine and sine, except he got them reversed), though that method of normalizi...
by pgimeno
Wed Dec 28, 2016 10:55 pm
Forum: General
Topic: Move an object from a point A to a point B
Replies: 8
Views: 6965

Re: Move an object from a point A to a point B

For constant speed, a tweening library is not the best approach. To use it you'd need to calculate the travel time in order to adjust the speed to make it constant. The most straightforward approach (from my point of view, anyway) is to normalize the vector between the current position and the desti...
by pgimeno
Tue Dec 27, 2016 11:23 pm
Forum: Support and Development
Topic: Rotation of a body around custom point.
Replies: 18
Views: 9771

Re: Rotation of a body around custom point.

Weird, it works for me (under Linux) in 0.8.0, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.10.1 and 0.10.2. It fails in 0.7.2, which doesn't support that form of love.physics.newWorld.

Must be a Windows issue.
by pgimeno
Tue Dec 27, 2016 9:04 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 410819

Re: "Questions that don't deserve their own thread" thread

By changing math.random to love.math.random.
by pgimeno
Tue Dec 27, 2016 7:22 pm
Forum: Support and Development
Topic: Rotation of a body around custom point.
Replies: 18
Views: 9771

Re: Rotation of a body around custom point.

Well, this is [a cropped version of] what I see. Is that not what you see? http://www.formauri.es/personal/pgimeno/temp/turning.gif Edit: And this shows the problem (or the feature) of weld joints. They are too elastic: local world = love.physics.newWorld(0, 50, false) love.physics.setMeter(10) loca...
by pgimeno
Mon Dec 26, 2016 7:28 pm
Forum: Libraries and Tools
Topic: GifCat -- Write GIFs in LOVE.
Replies: 21
Views: 20412

Re: GifCat -- Write GIFs in LOVE.

Check also if you were cross-compiling for 32 bits in a 64 bit machine or vice versa. And I'd try also removing ".dll".
by pgimeno
Mon Dec 26, 2016 7:24 pm
Forum: Libraries and Tools
Topic: 1K Terminal challenge
Replies: 29
Views: 22986

Re: 1K Terminal challenge

There was Space Invaders for the 1K ZX81. It would be a shame if it couldn't be done in LÖVE :nyu:
by pgimeno
Mon Dec 26, 2016 5:58 pm
Forum: Support and Development
Topic: Rotation of a body around custom point.
Replies: 18
Views: 9771

Re: Rotation of a body around custom point.

This is probably already a dead topic, but in case someone finds it looking for a solution, here's one example of the code I had in mind when I was talking about using two fixtures and playing with density. local world = love.physics.newWorld(0, 0, false) love.physics.setMeter(10) local body = love....