

sample call String key = ("YYAndroidMobageKey") Public boolean getBoolean( String _name ) Constants are read from the iniBundle RunnerActivity.mYYPrefs which enables the following methods: sample call RunnerJNILib.DsMapAddString(dsmapindex, "userpicurl", info) Public static native void CreateAsynEventWithDSMap(int mapindex, int eventindex) Public static native void DsMapAddString(int mapindex, String key, String val) Public static native void DsMapAddDouble(int mapindex, String key, double val) Public static native int jCreateDsMap(String keys, String svals, double sdoublevals) DsMaps are handled through RunnerJNILib which enables the following methods: Int e_achievement_show_purchase_prompt=6

Int e_achievement_challenge_launched=1011 Int e_achievement_challenge_list_received=1010 Int e_achievement_challenge_received=1009

Int e_achievement_challenge_completed_by_remote=1008 Int e_achievement_challenge_completed=1007 This is to help with the integration of third party SDKs from companies like LeadBolt or inMobi, but there is no obligation for you to use them and they can be ignored if not needed.įor extensions on iOS you will need to have a header file with the following: enum eAchievementMessages.R You also have access to a number of GameMaker: Studio constants which can be returned as part of your dsMap, namely those related to leaderboards, image retrieval and friends etc.
#GAMEMAKER STUDIO 2 EXTENSIONS FULL#
In order to do this we provide certain functions to aid in your creating and returning dsMaps, which will be shown below in the full code, and which are also available as attachments to this document for downloading at the bottom of the page.Ĭurrently, you can get access to the GameMaker: Studio Social Asynchronous event.
#GAMEMAKER STUDIO 2 EXTENSIONS CODE#
These can be created in your extension code and returned to the Asynchronous Event (note that you can return a dsMap as the return value from your defined extension function in to GameMaker: Studio as a regular return too). One of the most convenient ways of returning information back to your game from a third party SDK is via dsMaps. However, you can also add to your external extension code to give it access to this event, which is very useful for third party SDKs, particularly advertising and monetisation ones. This event is used in GameMaker: Studio to "catch" things that have been getting processed in the background, like the http_ function calls, or the loading of a sprite etc. Well, to resolve this issue on the mobile targets you can create extensions with access to the Asynchronous Event. The result of these function calls is not instantaneous and may take some time to come through. In these cases you would want the extension to trigger an event in an instance, where you can then process the results of the function call. However, there will be cases when the extension being used requires some processing to achieve the desired result, particularly on the mobile targets, like when you have an extension to "pull" advertising from a given source. For more information, visit or follow Zynga on Twitter, Instagram, Facebook or the Zynga blog.A call to an extension on any platform generally works like any other GML function call, ie: you call the function and it does something, sometimes returning a value or a string back to the code to be used or stored. Founded in 2007, Zynga is headquartered in California with locations in North America, Europe and Asia. With Chartboost, a leading mobile advertising and monetization platform, Zynga is an industry-leading next-generation platform with the ability to optimize programmatic advertising and yields at scale. With massive global reach in more than 175 countries and regions, Zynga has a diverse portfolio of popular game franchises that have been downloaded more than four billion times on mobile including CSR Racing™, Empires & Puzzles™, FarmVille™, Golf Rival™, Hair Challenge™, Harry Potter: Puzzles & Spells™, High Heels!™, Merge Dragons!™, Merge Magic!™, Toon Blast™, Toy Blast™, Words With Friends™ and Zynga Poker™. Zynga is a global leader in interactive entertainment with a mission to connect the world through games and a wholly-owned subsidiary of Take-Two Interactive Software, Inc.
