Using a simple text editor, they are also more readable than XML.
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.
I'd say it would require more code (and there's overhead) to do something like this when using Lua tables.
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. I recently was afraid parsing each line of the original dracula book (I added it as a benchmark/large body of text) in my notes keeping app (another shameless plug - it's called 'botes', I have a github repo too
) would be slow but it works totally fine.
I'm not saying you did something wrong but everytime I get this idea myself, it sounds good on paper (a REAL database that can handle dozens of thousands of elements, cool editor with a GUI and all*, structure data, typesafety and names, constraints in SQL, etc.), but not in practice (I always just go with Lua tables and have few hundred entries in them at best, they are more convenient to edit by hand quickly in notepad++). Same for stuff like Tokyo or Kyoto cabinet, a high performance key value binary databases, good idea on paper and all for file store, but a zip used via physfs beats that in usability and is fast enough too.
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.
Oh, I've never updated the Lua version since I first got it. I guess it's time to do so, thank you
You could also downgrade to 5.1 or 5.2. I myself like 5.1 and even dissected it's code and wrote a paper on it because LuaJIT is compatible with it, it was the biggest jump (5.0 sucked, it had a stop the world GC) and I don't really like the features of 5.2 or 5.3 enough to switch, even though I started in 5.2, I moved to 5.1 for JIT if I ever need it and then read through entire codebase and just stayed there. But I wanted to make my console compatible with 5.1, 5.2, 5.3 and JIT so it should work with all four so you should have no problems.
If you're changing/upgrading you might also look into
http://pugixml.org/ , it's the xml parser I use, it's really nice, DOM style parser with very STL like API. I'm not sure if it's better or worse than tinyxml but it took me a long time to find and it's so good I wish I found it sooner.
That's great, I need one anyway for "cheating" (inserting gold and items into the player's inventory, checking and changing quest states etc.) These functions are already in the API but I got no ingame console - yet. So I'll check it out
Yes, it should be easy to integrate, just drop the sources in your own code and do some init and then update/input/draw as in the example given, feel free to ask (via a PM is best, I might miss the thread post on here, I'm here less and less often lately
) if you have problems or questions. I made it primarily for myself, same as my 'botes' notes app, but I try to spread the word and get other people to use them too.
* By that I mean
http://sqlitebrowser.org/ I hope you didn't insert all the items by hand using the command line tool and SQL written by hand.