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

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.

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

Short intro of us ๐Ÿ’•โœŒ๏ธ

We're an eletro duo based in Seoul ๐Ÿ‡ฐ๐Ÿ‡ท Heavily influenced by the 90s.

Our new album #Xennials is all about the nostalgia of that era ๐Ÿ’ฝ CD listenin ๐Ÿ“Ÿ beeper beepin ๐Ÿ’พ floppy disks floppin days ๐Ÿ˜Ž

Stream now! ๐ŸŽง

https://open.spotify.com/album/3YwWhnHWVy5cA8XOpbaGRA?si=8E9awqUโ€ฆ

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 ^^

Finished a project I've been working on over the last few days!

Modeled and textured in Blender.

#3dart #lowpoly #npbr #fantasy #hut

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

Horror WIP A track that will be featured in a future horror game soundtrack! Stay tuned!

Likes appreciated โœŒ๏ธ

#gamedev #composer #horrorgame #indiegame #IndieGameDev #soundtrack

Who's is this little cutey๐Ÿ‘ธ here? Thanks๐Ÿ™ for a gorgeous fanart @WheNa! Feel free to share your arts, screenshots, or videos with #playzelter or #zelter hashtags! #pixelart #animating #unity3d #animated #indiegames #unrealengine #animate #conceptart