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 Alistair

Hey,

I have created my game using 8px * 8px tiles and my entities are displayed at 16px * 16px. However my background image looks fine with the zoom of 2 (if set to one the game looks too small), however my entities look very pixelated is there a way I can have the sprite sheet at a larger size but display them at 16px * 16px?

I tried using the method below in my entities draw function which did scale however my image appeared in the middle of screen. Is there a way around this?
                ig.system.context.save();
                ig.system.context.scale( 0.5, 0.5 );
                this.parent();
                ig.system.context.restore();

Any help would be fantastic.

1 decade ago by Graphikos

I'm confused... your background and your spritesheet are drawn at different resolution and you want one to be doubled and the other not? They should be drawn at the same scale to save you all sorts of headache (and improve performance) so you don't have to hack a solution together like context scaling.

Maybe I'm just misunderstanding the issue.

If you really want to scale entities... take a look at this:
http://pointofimpactjs.com/tutorials/view/11/so-you-wanna-scale-individual-entities
Page 1 of 1
« first « previous next › last »