Search found 1495 matches

by pgimeno
Thu Jan 31, 2019 11:49 am
Forum: Support and Development
Topic: [SOLVED] Doubt LinearVelocity
Replies: 2
Views: 436

Re: Doubt LinearVelocity

I don't understand the issue well. Do you mean that using the controls to "press" against the wall keeps the player from falling? If so, that might be a friction issue. I did this experiment and it worked for me: local lph, lg = love.physics, love.graphics local world = lph.newWorld(0, 400) local bo...
by pgimeno
Wed Jan 30, 2019 11:53 pm
Forum: Support and Development
Topic: Class Best Practices
Replies: 16
Views: 1399

Re: Class Best Practices

Well, before going down that rabbit hole, try to profile. Maybe you can't expect that much of a gain.
by pgimeno
Wed Jan 30, 2019 12:46 am
Forum: General
Topic: Floating Point color
Replies: 15
Views: 874

Re: Floating Point color

Just wait for 11.3 and use colorToBytes (or make your own, or use cindy).
by pgimeno
Tue Jan 29, 2019 5:09 pm
Forum: Support and Development
Topic: Class Best Practices
Replies: 16
Views: 1399

Re: Class Best Practices

When you are saying clearing, are you refering to looping through the list and selling each element to nil? Setting, yes. Also would the speed still be the same if it is just an array with table references and no explicit key? (i.e. {#eA23dc, #dsf234, etc..}) If you mean {table1, table2, ...} then ...
by pgimeno
Tue Jan 29, 2019 3:37 pm
Forum: General
Topic: Floating Point color
Replies: 15
Views: 874

Re: Floating Point color

Here is the problem. The function rnd() will produce a set of fp numbers evenly distributed over the range 0 .. 1. When applied to the 2 bit color field, how do you ensure that each bin will be evenly distributed? Easy, take the floor of multiplying the random number by 4 and you'll get an evenly d...
by pgimeno
Tue Jan 29, 2019 12:25 pm
Forum: General
Topic: Floating Point color
Replies: 15
Views: 874

Re: Floating Point color

My point was that the inclusion of 1 in the fractional range makes sense from a pure mathematical pov, but introduces problems when mapping to real world DA convertors which select between 2^n states. No it doesn't, because internally it's mapped to an integer, and an algorithm similar to the one I...
by pgimeno
Mon Jan 28, 2019 6:57 pm
Forum: Support and Development
Topic: [SOLVED]setDefaultFilter("nearest", "nearest") not working
Replies: 5
Views: 388

Re: setDefaultFilter("nearest", "nearest") not working

Yeah, the filter is a per-image setting. You use setDefaultFilter to set the default that will apply to all images created after you call it.
by pgimeno
Mon Jan 28, 2019 6:42 pm
Forum: General
Topic: Floating Point color
Replies: 15
Views: 874

Re: Floating Point color

In 11.3 we will have love.math.colorToBytes and love.math.colorFromBytes , that will help making things easier. You don't need binary fractions. Normalized 8-bit colour components round-trip when represented with 3 decimal digits and rounded to nearest. There are no ties so it doesn't matter whether...
by pgimeno
Sun Jan 27, 2019 11:51 pm
Forum: Support and Development
Topic: Re scaling and Resolutions
Replies: 6
Views: 631

Re: Re scaling and Resolutions

That's not very specific. love.graphics.scale() does what it's supposed to do, but I'm not sure what you're expecting to get. - If you expect pixelation instead of interpolation, you can set love.graphics.setDefaultFilter("nearest", "nearest"). - If you are trying to reduce images to under 50% of th...