How do I eliminate jerkiness/tearing when fullscreen

Get help using Construct 2

Post » Fri May 06, 2016 11:05 am

It was working OK with the alternate enable/disable platform behavior for me, the only reason it looked bad was the parallax background. Note that game animation you posted uses a fixed background, presumably to avoid the same problem of making scroll aliasing obvious. I don't recall many retro games using an approach like that, unless it's like Sonic where the background is scrolling relatively slowly (and at a variable rate) which makes the effect less noticable.

I'm pretty sure Construct 2 has all the tools you need to do this, it's just difficult to make the right game design choices. If you are deliberately making scrolling low-resolution, something like parallax is going to suddenly make scroll aliasing very obvious, and it's made worse when you blow it up on to modern HD/2K/4K screens, whereas retro games were on an SD screen at best.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Fri May 06, 2016 12:46 pm

@Ashley liquid kids, parasol stars, shovel knight, three wonders, etc.

All retro games with parallax Scrolling were able to consistently move the player 2 pixels per frame and the background half that per frame. Is there proof of concept of C2 doing that please?
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Fri May 06, 2016 5:09 pm

What if you save the previous x/y positions, and then do a comparison everytime you reposition an object? So you'd assign the position to prevX, prevY.. then you move the object. Then you compare- has object traveled further than 1 pixel; if so then reposition.
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Sat May 07, 2016 7:53 am

If at 60pixels/sec it's moving at 2 pixels per frame sometimes then your graphics card isn't really supported by browsers. I probably have the same issue with my blacklisted card, which never can reach 60fps with html5 on browsers even though normal exe games can.

Basically there are three things that could be at fault: C2, the browser engine, your machine.

You've likely played those retro games you mentioned on your machine without issue, your PC is capable so we can rule that out.
Here in this topic we explored many ideas from the C2 side to improve things. Since they're not working it can either be C2 or the browser. We can do tests with C2 vs other html5 engines or straight JavaScript and see if any do it better, and if they do we can find what they do different. However, I don't think C2 is to blame.

Even with a simple js to move a box isn't smooth for me on my machine. So it's the browser to blame I'd say. It's either the js engine or the renderer. As mentioned earlier in this topic I was able to take a JavaScript engine and add enough of it to partially run a c2 html5 export. Even though I ran it though Python and didn't do any optimizations for the renderer (sfml) it was buttery smooth with a very stable framerate at low object counts.
So I revise my statement to say that I think browser's renderer's are to blame.

This isn't a call for a native exporter, but if the renderer could be replaced things might improve. I say that as if it's easy, but it's probably way to hard to do. Especially since browsers can take so long to compile.

It's not possible to make an entire browser, but I do think it's possible to build a basic runtime using a JavaScript engine as a base and some multimedia library with it to handle input, graphics and sound. Of course that leaves out every single other browser feature.

Anyways in the end I lack anything really helpful here.
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

Post » Sat May 07, 2016 7:13 pm

@r0j0hound @ashley so it's decided, c2 or chromium/NW.js can't do precise 1pixel per frame movement. So I should stop trying for retro pixel platformers where single pixels matter. It should either be fake pixel games with ugly subpixeling or really huge resolutions of 600+ pixels where single pixels don't matter, but pixelart is also sort of useless.

Am I assessing this correctly?
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sat May 07, 2016 7:20 pm

I wouldn't say it's useless. Quite the opposite.
It's just bad performance on your system.
Image ImageImage
B
168
S
50
G
163
Posts: 8,224
Reputation: 105,067

Post » Sat May 07, 2016 7:45 pm

@newt can you replicate 1px per frame consistent movement without subpixel movement? May I see it please? It's driving me mad that I can't make it happen.

My comment about pixelart being useless for 600+PX resolutions was misunderstood. I mean pixelart shines in resolutions under 300x240 but those are exactly the resolutions where each pixel matters. By the way my system is quite typical for gamers nowadays, on the high end. I don't understand why shovel knight works pixel perfectly on my system at NES resolution but not construct 2
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sat May 07, 2016 8:44 pm

My system is from 2008, and runs your capx fine.
The thing that gets me is my Amazon Fire tablet runs many of my projects even better than the pc.
Image ImageImage
B
168
S
50
G
163
Posts: 8,224
Reputation: 105,067

Post » Sat May 07, 2016 9:03 pm

Runs my project fine?
So could you record your screen with licecap or something and show me the gif, where my project achieves 1 pixel per frame consistent movement? Because none of the computers or monitors or browsers I've tried do that. Please don't make me feel incompetent, if you have info share it!
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sat May 07, 2016 9:48 pm

I didn't say anything about pixel perfect movement.
Honestly I don't care about it, and I would guess most people won't either.
I do care about choppy movement, and both the background, and player move smoothly here.
There's a point where you have to accept what you can do and go from there.
Image ImageImage
B
168
S
50
G
163
Posts: 8,224
Reputation: 105,067

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], ivanski1983 and 13 guests