Recommended Posts

Hello everyone,

 

I am a game developer with a strong focus on mobile games.  I currently have 6 engines for HTML5 games built in Game Maker: Studio, later this month I am going to hire artists to do artwork for them, then after some minor polishing I would like to send out to to HTML5 publishers and offer a bulk discount on non-exclusive licenses.  

 

To start building bridges with HTML5 publishers, I sent my game Gridlock out as an experiment.  I was fairly surprised with the results.  I am currently in communication with 7 HTML5 sponsors regarding licensing it.  If every agreement goes as planned, I will have made more money from game development this month than I did from going into my day job every day.  If I achieve similar results with my game bundle, I think I will make enough to (comfortably) quit my day job. 

 

I have been using Game Maker since I was 8 years old and I've grown proficient enough with it to create high-quality games, but outside of GM I'm a fairly inexperienced programmer.  I have a decent amount of experience with HTML5 and CSS, but I never got very far into JS or sadly HTML5. 

 

Several of the companies I'm in communication with have requested API Implementation.  Admittedly, I expected this.  I've heard the horror stories about it on Twitter, and it's a huge subject of interest in the Sponsors and Portals sub-forum.  I've read about it in Matthew Bowden's book (which introduced me to the HTML5 market) but it only briefly touched on the subject.  I've Googled it to death and understand the idea behind it, but it's still something of an enigma to me.  

 

I can't seem to find any solid information on API Implementation into HTML5 games built in Game Maker: Studio.  I know it's a complicated and tedious process, that some developers charge portals for and I'm willing to learn how to do it.  I just can't find a solid resource on the subject.

 

From what I understand, I need to create an Extension in Game Maker that will read JS functions.  I just can't find a clear resource on how to do so.  

 

Any links, or advice would be appreciated.  It might literally change my life.  :)

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Actually, after digging around the forum some more, I found a link to this discussion on the GMC:

 

http://gmc.yoyogames.com/index.php?showtopic=520070

 

I have created a new extension and imported the publishers API.  I created the new functions requested by the publisher.  I'll see how this goes, but any links are still appreciated.

Share this post


Link to post
Share on other sites

API implementation is often tedious and frustrating, because bugs aren't as easily detectable and the quality of the sponsors API are usually poor.

 

That said it isn't actually very hard, if it's a simple java script file is provided to you:

 

I don't have the time to put together a picture guide (yet) but this is how it'll go:

 

1. In your GM:Studio Project, right click Extensions and click 'Create Extension'.

2. Fill in the appropriate details, like names etc. and click OK.

3. Right click on the Extension, click add file and add the sponsor API file.

4. Open the js file in something like Notepad++ and note down the function names you need

5. Right click on the file and 'add function' for each function you noted down.

6. Make sure you fill in the help info like this: exampleFunctionName(exampleArgument0) and so on.

7. Make sure the table below the help is filled out with the correct arguments and types. Also make sure the return type is right.

 

That should be pretty much it. You can now called the JS functions like a regular GM function. If you aren't sure they're being called properly add a console.log command in the javascript file. This will print to the console that you can watch as the game is being run.

 

Hope this helps,

Sondar

 

EDIT: Oh ok, you found a thread :P

Share this post


Link to post
Share on other sites

Thanks for the advice!  I have created an extension in GM and implemented all of the required functions.  Some of them fire properly, and others do not.  I imagine it's my GML that's the issue and not the API, but these things are so poorly documented it's hard to figure out exactly what they want the functions to do sometimes.  Very frustrating.  :wacko:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.