Sprites move in sub pixel-grid increments.
That immediately destroys the retro feeling for me.
That immediately destroys the retro feeling for me.
I think in that scenario though you ought to create your own "off-screen canvas" to render your sprites/drawing/text to. Then when you have completed the render/loop, draw from your offscreen canvas's context to the browser canvas's context.
As another replied, you can probably change the scaling attribute (turn off imageSmoothingQuality) to get what you want.
I received a pull request that adds pixelated rendering to the game canvas: https://github.com/susam/invaders/pull/4
I have merged it now. Thank you, everyone, for the discussion regarding retro-style rendering on this thread.