Hay guys. I’ve been wandering if there is any method to rotate a tilemap.Like when i press a button the floor(and everything that tilemap includes) to rotate upside down. Thx.
Rotating tilemaps?
What do you exactly want to do?
To rotate it you’ll have to create your own render function based on the FP original one (If you have some trouble just say exactly what do you want to do [i want code, pls] and i’ll be glad to help/partially make it).
Well i wanted to rotate all the tilemap(any dimension).I wanted to know if there is any actual function for it that i didnt knew about.If not ill begin to think about some method to do that.Ima begin coding the tomoro cuz is a bit late over here already XD
I did something similar with other staff so i can just addapt the code (i have no project to test it properly tho). Tomorrow morning i’ll make the code.
so i have my map code like this:
protected var mapGrid:Grid;
protected var mapWall:Entity;
mapGrid = new Grid(uint(mapXML.@width), uint(mapXML.@height), 16, 16, 0, 0);
mapGrid.loadFromString(String(mapXML.Grid), "", "\n");
//normal tilesmap
if (String(mapXML.TileSet).length > 0)
{
var wallW1:ProgressiveTilemap = new ProgressiveTilemap(E.WORLD1IMG, mapGrid.width, mapGrid.height, 16, 16);
wallW1.loadFromString(mapXML.TileSet, ",", "\n");
mapWall = new Entity(0, 0, wallW1, mapGrid);
add(mapWall);
}
But i dont have any idea how to rotate it sadly
I made a video tutorial on using Ogmo with FlashPunk. The source repository should help you. The trick is to rotate the world, not the tileset.