GameJolt Game Maker API Example

By thatbrod - Added On 7/19/2012



Download Game

1.5 MB -

Quick Play


 
4.6
Current Rating
31 ratings
Rate This Game:

Current Major Vesion: 2

Launch Quick Play to see it in action!
Download to study the library!
Find the full documentation here! http://pastebin.com/ZhJVEQgs

GOOD LUCK! :D

Show Less
Show More

Leaderboards


-RacketGames-
1st Place
2675 BARS!
Achieved 7 months ago

BulleTech Games
2nd Place
1957 BARS!
Achieved 7 months ago

TomboFry
3rd Place
448 BARS!
Achieved 6 months ago

Threef
4th Place
336 BARS!
Achieved 7 months ago

thatbrod
5th Place
300 BARS!
Achieved 9 months ago

Impostor
6th Place
256 BARS!
Achieved 7 months ago

SomeBody
7th Place
242 BARS!
Achieved 9 months ago

Spydog
8th Place
228 BARS!
Achieved 9 months ago

Maelron
9th Place
192 BARS!
Achieved 7 months ago

astralWolf
10th Place
189 BARS!
Achieved 8 months ago

You Must Login to Score

What'cha waiting for? Sign up!



Achievable Trophies

0/8    N/A


User Comments

You must be logged in to post a comment.


AleksandarGocev
I haven't used Extensions and libraries before, and i cant seem to find a way to install them (I've searched for some tutorials on YouTube.. )
And whenever I try to run your example, the game crashes...
(I have Game Maker 8)
posted 2 weeks ago / user rated game: 5

 
AleksandarGocev
Here's the Error Report
COMPILATION ERROR in Script: GJ_HTTP_callNew
Error in code at line 48:
md5_begin(); md5_read_string(url + string(_GJ_pKey)); md5_end();
^
at position 6: Unknown function or script: md5_begin
posted 2 weeks ago / user rated game: 5

Spaceman
Any tutorial on how to use this? :/ I got really confused with this much of various functions. Maybe I have to take a closer look at it?
posted 1 month ago

 
Spaceman
Sorry I didn't see the documentation. XD
posted 1 month ago

FatBros
ok so i got this error while using it on gm8.1

___________________________________________
ERROR in
action number 1
of Mouse Event for Left Released
for object oLOGin:

In script GJ_login:
In script GJ_HTTP_callNew:
Illegal argument count calling script "GJ_getUserData".
Script requires 3 arguments, 2 have been supplied.

I read that this was an error because of gm8.1 but if that so how it's working correctly in your example? (Not the "quick play" one here). I downloaded it and open it up in gm8.1 the file called "GameJolt Game Maker API Example v2.1.gmk" and there i logged in correctly, but when i tried it in my game it throws that error :S
posted 2 months ago / user rated game: 5

 
thatbrod
Yeah with GM8.0 I got into a habit that GM8.1 doesn't like anymore... :/
Before when you didn't supply an argument, GM would automatically assume it was 0, but now it demands you give it to the script no matter what. I thought I had fixed all of those errors, but I'll have to look through again

For now, you can fix this temporarily by adding a "0" as the final argument in the script GJ_HTTP_callNew()'s calling of GJ_getUserData() (and everywhere else an error like this one is thrown)

I'll have this fixed up later today :(
posted 2 months ago

 
FatBros
Thank you very much.

I think i found another way to fix it. In your example in Global Game Settings/Errors you have "Throw an error argument aren't initialised correctly" unchecked and that option is on by default in any new .gm81 file.

I tried cheking on in your example and then got the same error/s.

So i think if i just uncheck that in my game it should work correctly. I'll try right now.
posted 2 months ago / user rated game: 5

 
FatBros
Ok, looks like some things aren't working atleast for me. Following the instructions i sent some scores but only got the "word" but no value with it...
I used this as is:
GJ_addScore(<real> tableID, <string> scoreDisplay, <real> scoreSort, <string> extraData)
But dunno why i got only the word "points" showing on the highscores. Also i set the HS to only one value per user but i saw around 5 values sent by me...
Deleted those values and tried to send again and this time no data was sent, i really can't understand that :(

And the other strange bug is about the data storage. I didn't test the global one yet but the user. And it didn't work, tried doing a save/load system. And i get this:
-I start playing
-Save the game
if GJ_isLogged() {
GJ_saveData("level",(global.level+1)); // Save the next level
GJ_saveData("score",global.scr); // Save the score
}
-Then return to title and try to load the game
-It works.
BUT
-If i leave the game
-Reload it again and try to load after logging in it returns the default/error value.

I'm not sure if this is my error or api's because if i try the quick play in here, and go to "STATS", Gameplays (personal) only returns "Loading..."

What's wrong? :S

PS. I tried adding you to skype brod for this but got no answer xD
posted 2 months ago / user rated game: 5

 
thatbrod
Mk so for the addScore function, it's important to know that the sort is in no way associated with the display, and vise versa.
If you want to show the actual score on your highscore list, you have to do something like:
addScore(0, string(myScore) + " points!", myScore, "");

For the loading global storage things, make sure that GJ_getStatus() returns successful before using them
posted 2 months ago

 
FatBros
Ok i have to say it here too: thank you very much it worked now!

(PS. No hurry but i left one question to you on skype ^^)
posted 2 months ago / user rated game: 5

noah vn
what versions of game maker does this work with?
posted 2 months ago

 
thatbrod
I know it works for 8.0, I've yet to hear any bugs about 8.1

If you have it, post any errors and I'll post some fixes
posted 2 months ago

braffolk
Deleted the lerp then got two errors commented out gj_free_user_set or something but now i have
_GJ_control = object_add();
object_add() is not reconised
posted 3 months ago

 
thatbrod
Seems you're using GM:Studio? If so, you'll have to check the example made especially for that one. Sorry!
posted 2 months ago

braffolk
Help me please!
im getting error "script name lerp is equal to function name"
but what do i have to do and i cant find that function anybody help? :(
posted 3 months ago

Roan Contreras
Works well although I got that error as well yet I've deleted it...
posted 3 months ago / user rated game: 5

Munguia
Quick play doesn´t work

COMPILATION ERROR in Script: GJ_instructions
Error in code at line 201:
GJ_freeUserSet();
^
at position 6: Unknown function or script: GJ_freeUserSet

Theres a Tutorial or example just for Trophies APi somewhere?
posted 3 months ago

 
Daz
The GM API doesn't work quite well, you'll have to tweak it a bit. And, oh, that error, just download it and comment that line. You won't need that function really.
posted 3 months ago

Pipo Games
OucH!
posted 5 months ago

Pong
I get this when I attempt running it in any method:
"___________________________________________
COMPILATION ERROR in Script: GJ_instructions
Error in code at line 201:
GJ_freeUserSet();
^
at position 6: Unknown function or script: GJ_freeUserSet"
posted 5 months ago

 
TrystinGuy
Its not that hard, just delete the line referring to that script in the GJ_instructions script and your good to go
posted 5 months ago

 
Team Perious
I get that when I try to quick play the example.
posted 4 months ago

Game Info

Developer: thatbrod
Genre: Other
Status: Complete
Engine/Language: Game Maker
4.20k
Views
1.31k
Plays

Game News


People Online