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

create nyan - yet another notation #28

Closed
2 tasks done
TheJJ opened this issue Oct 27, 2014 · 18 comments
Closed
2 tasks done

create nyan - yet another notation #28

TheJJ opened this issue Oct 27, 2014 · 18 comments
Labels
area: nyan Involves our data description language/database nice new thing ☺ A new feature that was not there before
Milestone

Comments

@TheJJ
Copy link
Member

TheJJ commented Oct 27, 2014

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:

@TheJJ TheJJ added the nice new thing ☺ A new feature that was not there before label Oct 27, 2014
@franciscod
Copy link
Contributor

whoever has progress on this please push it!

@andrekupka
Copy link
Member

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

@andrekupka andrekupka self-assigned this Nov 4, 2014
@andrekupka
Copy link
Member

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

@franciscod
Copy link
Contributor

cool! thanks!

@franciscod
Copy link
Contributor

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
}

@andrekupka
Copy link
Member

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.

@franciscod
Copy link
Contributor

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

@franciscod
Copy link
Contributor

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

@TheJJ
Copy link
Member Author

TheJJ commented Nov 4, 2014

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.

@andrekupka
Copy link
Member

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.

@franciscod
Copy link
Contributor

Okay, that pretty much sums it up :)

@TheJJ
Copy link
Member Author

TheJJ commented Mar 23, 2016

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 :)

@TheJJ TheJJ added this to the nyan milestone Mar 23, 2016
@TheJJ TheJJ added the area: nyan Involves our data description language/database label Oct 16, 2016
@TheJJ TheJJ mentioned this issue Feb 6, 2017
10 tasks
@TheJJ
Copy link
Member Author

TheJJ commented Apr 5, 2017

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

@franciscod
Copy link
Contributor

niceee!! openage goes to academia!

@TheJJ TheJJ removed this from the nyan milestone Apr 5, 2017
@elnabo
Copy link
Contributor

elnabo commented Apr 8, 2017

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

@janisozaur
Copy link
Contributor

@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

@elnabo
Copy link
Contributor

elnabo commented Apr 8, 2017

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

@TheJJ TheJJ added this to the Modding API milestone May 13, 2017
@TheJJ
Copy link
Member Author

TheJJ commented Aug 1, 2017

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.

@TheJJ TheJJ closed this as completed Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nyan Involves our data description language/database nice new thing ☺ A new feature that was not there before
Projects
None yet
Development

No branches or pull requests

5 participants