Search found 1703 matches

by ivan
Wed Feb 24, 2021 10:57 am
Forum: Libraries and Tools
Topic: love.maker (automated distribution + minification)
Replies: 23
Views: 7622

Re: love.maker (automated distribution + minification)

Ok, I tried building the project and looks like the minifier doesn't like the syntax:

Code: Select all

func{param1=true}.foo
I will try to get that fixed, but it's not my code so it may take a while.
Thanks for the bug report!
by ivan
Thu Feb 18, 2021 5:57 pm
Forum: Support and Development
Topic: How would one check if a square is within a circle?
Replies: 11
Views: 528

Re: How would one check if a square is within a circle?

I haven't looked it up, but ok I'll trust your solution, pgimeno. :)
by ivan
Thu Feb 18, 2021 2:26 pm
Forum: Support and Development
Topic: How would one check if a square is within a circle?
Replies: 11
Views: 528

Re: How would one check if a square is within a circle?

Good catch there pgimeno! The correct way is to add the radius of the circle to each side of the square, and that will reduce the problem to point vs square which is trivial. Then you can compare the distance from the center point of the circle to the edges of the expanded square against the circle'...
by ivan
Thu Feb 18, 2021 7:53 am
Forum: Support and Development
Topic: How would one check if a square is within a circle?
Replies: 11
Views: 528

Re: How would one check if a square is within a circle?

I think your example code is fine. Just check the distance from the turret to the center of the enemy, there is no need to involve squares/rectangles. If you insist then here is the code: https://2dengine.com/?p=intersections#Circle_vs_rectangle To determine if the square is *entirely* inside the ci...
by ivan
Wed Feb 17, 2021 8:26 am
Forum: Libraries and Tools
Topic: love.maker (automated distribution + minification)
Replies: 23
Views: 7622

Re: love.maker (automated distribution + minification)

Borr, can you please post the file which is causing this error.

Code: Select all

local reset = "\x1B[m"
The line above seems to work fine with the latest version on BitBucket.
by ivan
Wed Feb 17, 2021 7:18 am
Forum: Libraries and Tools
Topic: love.maker (automated distribution + minification)
Replies: 23
Views: 7622

Re: love.maker (automated distribution + minification)

Thanks! I have added the \x escape sequence to the minifier.
by ivan
Tue Feb 16, 2021 7:07 am
Forum: General
Topic: how to check for errors in the syntax of scripts for love2d?
Replies: 9
Views: 1783

Re: how to check for errors in the syntax of scripts for love2d?

The whole point of superstrict is that it doesn't allow assigning globals. You don't want to be assigning and changing globals from everywhere because it makes the code hard to follow and debug. If this is not your code and you don't want to check it, just add the following line at the top of the pr...
by ivan
Mon Feb 15, 2021 9:34 am
Forum: General
Topic: how to check for errors in the syntax of scripts for love2d?
Replies: 9
Views: 1783

Re: how to check for errors in the syntax of scripts for love2d?

as instructed and nothing happened. AFTER you require superstrict it will intercept and check every following call to: require/dofile/loadfile/loadstring That's why you have to include superstrict at the beginning of your code, before including any other files. Don't forget to turn it off in produc...
by ivan
Mon Feb 15, 2021 9:27 am
Forum: Libraries and Tools
Topic: love.maker (automated distribution + minification)
Replies: 23
Views: 7622

Re: love.maker (automated distribution + minification)

Thanks, I have pushed an update on Bitbucket and it seems to be working now:
https://bitbucket.org/itraykov/love.maker/

Yes, I am using stravant's library with several modifications:
- vararg issue fixed
- no renaming for globals
- ffi hex numbers ending in ULL
- several other small improvements
by ivan
Sun Feb 14, 2021 9:40 pm
Forum: Libraries and Tools
Topic: love.maker (automated distribution + minification)
Replies: 23
Views: 7622

Re: love.maker (automated distribution + minification)

Looks like the minifier library doesn't support function calls without the parens:

Code: Select all

require "ffi" -- doesn't work
Versus:

Code: Select all

require ("ffi") -- works
Thanks, I will look into this.
Also you could use "dump" instead of "minify" and that's guaranteed to work.