nkholski / phaser3-es6-webpack

Generic platformer and Phaser 3 bootstrap project
http://metroid.niklasberg.se/phaser3platformer/
703 stars 141 forks source link

Remove css and add pixelArt style. #15

Closed gammafp closed 6 years ago

gammafp commented 6 years ago

I have removed the CSS from the html because I think that with the Phaser configuration tool you can add the pixelperfect.

Before: https://gyazo.com/18d8ca8e7cdd2cc254dc8a918dda24a1

After: https://gyazo.com/ad2343abac7ee8f60b05fc8e27ca5b6d

The map is finished. https://gyazo.com/23004a05cba6e3a8f78be25d3dffb6dc

nkholski commented 6 years ago

Thanks! I had a problem that tiles wasn't rendered properly when setting pixelArt to true. Can you confirm that the issue is gone: https://github.com/photonstorm/phaser/issues/3229? If so I'll absolutely merge your PR. I'd merge a solution where the tile sheet is fixed to solve the issue too, that the border pixels of each tile are repeated in a frame. I'd like to keep the margins of the body to 0 for when we can scale the game all over the window with the scale manager.

gammafp commented 6 years ago

No, it is not gone. It is a problem with the rendering of WEBGL. If you change CANVAS, the problema is fixed.

CANVAS: https://gyazo.com/ffe569496c466a573e4bfa1ae8256fa3

WEBGL: https://gyazo.com/172eb9707e22faff1a723bd1d961d89c

nkholski commented 6 years ago

Ok. I don't want to lock the game to canvas, especially when tint (star) is dependent on WebGL. The best solution for clean pixels is to adapt the tilesheet.

gammafp commented 6 years ago

Yes, the best solution is to adapt the tilesheet. Thank you for your project.