Lua with custom environment tables (so you can use 'globals' and just do key = value in the file and not expose any functions to the config file) would be readable too.
True, but I didn't even know about Lua when I started and writing a small parser is always a good exercise
I meant Lua as just data representation on disk and for editing. Stuff can still be loaded into dedicated C or C++ structs/classes/whatever at runtime, even a database. And the example is quite contrived and rare and I'd say and probably runs fine enough with pure C++. It might be premature optimization.
Yes but I wanted a clean representation of the data and only load it into memory when I need it. If I wanted to make comparisions like the SQL query I wrote, everything had to be loaded into memory and then compared using C++. Also, finding a certain item is very fast as I use two keys, one for the item type and one for the item id. It's like a hash map inside of a hash map. And, last but not least: Having experience with databases is never wrong ^^. Oh yes, and I make use of type safety and constraints. Also foreign keys: You can't add a convertible component to an item that doesn't exist.
(Image because the forum can't highlight SQL yet
)
For me, it's not really more work as the SQLite interface is quite convenient and I can make use of the database functionality (see above). But to each his own, eh
I'm actually amazed that you use all three, I understand XML is just to parse tmx files probably since most people hate how verbose XML is but still. It's probably bad I think that but a game that uses XML, Lua and sqlite3 instantly feels like a more serious piece of software to me. I like how complete, packed with content and not like a tech demo your game feels, even though I enjoy metroidvania style platformers and design more than this style of platforming. I myself rarely move my projects past the proof of concept stage. I've never released anything I used Lua or my console in I don't think.
Thanks. I count "using all three" also as an exercise. About the proof of concept stage: I think that's a problem all programmer-gamedevs face, we love to implement cool features but when it comes to content and polishing, we're getting bored. I work around this a bit by still adding logic to the game and refactoring the code while creating content.
And thanks for your other tips, I'll check them out
I hope you didn't insert all the items by hand using the command line tool and SQL written by hand.
*cough. Partly. I've written a own small tool that helps me creating dialogues (choices and conditions can get confusing if you have pure Lua code) and it exports the logic to Lua and the text as SQL insert scripts. For the items... yes I write the SQL code myself but it just works for me