Recommended Posts

Good evening! 

    I am creating web-game using pixi js. I have got blury sprites, shapes, text - everything. How can i fix it? I have macbook pro 2015. I think maybe physical and vitual pixels not assigned properly, feeling like 1 vitual pixel of pixi = 4 or 9 physical pixels. I tried set resolution to 2, 3, but it didn`t solve the problem. How can i fix it?

Share this post


Link to post
Share on other sites
new PIXI.WebGLRenderer(800, 600, {resolution:2, autoResize:true});

autoResize means that pixi will set CSS dimensions to 800x600, while real canvas dimensions will be 1600x1200. You can do that manually: https://github.com/pixijs/pixi.js/blob/dev/src/core/renderers/SystemRenderer.js#L225

All coordinates should be calculated using "renderer.screen" which are CSS coords (0,0,800,600).

Also make sure you understand how Application works. Its mashup class that supposed to be overriden in your game: https://github.com/pixijs/pixi.js/blob/dev/src/core/Application.js 

Share this post


Link to post
Share on other sites

I modified my asset manager (originally for as3 projects) to work with typescript/PIXI and provide different resolution and coordinates for my assets, it's not a public app since not many people are interested in that kinda app but that's one easy way to manage those problems.

Screen Shot 2018-03-08 at 2.30.17 PM.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.