Whatthefuck wrote:Is there any way to load .lua files in threads? I tried doing require "filename", but it errors out in the thread.
You have to require love.filesystem (and any other love modules you might want to use) in the thread's code.
See the [wiki]love.thread[/wiki] wiki page.
Yeah, I figured that out after I posted. :[
Also, are there any other FFI library versions of LOVE stuff like that FFI ImageData library?
It's not (without modifying LÖVE's source), and you generally shouldn't need that kind of micro-optimization for spritebatches. If you're considering it, it might be a sign that you're trying to optimize down a misleading path or you're using the wrong sort of algorithm or tool for your end goal.
slime wrote:It's not (without modifying LÖVE's source), and you generally shouldn't need that kind of micro-optimization for spritebatches. If you're considering it, it might be a sign that you're trying to optimize down a misleading path or you're using the wrong sort of algorithm or tool for your end goal.
Nah, my usage of spritebatches is fine, I was just wondering since every little bit would be of use.
Plu wrote:Honestly, if every little bit matters, you should probably build it in C. It'll earn you a lot more speed than anything else would
With the current speed (930 fps on my end), it's not necessary. x)
The reason why I am asking whether there are any other FFI version libraries, is that even though what I currently have is optimized really nicely, I wouldn't mind further adding something that'd make it even faster.
I have another question, this time I hope it will be more easy to understand. But In LuaSocket I'd like for others to be able to connect to me, because I have my server on my computer. How would I do this? I haven't tested it, but I put my IP... like my actual IP that isn't an IPv4 addess (192.yadda.yaddayadda etc..).
Edit: sorry, let me make clear I put my IP in the [insert udp object here]:setpeername(address, port) as address, the #1 parameter.
192.168.0.0 is the ip address for your router. You can only connect to other computers on the home network with this. You will need to open and/or forward the appropriate port in your router's configuration if you want the internet to be able to connect to your computer. Additionally, you may need to disable the firewall on the same port.
DaedalusYoung wrote:192.168.0.0 is the ip address for your router. You can only connect to other computers on the home network with this. You will need to open and/or forward the appropriate port in your router's configuration if you want the internet to be able to connect to your computer. Additionally, you may need to disable the firewall on the same port.
Okay so, I use the 192.168? yadda yadda? or use the one i've been using... which is the one you get from this site. But I know how to portforward, that's not hard. Is there a recommended port to forward? or shall I just choose my own?