保存数据的Andr​​oid游戏云 [英] Save data to cloud in android game

查看:121
本文介绍了保存数据的Andr​​oid游戏云的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要保存在Android游戏中的一些数据(只有几个整数)到云中。数据重新presents游戏内货币,所以它的关键用户不能删除或操纵数据自己。我已经使用谷歌播放服务进行多人,排行榜等。

I'd like to save some data (just a few Integers) to the the cloud in an android game. The data represents the ingame currency, so its critical the user cant delete or manipulate the data himself. I already use google play services for multiplayer, leaderboards etc.

我对谷歌服务的数量弄得有点为数据保存到云端,这样也许有人可以清除了一点东西给我。

I'm a little bit confused by the amount of services google provides for saving data to the cloud, so maybe someone can clear things up a bit for me.

如果我不是看错这些服务不适合我的需要:

If im not mistaken these services dont fit my needs:

  • Google Saved Games (Snapshot)
  • Google Play Services AppState
  • Google Backup Api

他们似乎都可以由用户进行管理,所以他拥有的数据的控制。

It seems they all can be managed by the user, so he has control over that data.

所以我很多各地的其他谷歌服务的加强,但我不是安静知道什么每次做正是:

So i stepped across alot of other google services, but im not quiet sure what each is doing exactly:

谷歌数据存储

谷歌应用程序引擎

谷歌云端储存

据我了解,数据存储再presents一个nonSQL数据库,这是谷歌应用程序引擎管理。谷歌云端储存的是服务,我可以用它来处理应用程序引擎。所有不需要任何书面的后端code的。但似乎云端储存尚未正式发售。

As i understand it, the datastore represents a nonSQL database, which is managed by the Google App Engine. Google Cloud Save is the service i can use to handle the app engine. All without any need of writing backend code. But it seems the cloud save is not yet officially available.

那么,我想知道,如果是在正确的轨道与这些假设IM。我只是想挽救这是不能由用户可管理而是跨越即使该应用程序被卸载或应用程序数据被手动删除设备同步3-5整数值。因此,也许这一切心不是需要并且那里有解决它更简单的方法。所以,这将是我的下一个步骤?注册云端储存试验,或者我可以在一个更简单的方法处理这个问题?

So what id like to know, is if im on the right track with these assumptions. I'm just trying to save 3-5 integer values which are not managable by the user but are synced across devices even when the app is uninstalled or the app data is deleted manually. So maybe this all isnt needed and theres an easier way of solving it. So what would be my next step? Register for the cloud save trial, or can i handle the problem in an easier way?

Thx提前

推荐答案

据我所知,谷歌保存的游戏(快照)可以用来实现自己的目标。我认为,如果你让他用code(例如获得来自谷歌prefab意向快照结果的快照),用户只能对其进行管理,也有方法来获取按标签的单个快照(字符串)对于单个用户(GoogleApiClient连接)。除了谷歌建议您使用快照用于此目的,而不是使用云另存为是在此之上的链接(黄框,说:重要)

As far as I know, Google Saved Games(Snapshots) can be used to accomplish your goals. I think user can only manage it if you let him by code(for example getting the snapshot from the result of the Google prefab Intent for snapshots), there are methods to get a single snapshot by tag(String), for a single user (GoogleApiClient connection). Besides Google suggest you to use Snapshots for this purpose instead of using Cloud Save as is said on the top of this link (yellow box where says: important!)

另外有一种方法如何处理可能的多设备接入的冲突。

Also There's a way how to handle a possible multi-device access conflict.

希望它能帮助

这篇关于保存数据的Andr​​oid游戏云的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆