Search found 1989 matches

by pgimeno
Wed May 25, 2016 1:36 pm
Forum: General
Topic: drawing rectangle of a specified width with round borders inside of it
Replies: 7
Views: 2129

Re: drawing rectangle of a specified width with round borders inside of it

It "blurs" the line because it can't paint half a pixel. A vertical line with a thickness of 1 px extends 0.5 px to the left and 0.5 px to the right. If the line thickness is odd and the line goes along pixel edges, then it affects half the left pixel and half the right pixel: http://www.formauri.es...
by pgimeno
Wed May 25, 2016 11:20 am
Forum: Support and Development
Topic: AI in love.physics help
Replies: 4
Views: 841

Re: AI in love.physics help

Thanks a lot, pgimeno. This is what I was trying to achieve. Glad it helped! I couldn't understand it, but with what you did here I guess you solved the problem you wrote about in the post. Unfortunately, no. The code posted above takes infinite time to reach the destination; the blog post is about...
by pgimeno
Tue May 24, 2016 11:18 am
Forum: General
Topic: drawing rectangle of a specified width with round borders inside of it
Replies: 7
Views: 2129

Re: drawing rectangle of a specified width with round borders inside of it

the problem with this code is that visually it seems ok but the box size changed because of the borders, which are drawn outside of the first rectangle (well half inside and half outside). You can do basic math to shift the border drawing to the correct positions (adding border_width / 2 to the coo...
by pgimeno
Tue May 24, 2016 10:38 am
Forum: Support and Development
Topic: Change Sprite Inside a Table
Replies: 2
Views: 634

Re: Change Sprite Inside a Table

If you want them to turn blue, you don't have to remove them from the table, you have to set the img to blue. Just change table.remove(yellow,c) to yellow.img = blueImg But judging by the video, it seems that you want them to be deleted if they are yellow, and turned to yellow if they are blue: if y...
by pgimeno
Mon May 23, 2016 2:58 am
Forum: Support and Development
Topic: AI in love.physics help
Replies: 4
Views: 841

Re: AI in love.physics help

If you want a function to move a body to a point, here's an example. This one is a simple version that just applies force and damping. It should be possible to make a better one that stops right at the endpoint rather than approaching it asymptotically, like this one does, but that would be quite mo...
by pgimeno
Sun May 22, 2016 12:27 am
Forum: Libraries and Tools
Topic: [library] Artal, work directly with .PSD files.
Replies: 11
Views: 2565

Re: [library] Artal, work directly with .PSD files.

but you really should have unix line endings if you put it in a git repo. Having a proper .gitattributes, and the file normalized to LF line endings in the repo, is the way to go. That enables everyone to retrieve the text files with the line endings adapted to their system. https://git-scm.com/doc...
by pgimeno
Thu May 19, 2016 9:30 pm
Forum: Games and Creations
Topic: [WIP]EntroPipes [PC/Android]
Replies: 1
Views: 626

Re: [WIP]EntroPipes [PC/Android]

Cool. 4x4: 58730. 8x6: 1480.
by pgimeno
Thu May 19, 2016 12:33 am
Forum: Games and Creations
Topic: [WIP]BeatFever Mania ~ osu! Engine reimplementation
Replies: 60
Views: 12114

Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation

I've seen no special stuttering. Does it freeze your mouse too when it stutters? If so, it may be a graphics card issue.
by pgimeno
Wed May 18, 2016 11:02 pm
Forum: Games and Creations
Topic: AudioTest
Replies: 7
Views: 1632

Re: AudioTest

Lovely player! Good job.

It does not leak memory, it just seems to cache everything. Going back doesn't increase memory usage.
by pgimeno
Wed May 18, 2016 10:59 pm
Forum: Libraries and Tools
Topic: CamSys
Replies: 4
Views: 1158

Re: CamSys

Nice demo! (once I locally fixed the case problem)

It doesn't appear to be in use, but...

Code: Select all

function dis(x1, y1, x2, y2) return ((x2-x1)^2+(y2-y1)^2)*0.5 end
Why *0.5? Is that supposed to be ^0.5? (or even better, math.sqrt(...) and take out the *0.5)