Wednesday, February 25, 2009

cocos Live v0.1.1 with device id filter


Cocos Live v0.1.1 introduces some changes in the Web front end. The most important change is that now it is possible to the display certain fields in the Web and send back to the iPhone another set of fields.
Use the Sendback property to send a field back to the iPhone and use the Display On Web property to display a field on the web page.
Eg: If you don't want to send back the usr_playername property to the iPhone, but you want to display it on the web page, then set SendBack = False and Display On Web = True.

In Cocos Live v0.1.1 you can also filter games by device id:

// request scores posted by this device
// request scores "all time"
// request best 15 scores (limit:15, offset:0)
[request requestScores:kQueryAllTime limit:15 offset:0 flags:kQueryFlagsByDevice category:@"easy"];

To filter by device id using the Web front end you need to enable the Display On Web property for the cc_device_id field.
Then, you can click on that field to filter by that device id.

Cocos Live client v0.1.1 will be available with cocos2d v0.7.1, but if you can't wait, you can download it from the svn rev. 594.

Cocos Live service v0.1.1 is "live" now. To try this feature, you can play filtering the scores of DemoGame game.

No comments: