Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by artfabrique · Aug 01, 2013 at 11:27 AM · mobiledatabasejsonxmlsqlite

Game Database. SQLite, XML, JSON or PlayerPrefs?

Hi guys! Basically the question is in the title: What is the best way to store game data if:

  1. It is levels data

  2. Items data

  3. Initial game settings

  4. Player profiles

  5. Social data cache

and

  1. Data should be updatable via network (new levels, new items)

  2. There should be some kind of pro-level editor for this database.

  3. There should be way to link (somehow) game resources to DB items. For example new level prefabs and item textures should be easily linked to DB fields.

  4. It's mobile project (iOS/Android)

Any ideas or even may be live examples

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Lovrenc · Aug 01, 2013 at 11:28 AM 0
Share

I feel forum is more appropriate for these kind of questions.

avatar image artfabrique · Aug 01, 2013 at 11:36 AM 0
Share

Lovrenc, done! Here is forum thread: http://forum.unity3d.com/threads/193909-Game-Database-SQLite-X$$anonymous$$L-JSON-or-PlayerPrefs

avatar image artfabrique · Aug 01, 2013 at 03:43 PM 0
Share

I've created a feature request http://feedback.unity3d.com/unity/all-categories/1/hot/active/3537--native-game-database-engine-and- Vote if you want it too!

1 Reply

· Add your reply
  • Sort: 
avatar image
4

Answer by Deeweext · Aug 01, 2013 at 05:11 PM

Hi Artfabrique,

It depends a lot on how flexible you want it, what platform and what scale.

1) PlayerPrefs are very fast, native and easy to use, they just save some values, strings or such along with the game, but they are not very database alike, but it works well for things like 'remember my username' on login screens for example. Also on web-player they are limited in size.

2) XML is written out as a text document, not quite the database yet, but it is easy to implement, and easy to import/export values to, there's an example of the wiki just google xml + unity, there's both a js and c example you can backwards engeneer. XML is good for configuration files, that you can change outside of the game, in a slightly good way. Json is slightly the same as this though there are some native differences. Also XML can be tricky on phone, you need to use some xml-lite libs, but it's do-able.

3) SQL is the online, real database solution. But it require a lot more work to implement, and it require you to actually know what you're doing, there's no easy drag n drop solution. But for large databases, it is the best of these options, and it is good for lookups.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image artfabrique · Aug 01, 2013 at 05:55 PM 0
Share

Hi @Deeweext, As i said it's mobile project (iOS/Android) and System.X$$anonymous$$L is not a good solution for that (size + bugs on iOS) PlayerPrefs are very hardly editable place. I have 12630 in-game items and quite huge qeo-data for levels. And as for "SQL" - it's SQLite but not SQL. It's not online. It's local DB engine.

So may be there is some ready-to-go all-in-one solution? $$anonymous$$oney is not the problem. Time is the problem )

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Project feasibility 1 Answer

Datasource for C# Android game 0 Answers

Embedded mobile database with server sync 0 Answers

how to make the build in android which can access the local database sqlite 0 Answers

Can gameobject be exported as unity3d form? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges