Search found 575 matches

by grump
Tue Jun 25, 2019 5:11 pm
Forum: Support and Development
Topic: Need help with FFI on 32 vs 64-bit versions of Love2d 11.2
Replies: 1
Views: 119

Re: Need help with FFI on 32 vs 64-bit versions of Love2d 11.2

Have you tried to run it on a "real" 32 bit OS? Maybe it's a pointer size issue. Just guessing though. It's probably not relevant to your problem, but I'm pretty sure the cast from <event> to <event>* is not required. local ffi = require('ffi') ffi.cdef("typedef struct Blah { int i; };") local b = f...
by grump
Thu Jun 20, 2019 12:48 pm
Forum: Support and Development
Topic: A question about music
Replies: 13
Views: 431

Re: A question about music

raidho36 wrote:
Thu Jun 20, 2019 5:50 am
Yeesh, that guy's a grump allright.
Wut? Nah. A grumpy response would have been a link to How To Ask Questions The Smart Way without further comment. Also, please don't assume my gender.
by grump
Wed Jun 19, 2019 6:48 pm
Forum: Support and Development
Topic: A question about music
Replies: 13
Views: 431

Re: A question about music

math.randomseed( os.time() ) math.random(); math.random(); math.random(); math.random(); math.random() lmao I put the code into love_update() and nothing is playing now. This neither works when I have it in a separate .lua file nor in main.lua. This would be the perfect time to post the exact code ...
by grump
Fri Jun 14, 2019 5:40 pm
Forum: General
Topic: Collision Editor not working as expected
Replies: 7
Views: 318

Re: Collision Editor not working as expected

2lostsouls wrote:
Fri Jun 14, 2019 4:50 pm
not anyone is answering and I think it may be because I did not explain this properly. I used the collision editor
One reason for that might be that there's no such thing as a "collision editor" in love.
by grump
Sat Jun 08, 2019 12:11 pm
Forum: Support and Development
Topic: [SOLVED] Dynamically create methods for a class.
Replies: 3
Views: 351

Re: Dynamically create methods for a class.

I'm sorry, I can't help with the middleclass stuff, just a note: This forEach construct for arrays is tempting to implement and looks clean, but be aware that it incurs a performance penalty in most cases. Callbacks like this are slower than loops and iterators in LuaJIT, and creating anonymous func...
by grump
Sun Jun 02, 2019 2:58 pm
Forum: Support and Development
Topic: [SOLVED] getDirectoryItems() and getInfo()
Replies: 9
Views: 1323

Re: [SOLVED] getDirectoryItems() and getInfo()

Finally, i did create a (fully script-based, not a binary file) library that uses LuaJIT's FFI to access a few PhysFS functions directly, and which also edits love.filesystem.mount (and maybe the VFS paths, optionally) to allow read access on your whole computer. (write access is difficult for mult...
by grump
Sun Jun 02, 2019 9:13 am
Forum: Support and Development
Topic: [SOLVED] getDirectoryItems() and getInfo()
Replies: 9
Views: 1323

Re: similar issue with getDirectoryItems() and getInfo()

local sourcepath = love.filesystem.getSource() local sourcefiles = love.filesystem.getDirectoryItems(sourcepath) and local savepath = love.filesystem.getSaveDirectory() local savefiles = love.filesystem.getDirectoryItems(sourcepath) You're passing sourcepath to the second getDirectoryItems call, bu...
by grump
Wed May 29, 2019 5:32 am
Forum: Support and Development
Topic: Filesystem Loading and Writing Questions
Replies: 1
Views: 778

Re: Filesystem Loading and Writing Questions

What's the difference between using love.filesystem.write() and using a File object to write (File:write())? A File object gives you random access to the data, allowing you to seek and read/write arbitrary sized blocks of data at random positions, or to append at the end of the file. You can pass t...
by grump
Sat May 25, 2019 10:55 pm
Forum: General
Topic: TV Effect
Replies: 5
Views: 1003

Re: TV Effect

Example attached