从Android应用商店游戏统计 [英] Store Game Statistics from Android App

查看:144
本文介绍了从Android应用商店游戏统计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些的基本的Java 的经验和很基本的Andr​​oid应用程序开发经验(目前Android电子阅读无线应用开发第一卷)。

I've got some basic Java experience and very basic Android app development experience (currently reading Android Wireless Application Development Volume I).

我想开发一个Android应用程序为跟踪啤酒傍统计(投篮命中率,胜率,连胜拍摄等)。我希望能够保存这些数据,以便我可以显示应用程序中的排行榜,也将数据传输到电脑中进行更复杂的统计分析和永久跟踪。

I'm trying to develop an android app to keep track of Beer Pong statistics (shooting percentage, win percentage, shooting streak, etc.). I want to be able to store this data so that I can display leaderboards within the app and also transfer the data to my computer for more complex statistical analysis and permanent tracking.

我倒是AP preciate上最好/最简单的方法某些输入要做到这一点就...

I'd appreciate some input on the best/easiest way to do this regarding...

1)哪些信息存储?
我想我需要存储用户/玩家的名字,并保持每一个镜头的轨道继续/小姐?什么样的格式将是有效的?

2):当存储呢?
我是否应该提交这些品牌/未命中存储每次拍摄后?或者在游戏结束?我想实现一个返回或撤消按钮来解释的错误。这将如何影响时,我应该存储数据?

2) When to store it? Should I "commit" these makes/misses to storage after each shot? Or at the end of the game? I would like to implement a 'back' or 'undo' button to account for mistakes. How would this affect when I should store the data?

3)如何保存呢?
根据我有限的Andr​​oid应用开发经验,将SQLite数据库是简单易学,合适吗?将存储到谷歌的Excel文档很容易(需要不断的互联网连接,虽然)?将存储的某些其他形式更好?

3) How to store it? Based on my limited android app development experience, would SQLite databases be easy to learn and appropriate? Would storing to a google excel doc be easy (requires constant internet connection, though)? Would some other form of storage be better?

感谢您和OSS!

推荐答案

这是SQL数据库将是你最好的选择,并且在飞行中更改提交到数据库是好的。

An SQL database would be your best bet, and committing changes to the database on the fly is fine.

撤销/重做使用Command对象的设计模式实现最好的。该命令对象可以存储从数据源背出一个交易,他们正在与相关联的用户操作所需的信息。只要将每个用户执行操作(存储他们的命令对象操作的详细信息)的时间推新命令对象压入堆栈,然后弹出堆栈的命令对象,要求他们复归方法,当用户点击撤消。该还原方法使用,当你创建的对象从SQL数据库回退事务中存储的数据。

undo / redo is implemented best using the Command Object design pattern. The command objects can store the information needed to back out a transaction from your data source for the user action they are associated with. Simply push new command objects onto the stack each time the user performs actions (storing details of their action in the command object), and then pop those command objects off the stack and call their revert method when the user hits undo. The revert method uses the stored data from when you created the object to back out the transaction from your SQL database.

维基链接命令模式

这篇关于从Android应用商店游戏统计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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