Game
GameMaker: Studio 2 - GameJolt API
4 years ago

Update 1.1!


The first update for my GJ API! I wanted to get this one out as fast as possible because it has some key features which I think are super important, and will make everyone's life easier who uses this system.


When updating old games please be sure to read through all of the new/updated features to make sure your game runs as desired!


Updates:

  • "GJFetchUser()" has been renamed to "GJUserFetch()" for cohesion

  • All functions are now Object independent! This means you can call any GJ function in any object without causing a crash

  • oGJControl is no longer a required object for networking. While it still can be used as a bases, it's not needed as any object that calls the "GJInit()" function will automatically be assigned the control object. It's important that this object is never destroyed and only one instance of it exists.

  • A new function "GJNetworking()" has been added. This can be ignored for anyone still using oGJControl as their base object, but for anyone making a custom base object this should be called in the Async - HTTP event as it controls all of the functions called.

  • The way the control object handles non GameJolt errors with HTTP requests has been changed, it is now treated as an error just like all GJ errors were previously. Rather than just being completely ignored like it was originally "handled".

  • "GJOn -- Attempt()" functions no longer exist. All GJ functions now require you to supply your own functions that will be called on attempt, or -1 to not call anything. More on this later.

  • Added an auto retry parameter to most functions, this will make the request retry over and over again until successful automatically. It will still call the onAttempt function for each retry.

  • Removed all unnecessary log messages. Previously the system would log all responses from GameJolt, which resulted in a lot of spam.


GJInit and GJNetworking Updates:

As shown earlier in the Updates, GJInit() now can be called in any object to set it as the control object instead of the original system that required you to use the supplied "oGJControl" object. This was done mostly for people who use different naming conventions to make your life easier, as well as that in-case you planned on integrating my gj system into an already existing project you can easily add it with one script rather than a script and an object!

GJOn -- Attempt Updates:

In the 1.0 release there were a lot of functions in the oGJControl object "GJOnFetchUserAttempt()","GJOnDataSetAttempt()","GJOnScoreUpdateAttempt()", etc for every function in the system. This was a really poor method of doing this. I think it is necessary to have "onAttempt" scripts so that the game can know when a request is complete and if it was successful or not, but it should be done on a per request basis. So that's what I did. Now when calling any function it will have a parameter called "Function" this is the function that it will call once it finishes an attempt. These will be called exactly the same way the onAttempt functions did, except you can supply any function. So you can have unique functions for every single call! Check the script comments for what the returned parameters are for each function.



0 comments

Loading...

Next up

A new contestant has appeared.

Some designs for more potential features of the 1.0 Update

The candy bar is the only item currently set in stone for release. The others might change before the update.

Squid's first public build has been released! You can check it out here if you're interested: https://gamejolt.com/games/Squid/434729

Squid 1.0 soon.. RIP T-Posing Squidward & much more!

This Satuday we invite to watch another #speedpainting of our artist Daniel Faiad.

How great is this scene of #Pecaminosa?

#ScreenShotSaturday | #IndieDev | #DigitalArt

So

i may or may not make an full art of some person or i may just leave this like that-

Heya there! I really wanted to show you all a little gameplay preview of the first boss fight i'm currently working on i hope you like it ^^

Today I was setting up the location of the first boss. His name is "Father" and he is the first of the Patagonians. His task is to guard the road to the House.🛡🗡 Bookmark pre-launch page🔖🔖🔖

https://www.kickstarter.com/projects/rdvindiegame/the-patagonian…

So here's the first of the zodiac signs i will make for the next weeks.

Strange Umbrella