Search found 19 matches

by benloran
Tue Sep 27, 2011 11:15 pm
Forum: General
Topic: *waves hello* You seem to be a friendly bunch
Replies: 15
Views: 7573

Re: *waves hello* You seem to be a friendly bunch

Hello!

I don't have much to add other than that Colloquy is a very nice (and free) IRC client for Mac. (I also prefer this additional chat style: Succinct)

Good luck!
by benloran
Sat Sep 17, 2011 11:22 pm
Forum: Support and Development
Topic: Can't seem to change image font color -- 0.72
Replies: 4
Views: 3324

Re: Can't seem to change image font color -- 0.72

Well yeah. Right.

I was being lazy, using mathematics symbols to avoid typing english words, but this was a bad context to be lazy in that way. :o:
by benloran
Sat Sep 17, 2011 10:03 pm
Forum: Support and Development
Topic: Can't seem to change image font color -- 0.72
Replies: 4
Views: 3324

Re: Can't seem to change image font color -- 0.72

Is your image font black? Black + any color = black...
by benloran
Mon Sep 12, 2011 4:07 pm
Forum: Support and Development
Topic: problem running an exe of my game on win7 64bit
Replies: 8
Views: 3839

Re: problem running an exe of my game on win7 64bit

slime wrote:love.timer.sleep isn't very accurate on some computers.
I've run into this problem, too. Do you know of a workaround (other than to just not use it)?
by benloran
Fri Sep 09, 2011 10:46 pm
Forum: Support and Development
Topic: Measuring Lua performance
Replies: 7
Views: 6908

Re: Measuring Lua performance

Depending on what you're measuring, you may want to consider disabling the garbage collector completely with collectgarbage('stop') at the beginning. Otherwise, that's exactly how I do it. You could also look into using something like luaProfiler or pepperfish (the latter is much easier to set up).
by benloran
Wed Aug 17, 2011 6:34 am
Forum: Support and Development
Topic: Lua local question
Replies: 33
Views: 16313

Re: Lua local question

Well it does. You just can't use them if you need nil and false to be separate values. In Lua, result = C and A or B is the same as result = C ? A : B in other languages, except for the single situation in which you want to assign a value of false to the result if C is true (in which case you have t...
by benloran
Wed Aug 17, 2011 12:34 am
Forum: Support and Development
Topic: Lua local question
Replies: 33
Views: 16313

Re: Lua local question

Heh, Robin beat me to it. Anyway, the point is that and/or assignments can lead to hard-to-track bugs if you're using them with boolean values. :monocle:
by benloran
Tue Aug 16, 2011 7:23 pm
Forum: Support and Development
Topic: Lua local question
Replies: 33
Views: 16313

Re: Lua local question

slime wrote:

Code: Select all

function my_func(someArg)
	someArg = someArg == nil and someDefaultValue or someArg
end
Unless someDefaultValue is false, in which case the OP's solution is the only way to do it.
by benloran
Tue Aug 16, 2011 4:23 pm
Forum: Support and Development
Topic: Lua local question
Replies: 33
Views: 16313

Re: Lua local question

What about the case where the default value can also be false I think this should still work: function my_func(someArg) someArg = someArg or false end However, an easy bug to run into is the case where someArg is false (assuming someDefaultValue is not false): local someDefaultValue = 20 function m...
by benloran
Sat Aug 13, 2011 7:01 pm
Forum: Support and Development
Topic: Drawing a large number of individual pixels per frame
Replies: 23
Views: 12076

Re: Drawing a large number of individual pixels per frame

It's still less efficient to create a new image each time than to just add the extra data to the same framebuffer Unless I'm misunderstanding you, I don't think you can do this in Love 0.7.2, since framebuffers are cleared automatically each time you draw to them. (Though I believe this is fixed in...