Search found 211 matches

by Xgoff
Sun Feb 17, 2013 7:21 pm
Forum: General
Topic: How to track table delta (solved?)
Replies: 5
Views: 1765

Re: How to track table delta?

That's a good idea, Robin. Thanks. I ran with it in what's probably not the direction you had in mind, but what do you think of this? -- only downside: won't work with pairs() function makeDeltaTable(t) t = t or {} t.__delta = {} t.__index = function(t,k) return getmetatable(t)[k] end t.__newindex ...
by Xgoff
Sun Feb 17, 2013 5:06 pm
Forum: General
Topic: Any way to build a non-disassemblable executable?
Replies: 27
Views: 11253

Re: Any way to build a non-disassemblable executable?

technically, the copyright you have for all the resources you made yourself (code, art, music, whatever, assuming they aren't derivative works) is going to be far more powerful than any sort of protection you put in your code. of course this means you'd have to put in the effort to enforce these cop...
by Xgoff
Thu Feb 14, 2013 6:00 pm
Forum: Support and Development
Topic: Level editor using SVG files
Replies: 4
Views: 4153

Re: Level editor using SVG files

interesting. how much of svg are you planning to implement? months ago i considered writing a lib that would "compile" an svg document into a sequence of love.graphics functions... i thought svg tiny would be a good starting point until i realized the spec was over 400 pages lol
by Xgoff
Mon Feb 04, 2013 10:18 pm
Forum: Libraries and Tools
Topic: toboolean function
Replies: 6
Views: 3988

Re: toboolean function

my `toboolean` function would simply be function toboolean(o) return not not o end lua already has specific semantics for objects being converted to boolean values, so peeking into the actual value to determine truthiness is dodgy [de]serialization is an exception of course, but i would choose a dif...
by Xgoff
Mon Jan 21, 2013 8:05 pm
Forum: Support and Development
Topic: Transparency and imageData:paste ?
Replies: 2
Views: 1977

Re: Transparency and imageData:paste ?

I need to paste imageData 1 onto another imageData 2, where imageData 1 has transparent parts. Using imageDate2:paste(...) it will replace the part of the image entirely. Instead, I want it to overlay the two (I want it to look the way it looks when using love.graphics.draw() over another love.grap...
by Xgoff
Fri Jan 18, 2013 7:44 pm
Forum: General
Topic: Nil vs False, memory question
Replies: 19
Views: 7841

Re: Nil vs False, memory question

One thing I do remember is that, under normal circumstances, lua will not shrink the memory that's already allocated to a table, so you need to make sure that those empty spaces never get allocated in the first place (as opposed to creating all of them, then running back through and setting them al...
by Xgoff
Mon Jan 14, 2013 4:23 pm
Forum: Support and Development
Topic: Can Love2D display multiple windows?
Replies: 6
Views: 3646

Re: Can Love2D display multiple windows?

Can't really think of a reason one would need this in a game environment anyway. maybe a puzzle game where you have to physically move windows to solve the puzzles (or some weird artsy platformer or something). somebody's probably done this by now i would imagine or even something boring like the a...
by Xgoff
Wed Jan 09, 2013 6:21 am
Forum: Support and Development
Topic: Which is hypothetically faster?
Replies: 9
Views: 2389

Re: Which is hypothetically faster?

function calls are somewhat expensive (especially since the standard vm doesn't inline them), so if something can be done without a function call it will probably be cheaper to do it that way. pure-lua bitwise ops would be a pretty big exception to this, though. obviously this doesn't really apply i...
by Xgoff
Wed Jan 09, 2013 5:25 am
Forum: Support and Development
Topic: upgrade to lua 5.2 already
Replies: 14
Views: 5528

Re: upgrade to lua 5.2 already

Jasoco wrote:So are there drawbacks to switching to LuaJIT instead of Lua 5.2? I love the speed boost LuaJIT gives us.
nope :>
by Xgoff
Thu Dec 06, 2012 1:02 am
Forum: Support and Development
Topic: Building Love2d with Vectors
Replies: 11
Views: 7367

Re: Building Love2d with Vectors

you may want to try luajit again the final release is able to completely eliminate object allocations in some cases. temporary vectors are pretty amenable to this optimization if you're careful. you may not quite reach c++ performance but it should hopefully perform somewhat better at least. but you...