Announcement

Collapse
No announcement yet.

Gamespark Tutorial

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [TUTORIAL] Gamespark Tutorial

    How to setup Gamespark

    1. Install the GS Unreal SDK plugin
    Instructions https://docs.gamesparks.com/getting-...eal-setup.html
    2. Setup login/authentication in your gamemode
    Instructions https://docs.gamesparks.com/getting-...ntication.html
    Related read https://docs.gamesparks.com/getting-...loud-code.html and https://docs.gamesparks.com/getting-...loud-code.html
    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.
    Click image for larger version

Name:	LOAD_GS_SCRIPT_DATA.jpg
Views:	1
Size:	278.7 KB
ID:	1200263

    Click image for larger version

Name:	STORE_GS_SCRIPT_DATA.jpg
Views:	1
Size:	329.5 KB
ID:	1200261

    Click image for larger version

Name:	CloudCode_LOAD.jpg
Views:	1
Size:	75.6 KB
ID:	1200262

    Click image for larger version

Name:	CloudCode_STORE.jpg
Views:	1
Size:	94.1 KB
ID:	1200264

    In the example shown above the Short Code is SAVE_Player, not SAVE_PLAYER
    Click image for larger version

Name:	GS_STORE_EVENT.jpg
Views:	1
Size:	137.6 KB
ID:	1200265

    Questions, post here...

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

    Examples


    Click image for larger version

Name:	Example-NOSQL-output.jpg
Views:	1
Size:	150.6 KB
ID:	1200292
    Last edited by unit23; 11-12-2016, 09:49 AM.
    Reallusion Unreal Engine Community Manager / LEGENDS of EPICA [Twitter] [Facebook] [YouTube] [Vimeo]

    #2
    LADDER UE/Gamesparks code

    Main Widget

    Widget screen BP

    Click image for larger version

Name:	fix2.jpg
Views:	1
Size:	586.5 KB
ID:	1118422

    Widget screen BP > Macro

    Click image for larger version

Name:	fix1.jpg
Views:	1
Size:	721.1 KB
ID:	1118421

    ListLadderItem Widget

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

Name:	item2.jpg
Views:	1
Size:	442.7 KB
ID:	1118423

    Click image for larger version

Name:	item3.jpg
Views:	1
Size:	705.9 KB
ID:	1118424

    Click image for larger version

Name:	item4.jpg
Views:	1
Size:	505.9 KB
ID:	1118425

    Results

    Click image for larger version

Name:	fix3.jpg
Views:	3
Size:	565.7 KB
ID:	1118426

    Further reading

    http://shootertutorial.com/2016/01/3...-leaderboards/
    Last edited by unit23; 11-16-2016, 10:43 AM.
    Reallusion Unreal Engine Community Manager / LEGENDS of EPICA [Twitter] [Facebook] [YouTube] [Vimeo]

    Comment


      #3
      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!

      Comment


        #4
        Originally posted by DestinyFaux View Post
        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/comm...-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.
        Last edited by unit23; 03-19-2018, 05:25 PM.
        Reallusion Unreal Engine Community Manager / LEGENDS of EPICA [Twitter] [Facebook] [YouTube] [Vimeo]

        Comment


          #5
          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?
          Last edited by DK Buzzin; 01-17-2019, 03:53 PM.

          Comment


            #6
            They don't even bother updating their Marketplace plugin
            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

            Comment


              #7
              Originally posted by DK Buzzin.YT View Post
              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?
              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!!

              Comment


                #8
                Thanks for sharing!

                Comment

                Working...
                X