Openage: create nyan - yet another notation

Created on 28 Oct 2014  Â·  18Comments  Â·  Source: SFTtech/openage

_nyan_ is the future data storage format for openage.

It's designed for moddability and human-readability.

Development takes place here:
https://github.com/SFTtech/nyan

Tasks:

nice new thing ☺ nyan

Most helpful comment

To "officially" announce it, my master's thesis is the design and implementation of nyan :tada:

All 18 comments

whoever has progress on this please push it!

I am currently writing down the basic concepts and a detailed documentation of nyan and will push it as soon as possible.

I have pushed a first draft of the nyan documentation which is not yet finished. It can be found in docs/nyan/nyan.md.

cool! thanks!

can we make the comas optional when using newlines?

+ABILITY FIGHT {
    description = "Allows units to fight."
    damage = 20
    ranged = false
}

is clear that the former is equivalent with the following:

+ABILITY FIGHT {
    description = "Allows units to fight.",
    damage = 20,
    ranged = false
}

I would like to keep the commas, mainly because otherwise the parser has to keep track of all whitespaces, which makes implementing it much harder. With the current design of nyan all whitespaces can be ignored.

okay, maybe it can be an improvement later on :)

Chatting with @fr3akout on IRC I was thinking about the possibility of using yaml as an internal transport for both nyan and nyanspec, so we leverage the byte-level parsing to its diverse libraries.

In case of incompatibilities we can make some 'preprocessor' to handle them, so hp += 3 which is invalid yaml becomes hp_INCREMENT: 3 or something like that.

# basic nyanspec

spec ABILITY:
  name: string

spec UNIT:
  abilities: set(ABILITY)

spec TECH:
  fields:
    name: string
  modifies: UNIT

spec UNIT:
  fields:
    hp: int
    abilities: set(ABILITY)

# some instances
UNIT villager:
  hp: 10

TECH loom:
  villager:
    +hp: 4

#dynamic attributes

ABILITY:
  name: string
# any delta can add stuff here
# look ma, no ellipsis!

ABILITY fight:
  description: "Allows units to fight."

# loading time deltas

delta villager:
  +hp: 2

The main problem i see with yaml is that essential parts of our expected features are not included in the language but created implicitly by specially crafted strings like hp_INCREMENT or +hp instead of a hp += val.

Yes, yaml exists and is capable of what we're doing, but it was not designed for storing game assets.
Missing features can be hacked in, but are not part of yaml itself. This is why i would really love to develop nyan as _our_ universal storage format, without having to worry about missing features of an existing language.

Another problem of yaml is, that it allows to describe much more than we actually really want. Thus it is easier to produce game asset decriptions that doesn't make any sense, for example nesting multiple object and delta definitions to an undefined depth. This actually is completly correct yaml-code, while it should not be allowed for openage asset descriptions.
nyan directly forbids such invalid declarations by its syntax specification.

Okay, that pretty much sums it up :)

Soooo, we may have a specification:

https://github.com/SFTtech/nyan/blob/master/doc/nyan.md

head over there and improve it if things are missing :)

To "officially" announce it, my master's thesis is the design and implementation of nyan :tada:

niceee!! openage goes to academia!

Quick question, what is a master thesis and how long does it last ?

@elnabo (master) thesis is a work one has to create to be awarded a degree in a field of science. "Thesis" means the text document, but commonly the term also encompasses all of the derived products: source code, hardware platforms or other things, especially in other fields of studies. It "lasts" forever, as it gets archived by university and sometimes is made available to the public, as per agreement with the school. Perhaps you wanted to ask "how long does it take to create one?": in that case it's usually one or two terms (i.e. half a year or a year), but may, depending on the author, take also less or more time.

See also https://en.wikipedia.org/wiki/Master_of_Science (especially the pat about Germany, where I believe @TheJJ is) and https://en.wikipedia.org/wiki/Thesis

Ok thanks, I was wondering what it was, as I think there is no equivalent in France or at least in my university.

The core nyan implementation should be done by now, some TODOs and mainly optimizations are left.
Next we have to come up with a step-by-step transition plan to integrate it -> #734.

Was this page helpful?
0 / 5 - 0 ratings