Datatype & Parser

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

raju4u52
Posts: 31
Joined: 06 Dec 2010, 10:03
Location: Andhra pradesh

Datatype & Parser

Postby raju4u52 » 11 May 2011, 14:12

Hi sir,

Can I know the name of the datatype that the maps are generated and what is the parser we need to use for the modifications.

Thanking You sir.

Regard's
Raju.p
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 13 May 2011, 07:21

The maps are saved as JSON strings.
Paolo Bax
The SmartFoxServer Team
raju4u52
Posts: 31
Joined: 06 Dec 2010, 10:03
Location: Andhra pradesh

thank Q sir

Postby raju4u52 » 14 May 2011, 09:29

Thank Q sir.

give me simple example on the JSON string.
How it works on the maps.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 16 May 2011, 11:48

Take for example the map "osExample1#m1_House1Inside.map".
The map is a JSON object with the following properties:
i is the map id
w and h are the map width and height
bgi is background id in the library
bgh and bgv are the background offset values with respect to the map grid
e means that the map is editable
tiles is an array of tiles; each one is an object like this:

Code: Select all

{"i":"t0","ix":46,"ap":true}

where:
i is the tile id in the library
ix is a progressive index number like in this picture
ap means that the tile is an access point
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 8 guests