Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Normalizing serialization format
07-05-2014, 05:14 AM, (This post was last modified: 07-05-2014, 05:39 AM by NaN.)
Normalizing serialization format
Not a priority, but still something that is a maintenance burden is that we are using 4 different text serialization formats:

1. graphics gl3: nested tables and lists, ordered, verbose, hard to read/modify

2. graphics gl2: tables (sections), table lists (multiple sections with the same name), unordered (sections and section entries order doesn't matter)

3. car/gui/settings: nested tables, no table lists, unordered

4. track objects list: table list with implicit keys, no nesting, ordered, hard to read/modify

I'd like to see a single text and binary format to contain this proliferation.

If it wasn't for the poor readability I'd go for gl3 format. My current preference is thus to extend car/gui/settings format to support table lists, but also enforce element order like in the gl3 format, as this massively simplifies serialization.

There is also the issue of default values. Should it be allowed to leave out entries, like it is right now with car and gui and gl2 configs? It allows more compact configs but hides elements.

I am using comments in gl2 files to track the defaults for example:
;light = sun
;camera = default
;cull = true
;clear_color = false
;clear_depth = false
;write_color = true
;write_alpha = true
;write_depth = postprocess ? false : true
;depthtest = postprocess ? disabled : lequal
;blendmode = disabled

Any preferences here (verbose vs defaults)?

I will provide conversion scripts to the new format where needed.

I missed a fifth one for track roads, formatted list of values... Tongue

Forum Jump:

Users browsing this thread: 1 Guest(s)