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

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

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 1.0 soon.. RIP T-Posing Squidward & much more!

A new contestant has appeared.

Bandana Dee the Dream Friend

Fan art for Foolish I'm feeling kinda better so I drew this

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

Back in my art school days I used to ride the 710 COPSA line from Parque Del Plata to Montevideo almost everyday. This is the Marcopolo Viaggio G4 Mercedes Benz model from the late 80s, one of the older bus models that was running on the line.

The Darkside Detective: A Fumble in the Dark is out TODAY! 🖱️Advanced pointing, clicking action 🖨️Very funny words! Loads of them! 👻6 sarcastic, spectral cases to solve

We're glad to announce that Baby Dino Adventures 🦖 is now available in Early Access here on GameJolt! Link: https://gamejolt.com/games/babydinoadventures/508121 Walk, run, and jump as a baby t-rex in this cute platformer Free demo available #IndieGame | #GameDev | #PixelArt