Search found 2486 matches
- 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...
- 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
- 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.
- Sun Feb 21, 2021 9:38 am
- Forum: Support and Development
- Topic: I need a database - options?
- Replies: 3
- Views: 313
- 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.
- 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...
- 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...
- 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 ...
- 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...
- 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...