question

Justin avatar image
Justin asked

Where to begin for Mobile implementation and what to focus on?

Hello.


We are excited about what PlayFab Game Services, Analytics and Live Ops offers for our games. We are developing exclusively on Mobile (Android and iOS platforms). We focus specifically on the racing game genre. The main things we will be implementing in our game are: Leaderboards, Achievements, IAP (Google, Apple), Virtual Currency, Cloud Saves (with or without redundancy with Google Cloud or iCloud), and possibly Multiplayer.


For Authentication, we wanted to use Google Play and GameCenter respectively because we feel these are the most used and requested by our players for ease of use and familiarity. We will possibly be adding other connections such as Facebook for friends lists at a later time. Due to the complexity of Auth Flow for users that cancel recoverable logins and established users adding devices and or reinstalling we have cut out Google Play login for now. This is because PlayFab does not yet use the current GPS anonymous login calls and when checking for previous PlayFabID linked to Google the auth cannot be used twice in the same session by calling LoginWithGoogleAccount(false) then later calling LoginWithGoogleAccount(true) or LinkGoogleAccount() to create the user. Could somebody shed some light on this issue?


For Achievements, we were going to use Google Play and GameCenter because the SDK's make it so easy to use without building a custom system for it. It would be nicer if PlayFab could share/feed the data for these so it could be tracked inline instead of called explicitly to PlayFab and the other services. Is there a suggested way to do Achievements inside PlayFab?


For Leaderboards, I am not sure how to do this with PlayFab other using PlayerData variables exchanged from the client and the Game Manager. Is this just a matter of using raw data "playerScore" to check for highest in the Game Manager? If not what is the suggested way to do this?


For IAP, we would like to use Google Play and App Store, so Playfab validation sounds great, but seems very complicated from initiating the purchase, to the hand off to PlayFab, to the Validation, to the granting of items/VC in PlayerData, and finally recieving the callback on the clients. A few of the tutorials have looked at this from a high level, but there are no flow guides about how these transactions work that I could find. Could someone point me to a worked out example of the process without having to deconstruct UnicornBattle?


I have spent countless hours (months) trying to reverse engineer some of your old examples and watching and rewatching your dated video tutorials as well as using the documentation. I have been all over the PlayFab site, GitHub, inside the examples, on Youtube, etc. Does PlayFab have a Mobile path flow drawn out for these services? are there specific Tutorials that address these things specifically for my needs? To be honest I have had to listen to the Tutorials at 0.75 speed because the speaker is talking so quickly and glossing over things that they must think are trival for them. I do appreciate how the API calls do follow a standard template which is why I have even been able to get this far. :(


I would be willing to say that the majority of the users trying to implement BaaS are not large companies with 50+ empoyees, nor are they seasoned back-end server programmers. Our team is three brothers.. We have been able to release games with some success using strictly Google Play Services and App Store/Apple SDK's, but it was and has been far from ideal when trying to track users/purchasing/etc.


Is there a timeline for when PlayFab / Azure will get back to video tutorials and specific flow documentation? We really like the potential of your services, but the implementation is not easy or guided enough so that our small team can use them to the full potential in our game yet. Any suggestions or links to sources outside of PlayFab that have guides would be helpful too so we can see different use cases and implementation. Its just been a frustrating experience so far. Thank you for your time.

Player DataTitle DataIn-Game EconomyAuthenticationandroid
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

For the authentication:

The auth flow is complicated and basically it depends on your requirement. There is detailed step by step tutorials about sign-in with google play in unity here. Thus, we still recommend you to read the best practice of login bases article here, in which there is a well-documented authentication work flow to illustrate the process.

For the achievement:

Playfab has only one build-in steam achievement API named AwardSteamAchievement. In your case, a simple achievement function can be realized via player Segmentation, and then reward users via executing Cloud Script. Otherwise, the 3rd party SDK is your best choice. Alternatively, please see @Brendan ‘s reply on a related question here.

For the leaderboard:

The data in leaderboard is sourced from player’s statistics (please see in your game manager, players-> [your player] -> statistics ), you can use API like UpdatePlayerStatistics to upload data. statistic data in a leaderboard will be overridden by a larger data by default, but you can edit the leaderboard settings (aggregation method) in game manager. More information is provided in this documentation.

For IAP:

Unfortunately, we currently do not provide very detailed IAP video tutorials for developers. You can see documentations about google play purchase here. Unicorn battle is a very good sample and in my point of view, read unicorn battle source code is very necessary for study, you can directly see the script source code on the github, and it is important to know the basic logic of it.

Gaming project is tough work, before you start your own project, you should have a clear map on your knowledge base, and set a series of goals to achieve. It’s better to keep track on our blog website, where new features and latest tutorials are posted.

8 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Justin avatar image Justin commented ·

Thank you for your reply and the links provided. Some of these will sure help some of the questions I have. I realize it is not really PlayFab's responsibility to train customers in the basics of game design and coding. Serialization (what/how) is an example where the novice game dev may have issues; myself included :). Maybe a short primer section for these fundamentals could be very useful to new/novice programmers, because without these PlayFab integration just won't work. If there were a section like this the team could spend less time replying to the same questions of this sort, as all customer service people know it can be frustrating, monotonous, and time-consuming.

0 Likes 0 ·
Andy avatar image Andy ♦♦ Justin commented ·

One of the issues with spending a lot of time on some of the "basics" in PlayFab documentation would be that it makes things harder to consume for more experienced developers who just want to get to the PlayFab-specific stuff. In an ideal world, maybe you could select an experience level and we'd tune the docs appropriately.

Realistically, I think we could probably do a better job of linking to other resources for some of those basics. For example, here's a reasonable explanation of JSON serialization: https://www.c-sharpcorner.com/article/json-serialization-and-deserialization-in-c-sharp/. It's specifically for C#, though, which will be helpful to some people but not others.

0 Likes 0 ·
Justin avatar image Justin commented ·

"Unicorn battle is a very good sample and in my point of view, read unicorn battle source code is very necessary for study, you can directly see the script source code on the github, and it is important to know the basic logic of it."

This is exactly what I have been trying to do. However, even though the code is somewhat modular in UB the system is so expansive that the core cannot be easily diserned.

If you take PF_Authentication for instance, it has many dependant scripts that lead to more dependant scripts. I have tried to separate the core from the messaging system, bridge, dialog controller, and on and on just so I can get a picture of what is required for core functionality. It is either that or write the entire system from scratch by seach and find for each API call or function that we want to try and implement. I have been doing both which is very time consuming above just normal game funtionality. Maybe my approach is wrong?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Justin commented ·

It depends on your requirement. Either way, it will be a process of learning. Modular auth system will make it easier for maintenance when you are involved in a larger project. For now, for your indie game studio, you can reduce some functions according to your need.

0 Likes 0 ·
Andy avatar image Andy ♦♦ Seth Du ♦ commented ·

Samples versus demos is an interesting discussion. Sometimes you're torn between crafting code that's easy to follow versus code that sets a good example. Modularity is one such example of this trade-off. In your own projects, you'd always favor writing reusable code. In our UB demo app, it often does (though sometimes not as consistently as I'd like). That comes at the experience of readability of the code, especially when you're trying to use it as a reference for a specific topic.

We're working on more samples and demos that are going to attempt to navigate that balance a bit better. For now, feel free to ask specific questions when you're confused about topics.

0 Likes 0 ·
Show more comments
Justin avatar image Justin commented ·

Comments in the videos like "Its rather trival" and "this is simple" and "is real easy" are relative to the skill of the coder. Most of the instruction has been presented in a way that assumes the customer has the same experience level as ther presenter. It could be i'm just an idiot.. :(

0 Likes 0 ·
Andy avatar image Andy ♦♦ Justin commented ·

That's good feedback for the next set of tutorial videos we produce. Thanks!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.