Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Morhaus

Hello.
Is there any way in Impact to get a smooth sprite movement?
I can't explain it more clearly as I don't speak a very good English, but here's an example of what I'd like to get :
/><br />
As you can see, in the first case, the sprite moves pixel by pixel, which is the default behavior of Impact.<br />
I'd like the movement to be smoother, and the only way to get it is to smooth the sprite during the animation, so that it won't look jerky. <br />
I've already seen this kind of smoothing with a HTML5 game maker, but it seems to be only for games using WebGL. I already installed an Impact plugin that is supposed to enable WebGL, but how am I supposed to activate the smoothing ?<br />
Thanks.			</div>
		</div>
			<div class=

1 decade ago by Arantor

Not knowing what plugin you're using, I have no idea how to help, though I do remember it was mentioned in a game Dominic made, http://impactjs.com/forums/games/x-type-shootemup-with-webgl has more details.

1 decade ago by Morhaus

The plugin page and infos.

Seems like the exact name of the process is "subpixel rendering".

1 decade ago by Morhaus

Here is a demo of subpixel rendering in normal canvas :
http://sebleedelisle.com/demos/bunnybench/bunnies_canvas.html
On Chrome, the bunny automatically snap to pixels, whereas on Firefox they don't.

1 decade ago by Graphikos

The "subpixel rendering" and anti-aliasing and all that is mostly just up to the browsers and canvas 2d. At one point I think Chrome did do sub-pixel rendering but with the GPU acceleration I think that support was dropped. I haven't read up on it lately so I could be wrong.

WebGL does do it so you can do much smoother bitmap drawing if you go that route. Using the webGL drop-in plugin would give you the results you want but doing that would have its limitations. To name a few not all canvas 2d drawing methods are supported and I don't think it will work for mobile devices.

It's all a much debated topic right now with no real standardization for browsers to follow. I'm sure it time it will get sorted out. I hope.

1 decade ago by Graphikos

With that said you could see if GPU acceleration is the reason (at least in chrome) but turning it off. Go to the URL about:flags and uncheck 'GPU Accelerated Canvas 2D'.

1 decade ago by Morhaus

GPU Accelerated C2D was unchecked, but I checked it and re-tested the bunny demo, and it did activate the subpixel rendering (seems like I have to check it to turn it off).

Do I have to hack the draw methods of Impact to use WebGL antialiasing? I'm still not very trained to Impact nor WebGL, so I don't really know where to start.

1 decade ago by Graphikos

I guess it all depends on which build of Chrome you are using. I've toggled it so many times I don't remember what they are using as default.

Anyhow... if you want to use WebGL with Impact its best to use the plugin and it should "just work".
Page 1 of 1
« first « previous next › last »