For a project I am making a simple RPG turn based game in Android. At the moment I’m struggling to think how I going to implement the saving and accessing of data. The game being an RPG means that I want to save lots of data like stats, items, creatures and characters.
Can I do this using SQlite or would there be a better way?
For a project I am making a simple RPG turn based game in Android.
Share
It sounds like the built-in SQLlite would be very appropriate. Seems like you’ve already laid out in your question, several potential SQL tables. For example, each character could be stored as individual rows of a table, where the columns describe the attributes of each character, many of which may link to rows of other tables. Same goes for users, items etc.
It can be a bit intimidating getting started with SQLlite if you’ve little familiarity with it, but once you’ve worked through a couple of tables and start to form a code base, you’ll find yourself reusing the same/similar queries over and over.
I’m not a database or SQL expert, but from my own experience, try to form as clear an idea as possible of how the data should be structured – all the tables and associations etc – before writing any code. Then as the development proceeds and your initial ideas get revised, try to keep honestly questioning whether your existing data structures are still appropriate, and make any necessary changes as soon as you identify a different data model that makes more sense.
An alternative method would be store information in files, but then you’ll have to invent not just the data structure but also the physical aspects of how that data gets stored within each file.