OGMO / tileset question


(Nate ) #1

Hey guys! So up until now I have been using really simple 3 different tile stand in art for my current game project. From OGMO to my demo testing, the place holder tiles worked fine, everything lines up with my game grid no problems.

The issue I am having right now is, I have a new tileset from my artist with around 30 tiles for my game. I follow the same steps as I did with the stand in art, the new tileset uses the same dimensions per tile, I build out the maps in OGMO like usual, but when I bring them into the game, the tiles appear two 40 x 40 blocks above the grid.

Not really sure what is going on as I have not changed anything.

Please let me know what you guys think!

Thanks!


(Jacob Albano) #2

We’ll need to see some code in order to be any help at all. Show us where you load the tilemap into your game.


(Nate ) #3

Okay this is in my assets.as class:

[Embed(source = "assets/tileset.png")] public static const TILESHEET: Class;

Then in the level class these are the related lines:

//load tiles
		tiles_layer1 = new Tilemap(assets.TILESHEET, xml.@width, xml.@height, 40, 40);
		tiles_layer1.loadFromString(xml.tiles_layer1);

//set graphic to graphiclist of tilesets, order matters!
		graphic = new Graphiclist(tiles_layer1);

In and around this code I handle the loading of the entites and the grid as well as assign a mask to the grid. All of this worked the only thing different is this new tileset. Could it be the layout of the tileset possibly?

Thanks


(Nate ) #4

As you can see the entities are all working just fine, the tiles, in this image the floating grass, are two blocks above the grid D:


(Nate ) #5

Also just to temporarily fix the issue, I tried taking this line:

tiles_layer1 = new Tilemap(assets.TILESHEET, xml.@width, xml.@height, 40, 40);

And adding/changing this part, xml.@height to, xml.@height + 80

but then it wouldn’t compile. However I then put in - 500 and all the tiles moved… So I am confused.


(Alex Larioza) #6

What does the Ogmo level data look like and how is your tile sheet laid out?


(Nate ) #7

This is the level data:

<tiles_layer1 tileset="demo_master" exportMode="TrimmedCSV">

,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 ,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,1,1,1,1,1,1,1,1,1 ,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,14,14,14,5 ,16,17,18,10,10,10,8,9,9,9,9,9,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3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9</tiles_layer1>

The blank spots are where I removed -1’s and that has nothing to do with the issue, that is how I have been importing my maps with no issues so far.

The tilesheet is 320 x 120 with 40 x 40 tiles


(Nate ) #8

It looks like the level data got chopped up, but it has the respective closing tags


(Nate ) #9

UPDATE:

there may have been something wrong with that map or some minor OGMO related issue, I used the same tileset on a smaller map for the sake of time and everything ran where it should when debugging.