Scaling tiles....... How?


(John Andersson) #1

Okay, so I’ve made some changes to the way I make maps. Previously, every tile was 120 x 120, but that took up a lot of memory (the tilesets).

So now they are 16 x 16, and I want to scale them up to 128 x 128.

I am using tiled map editor, and in that program the maps are made with 16x16 tiles, I want to scale the map during import in flashpunk.

I have embedded the tileset used, but how do I scale it properly? I have managed to scale the map properly with

_map_Ground = new Tilemap(DUNGEON_1, mapWidth * 128, mapHeight * 128, 128, 128);

But the graphics are still not scaled. I’m guessing I should scale the embedded DUNGEON_1 tileset… But how?


(I'll tell you what I want, what I really really want) #2

How about just some good old

FP.screen.scale = 8;    // 128 / 16  = 8

to zoom that in, and then the camera to follow up what you want to follow?


(John Andersson) #3

I’ve read up that screen scaling is bad for the performance (and in some cases for the visuals)… so that’s unfortunately not an option here


(I'll tell you what I want, what I really really want) #4

I googled this and this is what I’ve found:

hope it’ll help


(John Andersson) #5

thanks for the link!