Best Way to Organize Game Levels

I’m working on a new word-puzzle app, and I’m wondering if there’s a better way to organize the puzzles that will make up the app than what I’m doing now, which is having thousands of JSON files.

Our previous apps are grid-based word searches, so each puzzle file contained, among other things a 2D array representing the letter grid. It was critical for the puzzles to be human-readable, so having each level be its own JSON file made sense. The new app’s puzzle files will be significantly simpler- a table with three or four values, and human readability is not nearly as important.

Given that there will be ultimately 10,000 puzzles in the app, is there an advantage to setting the whole thing up as a database instead of individual files?

I’m not quite sure where your question is.

For databases, you can use SQLite or use a JSON to save the relevant information of all other JSON files.

My question is, which is a better approach- SQLite or a ton of JSON files?

Well, JSON is much easier to work with whilst in development. You could then load these to SQLite for production if you want or maybe have a master JSON with all your levels in.

My preference is to not have a local DB layer and stick to JSON as it is just easier all round really.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.