How about ... replacing /edit/*.txt and /data/*.raw with SQLite ?
Collapse
X
-
What about XML? It has at least one C library I know of, and is text based.
Actually, I don't think the edit files need to go, at least not yet. If it's not broken, don't fix it, I guess. And giving Angband a full-blown database would probably be overkill.
I remember when Angband had Lua in it (for no well-defined reason, I gathered). I suppose, if Angband kept Lua it could have used Lua files for edit file replacement in addition to scripting, since Lua was originally defined for data definition and is pretty good at that through its table syntax. I'd leave that to Lua-using variants like T.o.M.E. though.Comment
-
XML can actually be harder to read because all the tags can and linefeeds can prevent something complex like a spellcasting monster from fitting on a single screen.One Ring to rule them all. One Ring to bind them.
One Ring to bring them all and in the darkness interrupt the movie.Comment
-
I think this is an terrible idea.
1. If your only motivation for switching to a database is to improve the readability of the info loading routines, isn't it better to just rewrite or improve the current loading routines rather than start from scratch with a database?
2. Modifying the *_info text files is quick and easy. If you want to make this even easier, it would be just as simple to write an editor for the *_info files as it would be to write an editor for a database.
3. The format of the *_info files is already very easy (and quick) to parse. Tinkerers can write their own utilities to examine these files and extract information. If you switch to a database, however, then any other utility which wants to retrieve this information will also have to link to a bunch of database stuff.
4. For the most part, Angband is free of dependencies on external libraries. Let's keep it that way.
I do agree that removing the .raw files might be nice. I'd be interested in seeing some benchmarks on slower machines loading .raw vs. .txt, as I suspect the speed difference is not big enough to justify keeping separate .raw files. You only load the game once, and IMO simplicity is better than saving 2 seconds of startup time.Comment
-
Besides, where did people get the impression that keeping the .raw files is all about speed? As I explained earlier in the thread, the .raw files enable the game to be shipped without text files and compiled without (most of) init1.c - it seems to be more about size than speed. I could be wrong - I wasn't around when the design decision was made - but the comments in the code hint that size was the first consideration, not speed. Plus, Angband was developed on university machines where tampering was rife, so it's quite possible that neither size nor speed was the primary reason for the .raw files, but tamper-proofing."Been away so long I hardly knew the place, gee it's good to be back home" - The BeatlesComment
-
AndrewThe Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
Comment
-
I'm *not* saying that speed isn't an issue - it is. But I don't think it was the only reason, or even the primary reason, that the raw files were invented."Been away so long I hardly knew the place, gee it's good to be back home" - The BeatlesComment
-
I do agree that removing the .raw files might be nice. I'd be interested in seeing some benchmarks on slower machines loading .raw vs. .txt, as I suspect the speed difference is not big enough to justify keeping separate .raw files. You only load the game once, and IMO simplicity is better than saving 2 seconds of startup time.Comment
Comment