Search found 137 matches
- Wed Aug 26, 2020 6:28 am
- Forum: Support and Development
- Topic: Trying to get the real desktop size (in pixels) on macOS and Windows
- Replies: 6
- Views: 6042
Re: Trying to get the real desktop size (in pixels) on macOS and Windows
I don't want to ship any .bat file, and I don't want to require my users to execute .bat files. It's a poor workaround. Since a .bat file is just a list of Windows shell commands, can't you use os.execute(command) to do it from Lua code? (you'll have to check that love.system.getOS() == "Windo...
- Fri Aug 21, 2020 1:28 am
- Forum: Support and Development
- Topic: love.event.poll() and quit event
- Replies: 3
- Views: 2371
Re: love.event.poll() and quit event
The value of a appears to be nil in this event. No idea what it's for...
- Fri Aug 21, 2020 1:19 am
- Forum: Support and Development
- Topic: Memory Profiling?
- Replies: 30
- Views: 23765
Re: Memory Profiling?
You are surely mistaken. C structs allocated with ffi.new definitely show up on my collectgarbage("count")
- Tue Aug 18, 2020 11:59 pm
- Forum: Support and Development
- Topic: Memory Profiling?
- Replies: 30
- Views: 23765
Re: Memory Profiling?
If you are using Lua tables to store game information, like npc.health=100 or map[pos]=tile_id or whatever, you can significantly reduce your memory consumption by using FFI. Here is an article detailing how to do that. Using FFI you can define compact memory structures for values that simply do not...
- Sun Aug 16, 2020 10:35 pm
- Forum: Support and Development
- Topic: Questions around love.run
- Replies: 10
- Views: 3907
Re: Questions around love.run
love.graphics.present says it "will halt the program until ready if necessary " (emphasis mine). Supposing that vsync is on, and love.update + love.draw took more time than the screen's refresh rate allows (that is, we missed the vsync), does love.graphics.present halt the program? (until...
- Fri Aug 14, 2020 6:22 pm
- Forum: Support and Development
- Topic: Questions around love.run
- Replies: 10
- Views: 3907
Re: Order of callbacks?
Ah yes, I think the whole process is outlined on the wiki at love.run . You can, in fact, specify a custom main loop and order of calls. I like that. Tangent question: love.graphics.present says it "will halt the program until ready" (when vsync is on). Does it halt all threads in the prog...
- Thu Aug 13, 2020 9:17 pm
- Forum: Support and Development
- Topic: Questions around love.run
- Replies: 10
- Views: 3907
Questions around love.run
In what order does the engine call the callbacks? update before draw , presumably, but what about mousepressed , focus , etc.? When are these triggered? What if the main thread is in the middle of executing a function? What if the main thread is in the middle of accessing data that is also accessed ...