I am looking into using GameSparks in Unity, I have no much backend experience. At the moment I am deciding between GameSparks, PlayFab and App42. I like GameSparks as it looks promising. I read through some documentation and I have a few questions before starting my mobile game.
2. Does each player has up to 6 currencies? If I am using the method above to save currency, can I save the currency directly to currency1, currency2, currency3 field etc? Or I have to create a runtime collection and save it in there?
3. Let's say if I use virtual goods and validate the receipt with GameSparks, For example, player spending 0.99USD to buy 100 gold which is currency1. Does the backend automatically add 100 to currency1? Do I need redownload the latest data and display it to player?
4. Is it possible to have an online store in the game, e.g. a weapon store. I can add new weapon (image/model and attitudes) on control panel. Also I can set some weapons into a discount price for 24 hours or something? If so where should I start?
Sorry, I am a newbie in GameSparks, it looks very interesting, but there a few things that I can't get my head around it. thanks
Derek
Best Answer
C
Customer Support
said
about 6 years ago
Hey Derek,
In answer to your questions...
[1] - There are a few tutorials on how to use cloud-code to save data from the client here.
[2] - Yes, each player has those 6 currency slots available. You can use them with cloud-code to credit and debit the player. Processing virtual goods transactions with automatically debit the player. You can see an API on this here.
[3] - We have a concept of currency packs. This is in the 'type' field when you create a new virtual good. How this works is that if you set a VG to be a currency pack, the value you put in the currency field will be debited to the player when the VG is purchased instead of debited. However, currently this only works when the VG purchase is validated through a 3rd party payment like the app-store or player-store. So if you want process a currency pack using generic BuyVirtualGoods request you would need to add some cloud-code to that request to credit the player. You can manage this easily by adding a 'currency-pack' tag to the VG and then in the BuyVirtualGoods response, you can check if the VG was a currency pack and then credit the player with the currency value after purchase.
[4] - Yes, you can do this. You would use ListVirtualGoodsRequest to get all the VG details back to the client and then use whatever UI you want to draw those. After the game has gone live you can keep adding VGs and they will get updated using ListVirtualGoodsRequest. However you cannot add new images to the VGs, so you could use some mix of our downloadables feature and VGs. You would have to add some code the client to check if you have images for a given VG shortcode. Then if the client doesnt recognise a new VG, you use downloadables to request the image for that VG so you can draw it.
I've attached a tutorial on how you can achieve sales events through our dynamic forms. This hasnt gone live on the site yet, but you should be able to configure sales events as you need using some variation of this tutorial.
[1] - There are a few tutorials on how to use cloud-code to save data from the client here.
[2] - Yes, each player has those 6 currency slots available. You can use them with cloud-code to credit and debit the player. Processing virtual goods transactions with automatically debit the player. You can see an API on this here.
[3] - We have a concept of currency packs. This is in the 'type' field when you create a new virtual good. How this works is that if you set a VG to be a currency pack, the value you put in the currency field will be debited to the player when the VG is purchased instead of debited. However, currently this only works when the VG purchase is validated through a 3rd party payment like the app-store or player-store. So if you want process a currency pack using generic BuyVirtualGoods request you would need to add some cloud-code to that request to credit the player. You can manage this easily by adding a 'currency-pack' tag to the VG and then in the BuyVirtualGoods response, you can check if the VG was a currency pack and then credit the player with the currency value after purchase.
[4] - Yes, you can do this. You would use ListVirtualGoodsRequest to get all the VG details back to the client and then use whatever UI you want to draw those. After the game has gone live you can keep adding VGs and they will get updated using ListVirtualGoodsRequest. However you cannot add new images to the VGs, so you could use some mix of our downloadables feature and VGs. You would have to add some code the client to check if you have images for a given VG shortcode. Then if the client doesnt recognise a new VG, you use downloadables to request the image for that VG so you can draw it.
I've attached a tutorial on how you can achieve sales events through our dynamic forms. This hasnt gone live on the site yet, but you should be able to configure sales events as you need using some variation of this tutorial.
Derek Lam
Hello there,
I am looking into using GameSparks in Unity, I have no much backend experience. At the moment I am deciding between GameSparks, PlayFab and App42. I like GameSparks as it looks promising. I read through some documentation and I have a few questions before starting my mobile game.
1. What is the best way to save and load player data, is it using Event & Cloud code? Like this: https://docs.gamesparks.com/getting-started/using-cloud-code/unity-cloud-code.html
2. Does each player has up to 6 currencies? If I am using the method above to save currency, can I save the currency directly to currency1, currency2, currency3 field etc? Or I have to create a runtime collection and save it in there?
3. Let's say if I use virtual goods and validate the receipt with GameSparks, For example, player spending 0.99USD to buy 100 gold which is currency1. Does the backend automatically add 100 to currency1? Do I need redownload the latest data and display it to player?
4. Is it possible to have an online store in the game, e.g. a weapon store. I can add new weapon (image/model and attitudes) on control panel. Also I can set some weapons into a discount price for 24 hours or something? If so where should I start?
Sorry, I am a newbie in GameSparks, it looks very interesting, but there a few things that I can't get my head around it. thanks
Derek
In answer to your questions...
[1] - There are a few tutorials on how to use cloud-code to save data from the client here.
[2] - Yes, each player has those 6 currency slots available. You can use them with cloud-code to credit and debit the player. Processing virtual goods transactions with automatically debit the player. You can see an API on this here.
[3] - We have a concept of currency packs. This is in the 'type' field when you create a new virtual good. How this works is that if you set a VG to be a currency pack, the value you put in the currency field will be debited to the player when the VG is purchased instead of debited. However, currently this only works when the VG purchase is validated through a 3rd party payment like the app-store or player-store. So if you want process a currency pack using generic BuyVirtualGoods request you would need to add some cloud-code to that request to credit the player. You can manage this easily by adding a 'currency-pack' tag to the VG and then in the BuyVirtualGoods response, you can check if the VG was a currency pack and then credit the player with the currency value after purchase.
[4] - Yes, you can do this. You would use ListVirtualGoodsRequest to get all the VG details back to the client and then use whatever UI you want to draw those. After the game has gone live you can keep adding VGs and they will get updated using ListVirtualGoodsRequest. However you cannot add new images to the VGs, so you could use some mix of our downloadables feature and VGs. You would have to add some code the client to check if you have images for a given VG shortcode. Then if the client doesnt recognise a new VG, you use downloadables to request the image for that VG so you can draw it.
I've attached a tutorial on how you can achieve sales events through our dynamic forms. This hasnt gone live on the site yet, but you should be able to configure sales events as you need using some variation of this tutorial.
Thanks,
Sean
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
In answer to your questions...
[1] - There are a few tutorials on how to use cloud-code to save data from the client here.
[2] - Yes, each player has those 6 currency slots available. You can use them with cloud-code to credit and debit the player. Processing virtual goods transactions with automatically debit the player. You can see an API on this here.
[3] - We have a concept of currency packs. This is in the 'type' field when you create a new virtual good. How this works is that if you set a VG to be a currency pack, the value you put in the currency field will be debited to the player when the VG is purchased instead of debited. However, currently this only works when the VG purchase is validated through a 3rd party payment like the app-store or player-store. So if you want process a currency pack using generic BuyVirtualGoods request you would need to add some cloud-code to that request to credit the player. You can manage this easily by adding a 'currency-pack' tag to the VG and then in the BuyVirtualGoods response, you can check if the VG was a currency pack and then credit the player with the currency value after purchase.
[4] - Yes, you can do this. You would use ListVirtualGoodsRequest to get all the VG details back to the client and then use whatever UI you want to draw those. After the game has gone live you can keep adding VGs and they will get updated using ListVirtualGoodsRequest. However you cannot add new images to the VGs, so you could use some mix of our downloadables feature and VGs. You would have to add some code the client to check if you have images for a given VG shortcode. Then if the client doesnt recognise a new VG, you use downloadables to request the image for that VG so you can draw it.
I've attached a tutorial on how you can achieve sales events through our dynamic forms. This hasnt gone live on the site yet, but you should be able to configure sales events as you need using some variation of this tutorial.
Thanks,
Sean
Derek Lam
Thank you very much I will take a look.
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics