So I am new to coding and I was wondering if there was a tutorial or guide out there to code in a store in game to buy things like extra skins for the character using in-game currency? I have been searching but haven’t found anything so I am sorry if this topic already exists. Any help would be appreciated. Thanks!
@jtubbs,
There is no single way to do this, so I don’t think there will be any tutorials on the subject. In fact, the answer to this question involves a number of topics.
Let me see if I can get you started.
-
Decide what your currency will be called: Gems, coins, dingbats, … you get the idea.
-
Decide how you want users to be able to acquire this currency:
- Real dollars via IAP
- Watching Videos or other Ad based monetization - https://docs.coronalabs.com/guide/monetization/monetization/index.html
- Returning to the game every day for some number of days.
- Create a file that tracks each time the app is started/run and when the user returns sequentially on day 2, 3, 4, … give them some kind of reward.
- Completing some in-game action.
- Tweeting about the app. - https://docs.coronalabs.com/plugin/index.html#social
- Posting of Facebook. - https://docs.coronalabs.com/plugin/index.html#social
- Rating the App
- …
-
Once you have this list of ‘actions’, learn how to code them up. Links given above to get you started, but each of these may be a deep topic.
-
You will also have to learn how to save data and keep track of data: https://docs.coronalabs.com/tutorial/index.html#data-files-strings
Several great starting places for all questions are:
Tutorials: https://docs.coronalabs.com/tutorial/index.html
Developer Guides: https://docs.coronalabs.com/guide/index.html#developer-guides
API Docs : https://docs.coronalabs.com/api/
Plugins Page (for features to enable above): https://docs.coronalabs.com/plugin/index.html
Market Place (for more features to enable above): https://marketplace.coronalabs.com/
Note: I only focused on the in-game currency and earning it.
I totally failed to answer the ‘in game store’ part of the question. Hopefully someone comes back with an answer on this.
Completely ignoring IAP here.
Assuming you know exactly what your store is going to look like. You’re going to have to worry about two main things
-
Make sure the player’s currency is saved before visiting the store.
-
Make sure the proper amount of currency is removed from the player, and the new currency and item bought are stored.
Personally, I recommend saving the currency and items using a .txt file. Have one for currency and another for items purchased.
A .json file would probably be better though.
Thank you guys so much! I will try those out. I am still pretty far away from putting that into the game but I wanted to get an idea of what to expect to begin thinking about it. Thank you again!
@jtubbs,
There is no single way to do this, so I don’t think there will be any tutorials on the subject. In fact, the answer to this question involves a number of topics.
Let me see if I can get you started.
-
Decide what your currency will be called: Gems, coins, dingbats, … you get the idea.
-
Decide how you want users to be able to acquire this currency:
- Real dollars via IAP
- Watching Videos or other Ad based monetization - https://docs.coronalabs.com/guide/monetization/monetization/index.html
- Returning to the game every day for some number of days.
- Create a file that tracks each time the app is started/run and when the user returns sequentially on day 2, 3, 4, … give them some kind of reward.
- Completing some in-game action.
- Tweeting about the app. - https://docs.coronalabs.com/plugin/index.html#social
- Posting of Facebook. - https://docs.coronalabs.com/plugin/index.html#social
- Rating the App
- …
-
Once you have this list of ‘actions’, learn how to code them up. Links given above to get you started, but each of these may be a deep topic.
-
You will also have to learn how to save data and keep track of data: https://docs.coronalabs.com/tutorial/index.html#data-files-strings
Several great starting places for all questions are:
Tutorials: https://docs.coronalabs.com/tutorial/index.html
Developer Guides: https://docs.coronalabs.com/guide/index.html#developer-guides
API Docs : https://docs.coronalabs.com/api/
Plugins Page (for features to enable above): https://docs.coronalabs.com/plugin/index.html
Market Place (for more features to enable above): https://marketplace.coronalabs.com/
Note: I only focused on the in-game currency and earning it.
I totally failed to answer the ‘in game store’ part of the question. Hopefully someone comes back with an answer on this.
Completely ignoring IAP here.
Assuming you know exactly what your store is going to look like. You’re going to have to worry about two main things
-
Make sure the player’s currency is saved before visiting the store.
-
Make sure the proper amount of currency is removed from the player, and the new currency and item bought are stored.
Personally, I recommend saving the currency and items using a .txt file. Have one for currency and another for items purchased.
A .json file would probably be better though.
Thank you guys so much! I will try those out. I am still pretty far away from putting that into the game but I wanted to get an idea of what to expect to begin thinking about it. Thank you again!