Search found 74 matches

by RNavega
Sun Nov 29, 2020 8:21 pm
Forum: Support and Development
Topic: How to make smooth camera movement?
Replies: 6
Views: 2958

Re: How to make smooth camera movement?

I think the LERP in the form (a + (b-a)*t) is faster than the form (a*(1-t) + b*t) used in that function because there's one less multiplication op.
by RNavega
Sun Nov 22, 2020 9:54 pm
Forum: Support and Development
Topic: How to know if a object is [top|bottom|left|right] using another object?
Replies: 5
Views: 2699

Re: How to know if a object is [top|bottom|left|right] using another object?

You could have two functions, one for a horizontal comparison and another for vertical comparison. So for example the horizontal function just returns if the object is to the left, center, or right of the reference object.
by RNavega
Mon Nov 02, 2020 5:32 am
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (g3d) v1.3 Release
Replies: 99
Views: 124247

Re: Groverburger's 3D Engine (G3D) New and Improved!

I don't see real-time or baked shadows in there, but I can see fog being used. This article explains how to implement fog with a shader: https://webglfundamentals.org/webgl/lessons/webgl-fog.html The fog factor can be the distance from the vertex to the camera (instead of just the depth of the verte...
by RNavega
Mon Nov 02, 2020 4:03 am
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (g3d) v1.3 Release
Replies: 99
Views: 124247

Re: Groverburger's 3D Engine (G3D) New and Improved!

Oh my bad, i didn't specify what i meant by lighting. What I meant was environmental lighting like shadow and flashlight. Just being realistic here. It might be better for you to try a higher-level engine that already comes with those features, like Unreal or Unity, where you mostly tick the box on...
by RNavega
Thu Oct 29, 2020 4:03 am
Forum: Libraries and Tools
Topic: Fast 2D point-in-polygon test
Replies: 5
Views: 4376

Re: Fast 2D point-in-polygon test

Hi @pgimeno, thanks for the alternative! Do you have a license on that, in case someone drops by from a web search looking for something to use?
by RNavega
Mon Oct 26, 2020 8:06 am
Forum: Libraries and Tools
Topic: Fast 2D point-in-polygon test
Replies: 5
Views: 4376

Fast 2D point-in-polygon test

This is a Lua port of W. Randolph Franklin's method for quickly testing if a point is within a 2D polygon. The polygon must be defined as a sequence of connected points, and can be convex or concave as well as self-intersecting. preview.gif Inline main.lua: --[[ Fast 2D point-in-polygon test. This u...
by RNavega
Wed Oct 14, 2020 8:13 pm
Forum: Support and Development
Topic: Having trouble randomizing simple tilesets
Replies: 5
Views: 2938

Re: Having trouble randomizing simple tilesets

@pgimeno wow, cool stuff! You are (temporarily) setting a metatable to the '_G' global names table, whose '__index' metamethod will get the result of that random number function wherever you place the name "v" in your code. This relies on you never setting any global variable named "v...
by RNavega
Mon Oct 12, 2020 9:51 pm
Forum: Support and Development
Topic: Created .exe, when running .exe error unable to load audio file
Replies: 26
Views: 7552

Re: Created .exe, when running .exe error unable to load audio file

Does the audio system exist at the point where the 'newSource' function gets called? Regarding the timeline of events, is the sound loading at least invoked from within love.load() or later? I would be concerned with using LÖVE's systems/API at any point before love.load() is called. Later than that...
by RNavega
Sat Oct 10, 2020 6:21 pm
Forum: Support and Development
Topic: Created .exe, when running .exe error unable to load audio file
Replies: 26
Views: 7552

Re: Created .exe, when running .exe error unable to load audio file

When creating the exe, my love file does need to be in the love folder with love.exe, right? As far as I know there's two ways of running your LÖVE games: Command-line: love.exe "path/to/folder" (running the main script directly, it should be inside /folder/) love.exe "other/path/to/...
by RNavega
Fri Oct 09, 2020 10:45 pm
Forum: Support and Development
Topic: Created .exe, when running .exe error unable to load audio file
Replies: 26
Views: 7552

Re: Created .exe, when running .exe error unable to load audio file

Are you sure that the .exe + .love fusion is being done properly? If you comment out that font loading, do the other assets load properly?