hmm. thanks for the reply. After working on Beast Brawlers using GameSparks, we found that there were coding patterns that we were able to reduce redundant coding.
We used "modules" to handle data management of specific db collections. Such as Currency, we used a currency module to have common functions. Such as AddCurrency(type, amount, detailsOnWhy).
This way we had a common code flow when the currency was added. So when our different points of currency added
- Lootbox
- End of play
- store purchase of in-game goods
- cash purchase
- live opts tools
- season rewards from clan achievements
- daily quests
- progression rewards
- reward videos
- new accounts
- purchasing skins
- purchasing in-game goods
- Special event rewards
- External tournament rewards(we used Amazon GameOn)
so in our workflow as a sample
EventHook for XYZ
requireOnce("CurrencyModule")
Currency.Add( player, Currency.Type.Gold, 100, "GamePlay-SecondPlace");
I'm concerned about the idea that either I would have to copy and paste common code to the head of any hook isn't viable. If I need to change the code it's not viable to go through every point.
The global properties sound interesting, but if it's not built for lots of modules and this kind of use. Since I need to run eval every time I'm concerned about the jit time. I'm concerned I would break the server pretty quick. Is there any kind of memory cache in BrainCloud. GS had a memory cache where we could store js objects such as pseudo-classes. Sorry, I'm not trying to do too many comparisons. I'm just trying to figure out how to bring over some of my tools I did for myself without smashing the entire system
Although currency is really simple. However, in my case, I would rather run a region territory control module and break that up into two modules. one to manage territory data so that the board can be broken into different games and the other being the actual game logic.
The 20 to 25k is fine. GameSparks I think we may have had a 10k limit when we started.
I really appreciate your time in helping me understand BrainCloud.