Question about map JSON data

Krentz

Warper
Member
Joined
Feb 27, 2016
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Sorry if this is already posted somewhere, but I'm trying to understand the "data" array in the map JSON files. I have figured out that there are 6 values associated with each tile, but I don't understand which values are in them or why. I'm seeing values like 2048, 2176, etc., in different locations in the array and I don't understand what they mean.


If there is documentation for this or if anybody can explain how this array is laid out, I would greatly appreciate it!
 

ロリ先輩

ロリだけど先輩だよ
Veteran
Joined
Mar 13, 2012
Messages
379
Reaction score
96
Primarily Uses
Take a look at the JS class that consumes the JSON files. While it's okay to think of JSON as a storage format, in the context of JavaScript, it's also an object- hence the name JSON: JavaScript Object Notation.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I recently wrote about it here


Basically, you have numTiles =  width * height


There are 6 layers, each layer with numTiles values


The array is width * height * 6


First 4 layers represent tile ID's, layer 5 is shadows, layer 6 is region.


The tile ID's are internal tile ID's that the tilemap uses to determine which bitmap to draw, and how to draw it (in the case of auto-tiles)


The format for the tile ID's is similar to what you had in VX/Ace, where 0 to 1024 are for pages B-E, and everything beyond that is for autotiles.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top