Search found 155 matches

by szensk
Wed Aug 28, 2013 4:55 am
Forum: Support and Development
Topic: Window Icon Help
Replies: 10
Views: 3668

Re: Window Icon Help

I'd just use reshacker...
by szensk
Wed Aug 28, 2013 12:35 am
Forum: General
Topic: MoonScript & love
Replies: 35
Views: 27247

Re: MoonScript & love

moonc -w Watch a directory and output Lua code. It just works™. Moonscript 0.2.4 has fixed a number of quirks with the language itself. It's quite nice as a terse & higher-level Lua. Compiler errors could be more specific. ie, this will do exactly what you expect: color = {128, 46, 222} radius ...
by szensk
Tue Aug 27, 2013 8:55 pm
Forum: Support and Development
Topic: Executing a String as a Function?
Replies: 3
Views: 1233

Re: Executing a String as a Function?

Evaluating strings is the last thing you should do. It's slow. Lua must compile the string to bytecode. This is much slower than if you knew the name of the function as micha said above. It simply becomes a global look up followed by a function call. Definitely don't do loadstring/dofile in a loop.
by szensk
Tue Aug 27, 2013 7:45 am
Forum: Support and Development
Topic: Get width of text printed using print
Replies: 3
Views: 4766

Re: Get width of text printed using print

font:getWidth usage:

Code: Select all

local font = love.graphics.getFont()
local width =font:getWidth("Foobar and some other words too") --gets the width of the argument in pixels for this font
by szensk
Tue Aug 27, 2013 5:14 am
Forum: Support and Development
Topic: bullet directions
Replies: 4
Views: 1876

Re: bullet directions

you're going to want to store the facing direction of the player, that is: store the last direction that you moved the player then multiply the bullet's velocity vector by the direction vector. this is untested and is just here to show you the intent. local dir = { x = 0, y = 0 } --dont make a table...
by szensk
Tue Aug 27, 2013 4:50 am
Forum: General
Topic: A LÖVELY Senior Project
Replies: 5
Views: 1961

Re: A LÖVELY Senior Project

shatterblast wrote:For instance, I normally don't use the "grep" command.
How!? I've only used linux from time to time but | grep is essential for me to find anything. :( imustbedoingitwrong
by szensk
Tue Aug 27, 2013 2:31 am
Forum: General
Topic: The difference between logic and aesthetic (need help PT2)
Replies: 8
Views: 3983

Re: The difference between logic and aesthetic (need help PT

Without code I don't know if I understand your question at all, but love.graphics.draw can take an image as the first argument and the remaining arguments for position, rotation, scale, etc. Something along these lines. local function createPlayer(x, y, img) return { x = x or 0, y = y or 0, img = im...
by szensk
Tue Aug 27, 2013 12:03 am
Forum: Libraries and Tools
Topic: Penetrator (Geometry lib)
Replies: 31
Views: 10599

Re: Penetrator (Geometry lib)

So if I want to use JDK's source I'd had to change my license to GPL ? If so what are the major differences between löve's license and GPL ? Mainly that anything derivative must be licensed under the GPL and the source code must be made available (ie, you can't just give them the Lua bytecode, give...
by szensk
Mon Aug 26, 2013 6:54 am
Forum: Support and Development
Topic: kwnow frequency of songs with Love 2d
Replies: 6
Views: 3483

Re: kwnow frequency of songs with Love 2d

I've seen it done in shaders (WebGL warning) on the fly. Of course, I think getting the audio data as a shader input would be the issue.
by szensk
Mon Aug 26, 2013 4:05 am
Forum: Libraries and Tools
Topic: Penetrator (Geometry lib)
Replies: 31
Views: 10599

Re: Penetrator (Geometry lib)

Found rectangle.java source code, I'm gonna start converting now, anyone who want to help is free to, just pick up the code in the link, convert it to löve and post it here or on GitHub. /* 2 * @(#)Rectangle.java 1.70 04/05/18 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * S...