Anticheese / Cataclysm

A post-apocalyptic roguelike.
1 stars 1 forks source link

Offload data into special data files #2

Open roysmeding opened 11 years ago

roysmeding commented 11 years ago

Offload raw data from the source code into separate files in some sort of domain-specific language (think Dwarf Fortress raws).

This includes, among other things:

Anticheese commented 11 years ago

Cataclysm stores all its object information in its code. Needing to compile the game to add new items is annoying.

Also, spawn locations for items are dependant on a few linked lists that are easy to break. So, moving to raws or something similar can be done with making the code more robust in mind.

roysmeding commented 11 years ago

The way I see it, there's two solutions here.

  1. Have a library do the parsing, and interface to that to build data structures
  2. Write our own parser

The first option seems preferrable by far to me, and I think libconfig may be a decent option here. I've worked with it before, and while it is made for config files, it is generic enough that I think it will make our life a lot easier.