Search found 657 matches

by grump
Thu Jan 21, 2021 12:33 am
Forum: Support and Development
Topic: Weird stuff with udp socket and keyboard
Replies: 2
Views: 120

Re: Weird stuff with udp socket and keyboard

Post the actual code. There is not love.keypressed in this code.

A runnable .love file would be helpful too.
by grump
Thu Jan 21, 2021 12:24 am
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (g3d) v1.2 Release
Replies: 76
Views: 82947

Re: Groverburger's 3D Engine (g3d) v1.1 Release

grump, there does appear to be some default depth buffer. Huh, that's weird. There are three ways to enable a depth buffer: in conf.lua, or with a setMode call, or with a depth-enabled Canvas setup. To the best of my knowledge, there is none by default and there shouldn't be one if it wasn't explic...
by grump
Wed Jan 20, 2021 11:49 pm
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (g3d) v1.2 Release
Replies: 76
Views: 82947

Re: Groverburger's 3D Engine (g3d) v1.1 Release

I can't test this because I haven't been able to reproduce this bug on my computers. If not, then fixing this issue outright might be a bit more tricky and may require pulling some weird depth testing and rendering tricks on g3d's initialization, again I'm not quite sure. The issue is that you don'...
by grump
Wed Jan 13, 2021 11:44 am
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 28
Views: 3403

Re: SUPER STRICT for LUA

ivan wrote:
Wed Jan 13, 2021 7:49 am
It's not good design to have empty functions I think.
I'm not 100% sure so this question is open to debate.
I think you're getting a tiny bit overzealous there. An empty function doesn't happen by accident, and treating it like a bug is going one step too far.
by grump
Mon Jan 11, 2021 10:15 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 28
Views: 3403

Re: SUPER STRICT for LUA

I tried using it with a larger project, but it really doesn't like C modules. And C modules exporting globals is probably double the trouble. I'll make if work if you show me a concrete example. I recall you being a Windows guy, so I hope this will suffice because I couldn't test it in Windows. Don...
by grump
Mon Jan 11, 2021 8:21 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 28
Views: 3403

Re: SUPER STRICT for LUA

I have added the love2d require path too. Can you please check that it works on your machine? Nice. package.path and love's require path are working for me now. Note that [[double brackets]] can have any number of [===]equal signs[===] inside them, but it's still considered a double bracket. There ...
by grump
Mon Jan 11, 2021 4:27 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 28
Views: 3403

Re: SUPER STRICT for LUA

I need help/documentation regarding: local foo = 0x1p1 -- undefined variable 'p1' local foo = 12.5i -- undefined variable 'i' p/P is used for binary exponents. It's a Lua 5.2 thing that's also supported in LuaJIT. The i/I suffix is an obscure LuaJIT feature (bottom of the page) to specify the imagi...
by grump
Mon Jan 11, 2021 12:18 am
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 28
Views: 3403

Re: SUPER STRICT for LUA

Gave it a quick test. It doesn't seem to respect package.path correctly. package.path = package.path .. ';?/init.lua' require('sstrict') require('test') -- should end up requiring ./test/init.lua Error: sstrict.lua:656: file not found:test The test module exists and does work correctly without sstri...
by grump
Sat Dec 26, 2020 3:53 pm
Forum: General
Topic: Optimization Stuff
Replies: 40
Views: 17017

Re: Optimization Stuff

I assume you cut down garbage by nil-ing stuff out when you're done with it? "Garbage" is all memory allocations to which no strong reference exist anymore. Niling an object removes one reference, so it will still become garbage. I don't think there is any difference GC-wise between explicitely nil...
by grump
Sat Dec 26, 2020 12:44 pm
Forum: General
Topic: Optimization Stuff
Replies: 40
Views: 17017

Re: Optimization Stuff

You shouldn't leave the garbage collector enabled in a game, at all. You should collectgarbage("stop") and manually collectgarbage() only when appropriate (like level transitions). You should create all the tables you're going to need during initialization, and not create any during gameplay. That'...