Gamespark Tutorial

How to setup Gamespark

  1. Install the GS Unreal SDK plugin
    Instructions https://docs.gamesparks.com/getting-started/creating-a-game/unreal-setup.html
  2. Setup login/authentication in your gamemode
    Instructions Unreal Authentication - GameSparks Learn
    Related read Unity Cloud Code - GameSparks Learn and Unreal Cloud Code - GameSparks Learn
  3. Setup event to store data
    Events can be setup in the Gamespark portal (Configurator > Events)
  4. Setup event to load data
  5. Create a NOSQL Runtime entry (PlayerData)
  6. Add load and store GS functions to your player controller
    Decide where you want to save and load, probably loading when the player spawns.
    Player data can be accessed in the Gamespark portal (NoSQL > Collection > YOUR_COLLECTION_NAME, then click the Find button)
    Below example uses a string based storage, which contains basic player related stats. Important, when you store, use the assigned Short Code from the SAVE_PLAYER event. Your player date (hp, mana, level etc variables are likely different)

In the following screen i’ve tested delayed setting of the player variables, basically you just need to set your main player data, thus only one health, mana etc float/integer is required.

In the example shown above the Short Code is SAVE_Player, not SAVE_PLAYER

Questions, post here…

Recommendation
Start with only one event attribute (short code), might be bugged when adding more.

Examples

LADDER UE/Gamesparks code

Main Widget

Widget screen BP

Widget screen BP > Macro

ListLadderItem Widget

Additional User Widget which gets created for the ladder results and put into a scroll box widget

837aa30effdc4f737b939afc7f8160ec98f2f22e.jpeg

56127889b83dab3567d1f8ea0ab7ae8619c5b22f.jpeg

Results

b1ffc6ab0efff1e36c9c7e11b07d6c729ccf5c34.jpeg

Further reading

Is there by chance any possible way you could update this? It would seem Gamesparks changed the way a few things are handled in cloud code. They’re using Data Explorer vs. Mongo. I’m sure the concept is the same, but I’m a bit on the slow side. It would be immensely appreciated!

Hi DestinyFaux, sorry just reading your message now. I have the 4.16 codebase inside 4.18.3 and plan to transition to 4.19 once Gamesparks plugin is updated. Planning to look at the code in the coming days. So far I am not aware that there are new issues with the Gamesparks code (4-16/4.18.3) itself. Recently tested, and storing/loading was working as expected. Can you provide more details of the issue you encountered? Thanks.

To clear up some potential confusion, I’ve published my Gamesparks code at Gumroad, the support thread is here. https://forums.unrealengine.com/community/released-projects/124939-released-unreal-cloudsave-for-specific-gamesparks-integrations?151834-Released-Unreal-CloudSave-for-specific-Gamesparks-Integrations=

Support is for those Gumroad customers, do not plan to update this post here, currently not in the editor, I did some changes, but the scope outlined above should still work too. The Gumroad release has some more sophisticated fetch functionality if I recall correctly.

Unit23, this is exactly what I have been looking for, except you are using Mongo and since I am a new user to GameSparks I cannot make a runtime data collection. I think this is what DestinyFaux is referring to. It would be a godsend if you could make a tutorial on this for the current state of gamesparks.

Also, if the variables you want to save and load are in your network character BP, why call the save load events in the controller than transfer them back and forth to the character BP?

They don’t even bother updating their Marketplace plugin

UPDATE: I have tried replicating this setup with the current state of GameSparks and it is throwing errors both when attempting to save and load. Any help to get this working without MONGO is appreciated!!

Thanks for sharing!