Search found 779 matches

by Boolsheet
Tue Oct 15, 2013 8:37 pm
Forum: Support and Development
Topic: Writing binary to a socket..
Replies: 11
Views: 12556

Re: Writing binary to a socket..

In the server's main.lua, you check for 'key' instead of 'k' in love.keypressed. It won't execute the code that way. You also set a timeout of 3000 seconds. That seems as good as infinity. :P Try to do the receiving in the love.update callback in a way so that the LÖVE event handling still takes pla...
by Boolsheet
Tue Oct 15, 2013 7:21 pm
Forum: Support and Development
Topic: Writing binary to a socket..
Replies: 11
Views: 12556

Re: Writing binary to a socket..

LuaSocket blocks by default; there are no timeouts. socket:receive("*a") basically means receive until connection is closed. Use socket:settimeout to set a timeout. You can use 0, but I don't remember if there were any issues with that. You also need to check all 3 return values from the r...
by Boolsheet
Tue Oct 15, 2013 7:35 am
Forum: General
Topic: LDoc build for Windows x64
Replies: 2
Views: 1515

Re: LDoc build for Windows x64

Do you use LDoc to generate the HTML documentation or does your editor or some other tool understand the format?
by Boolsheet
Tue Oct 15, 2013 7:17 am
Forum: Support and Development
Topic: Writing binary to a socket..
Replies: 11
Views: 12556

Re: Writing binary to a socket..

Sockets should always be binary. It's just a matter of how you choose to receive them that will break the binary stream apart. If you call tcp_socket:receive without arguments, it defaults to the "*l" mode which is line mode. socket:send expects strings. Like Plu said, you have to convert ...
by Boolsheet
Thu Oct 10, 2013 4:30 am
Forum: Support and Development
Topic: Another UserData Error...
Replies: 4
Views: 2139

Re: Another UserData Error...

Here's the steps I took to find the issue. The error said line 60 in main.lua. Line 60 is a call to love.graphics.draw. love.graphics.draw only takes a userdata object for the first argument. You pass kick.img there. Looking at the initialization of the kick table we see this. kick = {} kick.img = k...
by Boolsheet
Wed Oct 09, 2013 10:12 pm
Forum: Support and Development
Topic: Lua's math (and canvas in threads)
Replies: 16
Views: 4054

Re: Lua's math

as it is more readabe than a 1 followed by 14 zeros. Yeah but apparently lua can't process it in math.random() :/ Tread very carefully with math.random. There are conversions involved when passing numbers into it and that's probably what you are seeing. I'm guessing it reduces it to a 31-bit intege...
by Boolsheet
Tue Oct 08, 2013 6:07 pm
Forum: Support and Development
Topic: Screenshot Problems
Replies: 4
Views: 1455

Re: Screenshot Problems

[wiki]ImageData:encode[/wiki] automatically writes the file for you, that's why you have to supply the file name. Remove love.filesystem.write.
by Boolsheet
Fri Oct 04, 2013 1:44 pm
Forum: Support and Development
Topic: Can't find .so file & dynamic libraries not enabled
Replies: 14
Views: 7570

Re: Can't find .so file & dynamic libraries not enabled

Yes, just use the love.filesystem functions to write it from the archive to the save directory. Depending on the platform, the dynamic linker may only look in some standard library paths of the system when it tries to resolve the dependencies at runtime. This could give you further errors that you w...
by Boolsheet
Thu Oct 03, 2013 9:33 am
Forum: Support and Development
Topic: Can't find .so file & dynamic libraries not enabled
Replies: 14
Views: 7570

Re: Can't find .so file & dynamic libraries not enabled

Tricky? Lua loads a library and looks for a specific symbol. The rules for its name are described in the Lua Manual under package.loaders . Should be very straightforward. LÖVE adds its own two loaders to to package.loaders. One of them is a binary module loader that only looks in <application speci...
by Boolsheet
Sat Sep 28, 2013 7:10 am
Forum: Support and Development
Topic: love.update() and love.draw()
Replies: 4
Views: 3446

Re: love.update() and love.draw()

You don't have to worry about speed until you really are having problems. The idea behind love.update and love.draw is that you separate the game update logic from the game drawing. If the two are connected too tightly, it might get harder to modify things without breaking the drawing later on. This...