This data is to be a result integer which is a '1' if the shot is to be a hit or a '2' if it is to be a miss.
A method of doing this is to use JSONS (http://www.json.org/)
The JSON is built on two structures:
- A collection of names and Values
- An ordered list of values
Twitter uses JSONS in order to store a users tweets and they can then be accessed by applications
The New Boston offers tutorials on the application side of JSONS
http://thenewboston.org/watch.php?cat=6&number=150
The tutorial returns the last tweet of a twitter user.
The server then needs to store the integer as a JSON so that it can be accessed using similar code.
To make creating the JSON objects simple for amateur developers, Google have created an API which can be used to create the JSON objects. This source is found here:
http://code.google.com/p/json-simple/
After this the integer from the physics engine was returned to the phone as a string.
No comments:
Post a Comment