开发者

android SQLite vs Flat Files

开发者 https://www.devze.com 2022-12-29 09:38 出处:网络
im creating a game right now and im a bit stuck on how to implement storage of levels. i need to be able to download level files from the internet ota. im not so familiar 开发者_如何学JAVAwith transfe

im creating a game right now and im a bit stuck on how to implement storage of levels. i need to be able to download level files from the internet ota. im not so familiar 开发者_如何学JAVAwith transferring files ota, but i have some experience with databases (mysql). what would be a better way of storing the game's level data?


Using sqlite will definetely decrease the time you spend coding, thus you can focus your effort in what is more important: the logic of the game. What you are going to store is simple data, then it won't worth the effort to use another method to save that info.


There are a lot of reasons to use a DB.

If you have data that is only read from and never change (except total overwrite), please think of using flat files. A database may be an overkill in this scenario.

BTW, please consider putting the files in the external storage - it can help the user maintain low app memory - especially if the data files are big.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号