The player maps feature allows a player to create a custom map and save it online so others can view it. This is useful in games that have a lot of map customization options.

Saving a Map

When saving a map, the data should be converted to a string. If not using a custom encoding already, JSON is good way to organize a complex object like a map into a string.

idnet.mapSave(mapName:String, mapData:String, playerName:String):*

Listing Maps with the Default Menu

The SDK offers a default menu to display and load maps with verious sorting options.

idnet.toggleInterface('playerMaps');

Listing Maps with a Custom Menu

The SDK offers a default menu to display and load maps with verious sorting options.

idnet.mapListCustom(_mode:String, perPage:int, page:int, returnData:Boolean):*
Parameters
  • _mode:String — Acceptable modes are alltime, newest, popular, todayaverage, yesterdayaverage, last7daysaverage, last30daysaverage, last90daysaverage</b>
  • perPage:int — Integer of how many results to return. Limit 50 with return data false or 10 with it true.
  • page:int — Integer of how many to offset based on perPage
  • returnData:Boolean — False if you want map data on the list. Good for previews but should limit perpage to 10 so download speeds are fast.

Loading a Map

Use this to fetch the map string. The type will equal mapLoad and will be returned to the handleIDNET function.

idnet.mapLoad(mapId:String):void

Rating a Map

Let your users rate maps so the best ones will be easy to find.

idnet.mapRate(mapId:String, rating:int):*
Parameters
  • mapId:String — the levelid returned after saving or loading a map.
  • rating:int — A rating interger from 1 to 10. If you want to use like/dislike buttons use rating numbers 10 and 1.