- Joined
- Jul 8, 2018
- Messages
- 1,108
- Reaction score
- 486
- First Language
- English (USA)
- Primarily Uses
- RMMV
Currently I'm working with GameJolt services for trophies in my main project through the plugin located here, however I was wondering if I could have it converted to support lootlocker. I'm needing it for a game jam as it is an integral part of the challenge to use the service for leaderboards and stuff.
Any takers? I'm listing for MV, but MZ is also requested (preferably in the same plugin).
EDIT: It's general REST API stuff, and proving to be tricky. However, the following is a short example of what I have from my own experiments:
EDIT 2: Forgot about the API reference guide. Here it is over this way.
EDIT 3: I ended up figuring it out. I'll repost with a proper plugin after the jam is done and I have a chance to change the format accordingly.
Any takers? I'm listing for MV, but MZ is also requested (preferably in the same plugin).
EDIT: It's general REST API stuff, and proving to be tricky. However, the following is a short example of what I have from my own experiments:
JavaScript:
auth = function() {
fetch('https://api.lootlocker.io/game/v2/session/guest', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'game_key': '4a330796e1a088fd725234cb4f1fd984af866109',
'game_version': '0.0.0.1',
'development_mode': 'true'
})
});
};
postScore = function() {
fetch('https://api.lootlocker.io/game/leaderboards/xenaWarriors/submit', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'score': 1000
})
});
};
getLeaderboard = function() {
return fetch('https://api.lootlocker.io/game/leaderboards/xenaWarriors/list?count=10');
}
EDIT 2: Forgot about the API reference guide. Here it is over this way.
EDIT 3: I ended up figuring it out. I'll repost with a proper plugin after the jam is done and I have a chance to change the format accordingly.
Last edited: