Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalizing serialization format #131

Open
logzero opened this issue Jul 5, 2014 · 0 comments
Open

Normalizing serialization format #131

logzero opened this issue Jul 5, 2014 · 0 comments

Comments

@logzero
Copy link
Member

logzero commented Jul 5, 2014

Currently we are using 4 different text serialization formats:
graphics gl3: nested tables and lists, ordered, hard to read/modify
graphics gl2: tables (sections), table lists (multiple sections with the same name), unordered(sections and section entries order doesn't matter)
car and gui and settings: nested tables, no table lists, unordered
track objects list: table list with implicit keys, no nesting, ordered

Additionally there is also a binary format used for replays, a binary version of gl3 config format.

I'd like to see a single text and binary format to contain the proliferation listed above.

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:
;[pass]
;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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant