• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE GameMaker’s support for messaging platforms?

F

fedeali

Guest
Does GameMaker’s HTML5 exporter allow to build games for instant messaging platforms such as WeChat, Facebook Messenger, LINE, Telegram, etc.?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Recent versions of GameMaker Studio 2's HTML5 export had seen gradual improvements to lower the output size (now at ~600KB IIRC, can be shrunk further via Google Closure).

There's a baseline Instant Games wrapper extension. For the rest you'd write your own JS wrapper (much like the official) or hire someone to do so.
 
F

fedeali

Guest
Recent versions of GameMaker Studio 2's HTML5 export had seen gradual improvements to lower the output size (now at ~600KB IIRC, can be shrunk further via Google Closure).

There's a baseline Instant Games wrapper extension. For the rest you'd write your own JS wrapper (much like the official) or hire someone to do so.
Thank you for your answer!
Good to know GMS 2 improved build size, which was already small compared to most engines. :)
So, if I understand correctly, since messaging apps’ games are simply HTML5 games packed according to a certain structure, it is possible to use GMS2 to develop such games, and I just have to pack them correctly and implement JavaScript APIs, right?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Thank you for your answer!
Good to know GMS 2 improved build size, which was already small compared to most engines. :)
So, if I understand correctly, since messaging apps’ games are simply HTML5 games packed according to a certain structure, it is possible to use GMS2 to develop such games, and I just have to pack them correctly and implement JavaScript APIs, right?
Yes - some of them require delayed start, which is done by stripping GameMaker_Init from index.html template and calling it yourself (I think Instant Games extension does this too) and then writing a wrapper extension for APIs needed. As GML compiles to JS, you can return arbitrary JS objects from extension calls and pass them back to other calls; GML scripts prefixed with "gmcallback_" remain not minified and callable via window.gml_Script_gmcallback_<name>(self_instance, other_instance, ...arguments). self_instance/other_instance can be obtained via argument[-2] and argument[-1].
 
Top