Search found 1655 matches

by ivan
Fri Dec 25, 2020 6:56 am
Forum: Support and Development
Topic: Do I need to worry about DTs greater than 1?
Replies: 4
Views: 704

Re: Do I need to worry about DTs greater than 1?

dizzy, if your math any good it should still work even if delta is greater than 1
Your code for approaching a target does not use delta at all.
by ivan
Thu Dec 17, 2020 7:22 am
Forum: Games and Creations
Topic: Spirograph
Replies: 2
Views: 901

Re: Spirograph

Very nice. The drawing "arms" seem to blink on an off on my machine, but the actual graph that is drawn looks cool.
by ivan
Thu Dec 17, 2020 7:14 am
Forum: General
Topic: Optimization Stuff
Replies: 40
Views: 14616

Re: Optimization Stuff

I know that affects CPython because it's reference counted, but it's the first time I hear it in relation to Lua, and I believe it's not reference counted. Do you have any further info about it? I remember reading about this before the days of LuaJIT so I may be completely wrong at this point. From...
by ivan
Wed Dec 16, 2020 7:02 pm
Forum: General
Topic: Optimization Stuff
Replies: 40
Views: 14616

Re: Optimization Stuff

Does the Interpreter always check if an identifer is a global before looking elsewhere for it? If it's not local or on the stack it will be checked against the global table. As long as you don't have hundreds or thousands of extra keys in the global table you'll be fine. Assigning references is not...
by ivan
Wed Dec 09, 2020 8:22 am
Forum: General
Topic: Optimization Stuff
Replies: 40
Views: 14616

Re: Optimization Stuff

do tables get slower the bigger they get, Yes, but it's non-linear so the difference in performance is insignificant in most practical cases. or will that cause a performance hit because it's searching through these huge tables (mostly associative, not numerically indexed) It will be slightly slowe...
by ivan
Sun Dec 06, 2020 3:25 pm
Forum: Support and Development
Topic: Advice on getting two unrelated class objects to interact
Replies: 4
Views: 851

Re: Advice on getting two unrelated class objects to interact

Base class and the Enemy class are encapsulated from one another (am I saying that right?) I think what you mean is "de-coupled" not "encapsulated". Very briefly going over your code I would suggest moving the collisions outside to a separate "world" class. This way one class doesn't need to access...
by ivan
Wed Nov 18, 2020 7:44 pm
Forum: Libraries and Tools
Topic: Steamworks FFI
Replies: 15
Views: 12816

Re: Steamworks FFI

No, don't put it in the game folder, it should be in the love folder.
The game folder should be cross platform and shouldn't contain any binaries.
I'm not on a Mac but it should be under "Contents/Frameworks/" so it depends how you have Love2D setup
by ivan
Wed Nov 18, 2020 2:54 pm
Forum: Libraries and Tools
Topic: Steamworks FFI
Replies: 15
Views: 12816

Re: Steamworks FFI

On Mac, I placed mine in:

Code: Select all

Contents/Frameworks/libsteam_api.dylib
Please confirm if this works for you.
by ivan
Thu Nov 05, 2020 6:24 am
Forum: General
Topic: [ANSWERED] A Question about Functions and Using Their Parameters
Replies: 3
Views: 3265

Re: A Question about Functions and Using Their Parameters

"foo" is already local so there would be no difference.
In fact the second version might be very slightly slower because it allocates more stack space.
As MrFariator mentioned, tables are always references and you can never pass a table as a value.
by ivan
Mon Oct 26, 2020 8:12 pm
Forum: Support and Development
Topic: 2d collision with rotated pictures
Replies: 12
Views: 5333

Re: 2d collision with rotated pictures

dezoitodemaio wrote:
Mon Oct 26, 2020 2:06 pm
Since rectangles are made of lines you could check line to line collision
Additionally one rectangle could be entirely inside another.