AppFormative Multiple Cross-Platform Leaderboards
rainwaterstudios
Member Posts: 198
I'm trying to set up multiple cross-platform leaderboards with AppFormative, following http://www.appformative.com/implementation_gamesalad_scoresandmultileaderboards.mox
In step 2, what actor are these rules supposed to be in? @Hopscotch
Thanks
Comments
Hi @rainwaterstudios
those rules can be part of your check if the user beat their high-score, usually when the level ends.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
In the 'Change Table Value' behavior, how do I setup the game.PlayerName and game.Leaderboard values?
In the 'Network Send Table To URL' behavior, what actor contains the 'self.firstcontact' attribute? Do I need to create that attribute in the player actor?
@rainwaterstudios
For the "game.PlayerName", you would create some input (typically) at the start of the game, where the player can enter their preferred name that would appear on the leader-board. This value then gets stored in the "game.PlayerName" attribute.
The "game.Leaderboard" value, is the name of the leader-board you currently want to save values to. This can be any identifier of your choice. Since you are referring to the multiple leader-board implementation, you obviously intend to have multiple leader-boards in your game. Maybe separate leader-boards per level, or for different aspects of the game, i.e. best times and highest scores.
The "self.firstcontact" attribute needs to be created by you in the actor which handles the network communication (sending the scores to the server). If your player actor is the most appropriate place to do this, that is fine. Alternatively, you can have a separate hidden actor which handles all the "game over" logic, including the sending of the data to the server. It is up to you how you like/need to structure the logic.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
I have self attributes set up for firstcontact, secondcontact and thirdcontact, in an actor that I set up following the initial setup instructions... do these attributes need to be the ones for the leaderboard? I currently have the actor set up in the preloader, so should I move those actions and attributes to my player actor and delete the preloader actor, or are they seperate?
Thanks.
@rainwaterstudios
The self attributes "firstcontact", etc., need to be in every actor that does APPFormative network communication. These are used as the callback attributes through which success or failure of the network call is communicated.
So, in your setup, the initial setup as outlines in the "Basics" can be in your preloader.
The sending of the high-score values can be done in your player actor, as per step 2 in the instructions for "Multiple cross platform leader-boards".
The retrieving of the leader-board can be done in yet another actor when needed, as per step 4 in the instructions for "Multiple cross platform leader-boards".
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Thanks. Does the table type matter?
@rainwaterstudios
Normal Tables
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com