NAGTeam / Labyrinth-Canvas

0 stars 0 forks source link

Tileset Responsive #2

Open nicokant opened 9 years ago

nicokant commented 9 years ago

we can take inspiration from @mediaqueries, which means that we can create 2 or 3 tileset of different dimensions and on launch we load only a specific tilest according to phone resolution.

in pseudo-code: preload(){ pixelRes=innerWidth/innerHeight; if(pixelRes < littleScreen) load(littleTileset); if(pixelRes>littleScreen & pixelRes<mediumScreen) load(mediumTileset);

ecc...

nicokant commented 9 years ago

An other solution could be.... don't make it responsive!

games should have screen auto scrolling and phaser has it too, so it isn't important if a game map is bigger than the screen. Being all inside the canvas implies that no scroll will be displayed.

All that means that we should not be worried about responsive maps in little screens.. we should be worried about displaying our canvas on biggerrrrr screens (aka Desktops)

Check camera view in Phaser ;)