Search found 11 matches

by wilco
Sat Aug 01, 2020 7:15 am
Forum: Support and Development
Topic: Blur on retina resolution
Replies: 2
Views: 2905

Re: Blur on retina resolution

Hi slime thanks for the reply. I figured it out. I mistakenly initiated some assets before onload, but in onload I set the default filtering so the filtering was never applied to those assets. It is strange though that it worked on a non retina resolution... For the fonts I also had to set the dpisc...
by wilco
Sun Jul 26, 2020 6:03 pm
Forum: Support and Development
Topic: Blur on retina resolution
Replies: 2
Views: 2905

Blur on retina resolution

I have a mac book and usually run it in a non retina resolution (keeps the GPU nice and cool). Today I turned set it to a retina (high dpi) resolution and suddenly my game was blurred... Setting highdpi doesn't seem to do (solve) anything... any idea how to fix this? Retina: Screenshot 2020-07-26 at...
by wilco
Wed Jul 15, 2020 11:53 am
Forum: Support and Development
Topic: Slow movement in low resolution games
Replies: 3
Views: 2523

Re: Slow movement in low resolution games

Ok seems I figured it out... all though I don't completely understand it yet... Rounding the x and y in draw() DOES work, but x needs to be rounded up while y needs to be rounded down... ¯\_(ツ)_/¯ public draw(): void { const x = math.ceil(this.x); const y = math.floor(this.y); this.animation.draw(x,...
by wilco
Wed Jul 15, 2020 9:26 am
Forum: Support and Development
Topic: Slow movement in low resolution games
Replies: 3
Views: 2523

Slow movement in low resolution games

How would you guys do slow movement in low resolution games (like for example NES games)? For example move the player for 0.5 pixels at a time. I tried just rounding the position inside draw(), but results where jerky (which is kinda logical). I'm now thinking of implementing a system where I just s...
by wilco
Tue Jun 23, 2020 7:30 am
Forum: Support and Development
Topic: Jitter when creating images in love.load
Replies: 13
Views: 7633

Re: Jitter when creating images in love.load

I was implying that it's just not possible to get a smooth scroll and at the same time make it work at any refresh rate. Ok got it :) Basically, if I want 100% smooth scrolling that always works on any refresh rate, I will have more luck with the linear image filtering at the cost of a somewhat blu...
by wilco
Mon Jun 22, 2020 4:57 pm
Forum: Support and Development
Topic: Jitter when creating images in love.load
Replies: 13
Views: 7633

Re: Jitter when creating images in love.load

If you want perfect scrolling with a nearest filter, you have no choice but to scroll at a speed which is an exact multiple of the monitor's refresh rate, and ignore dt. Otherwise there will inevitably be jitter. To achieve this you would probably use a fixed time step? I was thinking about that my...
by wilco
Mon Jun 22, 2020 4:50 pm
Forum: Support and Development
Topic: Jitter when creating images in love.load
Replies: 13
Views: 7633

Re: Jitter when creating images in love.load

You can fix that by instead using: pipeX = pipeX - GROUND_SCROLL_SPEED * dt if (pipeX < -PIPE_WIDTH) then pipeX = pipeX + PIPE_WIDTH + WIDTH end Yes, off course, this makes complete sense now that you say it. If you were really serious about jitter, because you'd like your game to run absolutely ji...
by wilco
Sun Jun 21, 2020 5:39 pm
Forum: Support and Development
Topic: Jitter when creating images in love.load
Replies: 13
Views: 7633

Re: Jitter when creating images in love.load

Ok... kinda feeling stupid right now :? It of course has nothing to do with the love.load() function and everything to do with the love.graphics.setDefaultFilter('nearest', 'nearest') which is not applied retroactively to loaded images. So the jittery example has it's image filtering set to 'nearest...
by wilco
Sun Jun 21, 2020 3:27 pm
Forum: Support and Development
Topic: Jitter when creating images in love.load
Replies: 13
Views: 7633

Re: Jitter when creating images in love.load

hoistbypetard wrote: Sun Jun 21, 2020 12:59 pm Usually i have it populate any background images i need, a table of sprite atlases, quads for those, and a table of sound effects/music. It does all that work during the require() call.
Thanks, this seems to be working fine for me as well.
by wilco
Sun Jun 21, 2020 3:23 pm
Forum: Support and Development
Topic: Jitter when creating images in love.load
Replies: 13
Views: 7633

Re: Jitter when creating images in love.load

Can you really reproduce the issue with these code snippets? Both work the same for me. Yes tried it at least 20 times and it consistently jittered in the "jitter example". It can take some time for the jitter to appear and it can be very subtle and hard to spot. Other times it shows imme...