Jump to content

Tilemap Scaling, needs help(with screenshots :D )


Recommended Posts

Hello guys,

I'm making a plaformer, and I use the tiledmap plugin (https://github.com/englercj/phaser-tiled) to have best performance on mobile(and it works).

There's always a black space below my tilemap :


And when I test it with mobile dimension, it looks like that :

I wish I could fill my canvas full height with my tilemap with any device, without "y-axe scrolling" or black space.

When I try to scale my layer :

var winW = window.innerWidth;
var winH = window.innerHeight;
var height_of_game_in_pixels= 1536; //24tiles*64px

var SCALE = winH / height_of_game_in_pixels; 

map = game.add.tiledmap('mario_niveau_1');

that.game.physics.p2.convertTiledCollisionObjects(map, 'essai1');

layer = map.layers[0];

It's cropping like that...


In addition, How can I scale my objects layer for my collision ?

Tiled view of my layer :


Any ideas ?

Link to comment
Share on other sites


  • Recently Browsing   0 members

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