Search found 1736 matches

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: 4789

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: 20330

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: 20330

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.
by ivan
Sun Feb 14, 2021 8:04 pm
Forum: Libraries and Tools
Topic: love.maker (automated distribution + minification)
Replies: 23
Views: 20330

Re: love.maker (automated distribution + minification)

Good question. Personally I use the command line arguments. You can check these when your game starts in main.lua

Code: Select all

for k,v in pairs(arg) do
  if v == "--build" then
    require("build")
  end
end
Then run your game from the cmd
love mygamefolder --console --build
by ivan
Sun Feb 14, 2021 7:52 pm
Forum: Libraries and Tools
Topic: love.maker (automated distribution + minification)
Replies: 23
Views: 20330

Re: love.maker (automated distribution + minification)

The easiest way is to drop the maker folder in your game folder. love.maker = require("maker.main") local build = love.maker.newBuild() build:ignoreMatch('^/maker') -- ignore the maker itself build:save("dest.love", "supergame v1.0", "minify") You can choose b...
by ivan
Sun Feb 14, 2021 1:20 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 47
Views: 77471

Re: SUPER STRICT for LUA

Another good catch. Thanks again and I have pushed another fix on bitbucket!
Also if you want to have a report of the errors without halting each time you can use: "require("sstrict").panic = false"
by ivan
Sat Feb 13, 2021 11:27 pm
Forum: Support and Development
Topic: [Solved] List of lua functions which are not for cross-platform?
Replies: 7
Views: 5963

Re: [Solved] List of lua functions which are not for cross-platform?

Ok so this is great. Did some testing and it's notecably faster to load bytecode compared to regular Lua or even minified Lua.
by ivan
Sat Feb 13, 2021 9:14 pm
Forum: Support and Development
Topic: [Solved] List of lua functions which are not for cross-platform?
Replies: 7
Views: 5963

Re: List of lua functions which are not for cross-platform?

- string.dump -> you can use it, but i'd only recommend it to be used for the same instance of the project you're running; e.g. copying functions over love.threads... even that is not without caveats; anyway, different OS-es might have löve use different lua(jit) versions so dumped functions might ...
by ivan
Sat Feb 13, 2021 1:11 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 47
Views: 77471

Re: SUPER STRICT for LUA

MrFariator wrote: Sat Jan 16, 2021 11:53 amwhen you have unused or redefined variables, the error would be raised incorrectly for the next line.
This should be fixed after today's update. Would be good if you can confirm!
by ivan
Sat Feb 13, 2021 1:07 pm
Forum: Libraries and Tools
Topic: love.maker (automated distribution + minification)
Replies: 23
Views: 20330

Re: love.maker (cross platform, automated distribution)

Ok. I have some cool news.
love.maker can now minify and string.dump your Lua files so they take up less space and load faster!