Jump to content

Scaling tiledmap


mariogarranz
 Share

Recommended Posts

Hi everyone! :)

I have been trying Phaser for a couple of days now, and I must say I really love how easy and fast it is to develop HTML5 games with it. I'm having some trouble due to the lack of documentation, but I guess it's just normal being such a new framework.

 

I have been trying a few things, but can't see any code in the examples to solve my question, nor found any answer searching Google, so I hope any of you can help me with this.

 

I have a tiled map file, and I want to render the map upscaling it by 5x its original tile size. I haven't found any way to do this (it may be even impossible). 

The other question I have is, is there any way to force "pixel perfect" scaling? I mean, if my game is pixel art, when I scale some sprites (in round numbers like 2) I want them to still have the same look as the original, no anti-aliasing at all.

 

 

Thank you in advance for your help, and thanks a lot to the Phaser dev, I really love it :)

Link to comment
Share on other sites

  • 6 months later...

Hi hackenstein! i have sucesfully scale the map.

 

But it seems that dosnt scale the collisions.

 

    
    layer=map.createLayer('wall');    map.setCollisionByExclusion([],true,layer);    layer.scale = {x:4, y:4};        layer.resizeWorld();    layer.debug = true;

The layer collisions are well draw, but the "player" cant move to them, it seems that they arent scaled.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...