Search found 2486 matches

by pgimeno
Thu Feb 25, 2021 2:57 am
Forum: Support and Development
Topic: multiple canvases alpha, not working ?
Replies: 6
Views: 494

Re: multiple canvases alpha, not working ?

How to make the yellow part .50 alpha ? You draw to a canvas that you have previously initialized with RGBA=0,0,0,0 (you can clear it with 0,0,0,0 every frame); you use normal blend mode to draw to the canvas, and when you draw the canvas to the screen, you use premultiplied alpha mode. Note that t...
by pgimeno
Thu Feb 25, 2021 2:43 am
Forum: General
Topic: Any idea in implementing steering behaviour
Replies: 19
Views: 1925

Re: Any idea in implementing steering behaviour

The inverse square of the distance is actually 1/d², it's NOT the square root. Since calculating the distance involves a square root, that square root cancels with the square. The result is:

Code: Select all

function inv_sqr_distance(x1, y1, x2, y2)
  return 1/((x2-x1)^2 + (y2-y1)^2)
end
by pgimeno
Sun Feb 21, 2021 9:28 pm
Forum: Support and Development
Topic: Syntax Error
Replies: 3
Views: 357

Re: Syntax Error

The above map.lua works for me, and the error is strange because it is reported at line 1 and on end-of-file. Something weird is going on, but since it works for me, I can't help.
by pgimeno
Sun Feb 21, 2021 9:38 am
Forum: Support and Development
Topic: I need a database - options?
Replies: 3
Views: 313

Re: I need a database - options?

togFox wrote:
Sun Feb 21, 2021 8:06 am
I notice the last update was 5 years ago. That makes me a little nervous.
No reason to be. The library is not Löve-specific, and Lua 5.1 is around for much longer, plus I don't think the SQLite dynamic library will break ABI compatibility any time soon.
by pgimeno
Sun Feb 21, 2021 3:59 am
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (g3d) v1.3 Release
Replies: 91
Views: 102874

Re: Groverburger's 3D Engine (g3d) v1.3 Release

Sounds sensible.
by pgimeno
Sun Feb 21, 2021 3:49 am
Forum: Support and Development
Topic: I need a database - options?
Replies: 3
Views: 313

Re: I need a database - options?

I suggest SQLite. I know of this lightweight driver for SQLite: https://github.com/ColonelThirtyTwo/lsqlite3-ffi Unfortunately it's not 100% complete, but it has worked pretty well for me. Apparently forum member shakesoda has another binding, but I haven't checked it: https://github.com/shakesoda/l...
by pgimeno
Sun Feb 21, 2021 3:43 am
Forum: Support and Development
Topic: Memory leak - Something I'm missing ?
Replies: 8
Views: 507

Re: Memory leak - Something I'm missing ?

Using a spritebatch may cause the graphics driver to do the same thing internally when its contents are modified/added to -> drawn -> modified/added to -> drawn etc. multiple times within a single frame [...] How is "a single frame" defined when the drawing goes to a canvas? Is it still dependent o...
by pgimeno
Sun Feb 21, 2021 3:18 am
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (g3d) v1.3 Release
Replies: 91
Views: 102874

Re: Groverburger's 3D Engine (g3d) v1.3 Release

May I suggest to call it model:setAxisAngleRotation? I'd expect a true setQuaternionRotation to accept a quaternion, i.e. x,y,z,w (or w,x,y,z, depending on taste) instead of x,y,z,angle. This is a quaternion rotation either way, I just called the "w" component "angle" inside of the function. I can ...
by pgimeno
Sat Feb 20, 2021 5:10 pm
Forum: Support and Development
Topic: Memory leak - Something I'm missing ?
Replies: 8
Views: 507

Re: Memory leak - Something I'm missing ?

Hi pgimeno, Thanks for your answer. So am I understanding this right ? Are you confirming that there is an issue with LÖVE's Canvases ? No, it doesn't look like it has to do with canvases at all. It seems to have to do with autobatching in love.graphics.draw. Removing the canvas from the equation d...
by pgimeno
Sat Feb 20, 2021 2:08 pm
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (g3d) v1.3 Release
Replies: 91
Views: 102874

Re: Groverburger's 3D Engine (g3d) v1.3 Release

- Added basic quaternion rotation support function model:setQuaternionRotation(x,y,z,angle) May I suggest to call it model:setAxisAngleRotation? I'd expect a true setQuaternionRotation to accept a quaternion, i.e. x,y,z,w (or w,x,y,z, depending on taste) instead of x,y,z,angle. As for the implement...