Search found 650 matches

by airstruck
Wed Mar 29, 2017 2:09 am
Forum: General
Topic: Touch to table
Replies: 3
Views: 1636

Re: Touch to table

Keep in mind you can have multiple return values in Lua. The idiomatic thing to do would probably be x, y = f(), where f returns two values. Or you might prefer f(t) instead, where t is a table, and f sets t.x and t.y to some values.
by airstruck
Wed Mar 29, 2017 2:02 am
Forum: Libraries and Tools
Topic: [Tool/Example] Write/Read to binary Buffer Demo.
Replies: 6
Views: 3016

Re: [Tool/Example] Write/Read to binary Buffer Demo.

I wrote what I consider to be the most efficient method. Do you mean efficient in terms of speed, or memory use, or lines of code? Naturally if there's a more efficient method, then this isn't the most efficient method. Do you have any particular rationale for considering it to be the most efficien...
by airstruck
Tue Mar 28, 2017 5:43 pm
Forum: General
Topic: What code editor do you use ?
Replies: 176
Views: 122525

Re: What code editor do you use ?

That's one way to put it :ehem:
by airstruck
Tue Mar 28, 2017 5:20 pm
Forum: Support and Development
Topic: [Solved]Weld two circle shapes to one anothers edge with conditions
Replies: 9
Views: 2486

Re: Weld two circle shapes to one anothers edge with conditions

Do circles only come in pairs, or can more than two be stuck together? If each circle is only connected to one other circle, you should be able to put the edge of the circle shape at the body's origin, so the joint won't need to change position in relation to the body.
by airstruck
Tue Mar 28, 2017 1:14 pm
Forum: General
Topic: Sharing lua library have resources (image)
Replies: 4
Views: 1479

Re: Sharing lua library have resources (image)

Why not just symlink it into your project? Love follows symlinks by default; zip should also (info-zip does, at least).
by airstruck
Tue Mar 28, 2017 12:59 pm
Forum: Support and Development
Topic: [Solved]Weld two circle shapes to one anothers edge with conditions
Replies: 9
Views: 2486

Re: Weld two circle shapes to one anothers edge with conditions

I'm not getting why you need two weld joints (in the same place?) and also a distance joint (also in the same place?). It seems like a single weld joint would do it, I must be missing something. Anyway, since you can't move a joint's anchor points once it's created, it looks like the most obvious so...
by airstruck
Mon Mar 27, 2017 9:26 pm
Forum: Games and Creations
Topic: Need Critique on Tutorial Series on Making Arkanoid-type Game.
Replies: 68
Views: 15565

Re: Need Critique on Tutorial Series on Making Arkanoid-type Game.

Most ball and paddle games seem to treat collisions as if the paddle were shaped like the top part of a circle, sort of the shape of a taco shell from the side. If the ball hits the left part of the paddle traveling southeast, it might get reflected back toward the northwest; if it hits far over on ...
by airstruck
Mon Mar 27, 2017 7:12 am
Forum: Support and Development
Topic: Need an efficient binary networking example for server & clients.
Replies: 22
Views: 7214

Re: Need an efficient binary networking example for server & clients.

There are several problems with that example. `string.char(2)` isn't "@", there's no character to represent it; "@" is 64. If bits is "10" then bits..bits..bits is "101010" of course, not sure where "?" came from. Passing a string to string.char throws an error. Zorg's suggestion to use a union of s...
by airstruck
Mon Mar 27, 2017 5:51 am
Forum: Support and Development
Topic: Need an efficient binary networking example for server & clients.
Replies: 22
Views: 7214

Re: Need an efficient binary networking example for server & clients.

As for your triplets suggestion it seems less efficient then just converting numbers to raw binary and appending them all to the same string. Sorry, but I honestly have no idea what you mean. What is "converting numbers to raw binary" supposed to entail? You posted a function that returns a string ...
by airstruck
Mon Mar 27, 2017 5:01 am
Forum: Support and Development
Topic: Help in bomberman like game with bump.lua (slide in blocks edges)
Replies: 20
Views: 7872

Re: Help in bomberman like game with bump.lua (slide in blocks edges)

Nice, glad you got it working! Will be interesting to see how the AI looks when it's done.