Love threads?

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.
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: Love threads?

Post by bmelts »

bartbes' code isn't that weird. Well, it looks kinda weird, but it's actually not that hard to parse:

love.filesystem.newFileData takes two arguments - a string containing the contents of the file, and a string giving a name to said file (and, optionally, a third string letting LÖVE know if the contents are base64-encoded).

So, all the stuff between the double brackets is just what would be the contents of a separate file if bartbes weren't including them inline. The only tricky thing there is he calls format() on the file contents, replacing the instances of %s with some stuff passed at runtime related to the server browser that this code was taken from.

Otherwise, it's all standard thread behavior with message passing, as you described in your (simpler) example.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 7 guests