Search found 1495 matches

by pgimeno
Fri Dec 04, 2015 9:51 pm
Forum: Support and Development
Topic: Negative color
Replies: 4
Views: 1087

Re: Negative color

Maybe something like this helps? love.graphics.setBlendMode('subtractive') Edit: Hm, maybe not. A shader and a canvas is probably the way to go. Stay tuned. Edit2: Here we go: local img, canvas, shader local lg = love.graphics function love.load() canvas = lg.newCanvas() img = lg.newImage("image1.jp...
by pgimeno
Fri Dec 04, 2015 9:40 pm
Forum: Support and Development
Topic: String split while ignoring delimiters inside quotes?
Replies: 16
Views: 2274

Re: String split while ignoring delimiters inside quotes?

My implementation of the original request with a simple two-state FSM: -- By Pedro Gimeno, donated to the public domain function csv2seq(s) local res = {} local start = 1 local inquotes = false local c = '.' for i = 1, #s do c = s:sub(i, i) if inquotes then if c == '"' then inquotes = false end else...
by pgimeno
Fri Dec 04, 2015 7:01 am
Forum: Libraries and Tools
Topic: Gspöt - retained GUI lib
Replies: 124
Views: 28282

Re: Gspöt - retained GUI lib

bobbyjones wrote:Did you post a link to your github?
I think I forgot :oops: Sorry.

https://github.com/pgimeno/Gspot
by pgimeno
Fri Dec 04, 2015 1:18 am
Forum: Libraries and Tools
Topic: Gspöt - retained GUI lib
Replies: 124
Views: 28282

Re: Gspöt - retained GUI lib

Done. I've submitted my commits too, but I suspect they overlap with your changes. My changes keep LÖVE 0.9.1 compatibility so that Debian Stable users can also benefit from the library (and possibly 0.9.0, but I didn't try). I've based it on the original repo, and merged in SiENcE's changes. Unfort...
by pgimeno
Thu Dec 03, 2015 3:53 pm
Forum: Libraries and Tools
Topic: Gspöt - retained GUI lib
Replies: 124
Views: 28282

Re: Gspöt - retained GUI lib

I've got UTF-8 and imagemode working locally and could submit patches. If you're not interested in maintaining it, I am.
by pgimeno
Thu Dec 03, 2015 1:30 am
Forum: Games and Creations
Topic: Eboruushion evolution sim, second attempt
Replies: 2
Views: 684

Re: Eboruushion evolution sim, second attempt

Nice! I made something similar to this a long time ago in Pascal with some friends, and more recently reimplemented it in JavaScript. The explanation is in Spanish though. But it allows speciation (try random seed 4 to watch two species arise, the "light seekers" and the "straight walkers"). Evoluti...
by pgimeno
Wed Dec 02, 2015 10:54 pm
Forum: Support and Development
Topic: Symbolic Links
Replies: 4
Views: 549

Re: Symbolic Links

Thanks. Since it's an option controlled by the programmer, I take it that it's a safety, rather than a security, measure (as in protecting programmers against themselves, rather than protecting users against potentially malicious software). The use of 'security' in the wording of that report confuse...
by pgimeno
Wed Dec 02, 2015 9:50 pm
Forum: Support and Development
Topic: Symbolic Links
Replies: 4
Views: 549

Symbolic Links

I'm trying to use symbolic links under Linux to avoid duplicating entire trees with libraries, or to make quick workarounds for case sensitivity problems in some love programs. But they are behaving weird. Say we have an empty init.lua in directory 'lib', and a main.lua that requires 'Lib', and then...
by pgimeno
Tue Dec 01, 2015 10:46 pm
Forum: General
Topic: Code Doodles!
Replies: 154
Views: 55416

Re: Code Doodles!

I love this thread! I already posted in the support forum a program that qualifies, but since it's not very long I'll repost it with the fix applied: lg = love.graphics lp = love.physics le = love.event lma = love.math local world local shapes local function newShape(n, x, y, r, ang) local pts = {} ...
by pgimeno
Tue Dec 01, 2015 6:00 pm
Forum: Support and Development
Topic: love.graphics.print resets itself
Replies: 5
Views: 720

Re: love.graphics.print resets itself

Both print and printf will set themselves exactly once. So calling print and printf beforehand should do the trick. Ahh, I see the problem now. This works: love.graphics.print("") local orig_print = love.graphics.print function love.graphics.print(...) print("Entered") orig_print(...) end function ...