"Questions that don't deserve their own thread" thread

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Locked
Whatthefuck
Party member
Posts: 106
Joined: Sat Jun 21, 2014 3:45 pm

Re: "Questions that don't deserve their own thread" thread

Post by Whatthefuck »

slime wrote:
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?
User avatar
slime
Solid Snayke
Posts: 3148
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by slime »

Whatthefuck wrote:Also, are there any other FFI library versions of LOVE stuff like that FFI ImageData library?
From the same Github repository: https://github.com/slime73/love-snippet ... ta-ffi.lua
Whatthefuck
Party member
Posts: 106
Joined: Sat Jun 21, 2014 3:45 pm

Re: "Questions that don't deserve their own thread" thread

Post by Whatthefuck »

Interesting. Is it possible to write FFI versions of thr spritebatch library? If it is, what would I need to do?
User avatar
slime
Solid Snayke
Posts: 3148
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by slime »

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.
Whatthefuck
Party member
Posts: 106
Joined: Sat Jun 21, 2014 3:45 pm

Re: "Questions that don't deserve their own thread" thread

Post by Whatthefuck »

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.
User avatar
Plu
Inner party member
Posts: 722
Joined: Fri Mar 15, 2013 9:36 pm

Re: "Questions that don't deserve their own thread" thread

Post by Plu »

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 :)
Whatthefuck
Party member
Posts: 106
Joined: Sat Jun 21, 2014 3:45 pm

Re: "Questions that don't deserve their own thread" thread

Post by Whatthefuck »

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.
User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: "Questions that don't deserve their own thread" thread

Post by Zilarrezko »

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.
User avatar
DaedalusYoung
Party member
Posts: 411
Joined: Sun Jul 14, 2013 8:04 pm

Re: "Questions that don't deserve their own thread" thread

Post by DaedalusYoung »

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.
User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: "Questions that don't deserve their own thread" thread

Post by Zilarrezko »

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?
Locked

Who is online

Users browsing this forum: Google [Bot] and 0 guests