• Stars
    star
    211
  • Rank 186,867 (Top 4 %)
  • Language
    C++
  • License
    Other
  • Created over 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Typesafe hierarchical key-value database with inheritance and dynamic patching 😺

nyan - yet another notation

just make it meta-meta-meta.

nyan is a data description language, It is a mixture of python, json, patch, wml, yaml and some new ideas.

It stores hierarchical objects with key-value pairs in a database with the key idea that changes in a parent affect all children.

We created nyan because there existed no suitable language to properly represent the enormous complexity of storing the data for openage.

The main focus is readability and moddability.

github stars #sfttech on matrix.org

The foundation of nyan:

Technology Component
C++20 nyan core
Flex Tokenizer generator
CMake Build "system"
Humans Doing it wrong all the time

How?

Let's assume we have a fun λ half-life strategy game.

The game engine provides some functionality which is exposed by nyan.

# This is the content and mod API of the Engine:

Unit():
    hp : int
    animation : file

Building():
    hp : int
    creates : set(Unit)
    model : file

Using this, the base game pack provides actual game content:

# base_game_data.nyan

OverwatchSoldier(Unit):
    hp = 50
    animation = "./assets/soldier.ani"

Strider(Unit):
    hp = 2100
    animation = "./assets/strider.ani"

CombineCitadel(Building):
    hp = 9001
    creates = {OverwatchSoldier, Strider}
    model = "./assets/lambda_hq.mdl"

Citizen(Unit):
    hp = 60
    animation = "./assets/male09.ani"

# gordon is a citizen with more hp
Gordon(Citizen):
    hp += 40
    animation = "./assets/gordon.ani"

RebelHQ(Building):
    hp = 5000
    creates = {Citizen, Gordon}
    model = "./assets/lambda_hq.mdl"

Now, let's create a mod that adds the overwatch elite and gives the striders even more hp.

# elite_strider_mod.nyan

# create a new unit:
OverwatchElite(Unit):
    hp = 70
    animation = "./assets/coolersoldier.ani"

# change the strider:
ChangeStrider<Strider>():
    hp += 1000

# change the citadel to build the elite:
AddElite<CombineCitadel>():
    creates += {OverwatchElite}

# create a mod that informs the engine about its patches
StriderEliteMod(Mod):
    name = "Add the elite and make striders stronger"
    patches = {AddElite, ChangeStrider}

When the engine activates the mod ("applies the patches"), the combine citadel can create the new unit and the strider is stronger.

The fun begins if you now create a mod that mods the mod. Which is totally possible with nyan.

Specification

Read the specification.

Current State of the Project

nyan is fully functional and can be used in your project. Please make us aware of your needs/experiences in our chat!

We try to keep the API stable, but there's still some unknowns and need-to-change features.

Please submit bugs and feature requests (and patches) on GitHub!

Dependencies, Building and Running

Operating System Build status
Debian Sid Todo: Kevin #11
  • How do I get this to install on my box?

  • Waaaaaah! It

    • crashes
    • spams all kinds of shit on the screen
    • my girlfriend dumped me because I debugged for nights

All of those observations are intended, not bugs.

To get rid of them, recompile with --dont-segfault --shut-up --new-girlfriend.

If this still does not help, try the contact section or the bug tracker.

Development Process

How does contributing work here?

The documentation is also in this repo:

  • Code documentation is embedded in the sources for Doxygen (see doc readme).
  • Have a look at the doc directory. This folder tends to outdate when code changes.

Contact

If you have the desire to perform semi-human interaction, join our Matrix chatroom!

For ideas, problems, ..., use the issue tracker!

If it's a problem with the usage of nyan in openage, head over there.

License

GNU LGPLv3 or later; see copying.md and legal/LGPLv3.

We know that probably nobody is ever gonna look at the copying.md file, but if you want to contribute code to nyan, please take the time to skim through it and add yourself to the authors list.

More Repositories

1

openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
Python
12,550
star
2

sftdyn

Self-hosted dyndns/dynamic DNS server and updater for bind
Python
256
star
3

sticker

Some of the stickers might unsettle you. 🔓
136
star
4

abrechnung

Payment tracking and money splitting for groups 💸
TypeScript
124
star
5

kevin

A simple-stupid self-hostable continuous integration service. 🙈
Python
110
star
6

openage-data

Free (as in freedom) media files for openage.
54
star
7

openage-masterserver

Lobby and matchmaking server for openage in Haskell
Haskell
52
star
8

sftmumblebot

Mumble/IRC text chat bridge 🎤 💌
Python
48
star
9

wirespider

Wireguard Mesh VPN - automatic tunnel and authorization management 🕸
Rust
35
star
10

stiefelsystem

Boot your operating system on a different hardware device via network 👢
Python
34
star
11

videoscreen

Play submitted links with mpv on a videowall 🎥
Python
24
star
12

xautocfg

Automatic keyboard repeat rate configuration for new keyboards
C++
18
star
13

sftscrollbugfixer

Fix the Age of Empires II (TC, HD, DE) scroll bug with a DLL injection
C++
13
star
14

cyberbot

Chatbot for the Matrix Protocol, supporting encryption and plugins.
Python
13
star
15

emacs-elaiza

Chat interface and library for interacting with different LLMs via Emacs.
Emacs Lisp
11
star
16

ceph-mount

Pure-Python CephFS mount helper
Python
7
star
17

openage-pr

openage website and public relations content
CSS
7
star
18

gentoo-overlay

sft overlay - Gentoo package overlay for SFT projects and more 🐧
Shell
6
star
19

splash

gtk3 python speedreading program
Python
6
star
20

sftbackup

simple periodic backup tool based on borgbackup and snapper
Python
6
star
21

abrechnung-legacy-2a

payment and debt management tool for semi-enterprise-grade resource planing. superseeded by https://github.com/SFTtech/abrechnung
JavaScript
5
star
22

aiomatrix

Matrix client API for Python asyncio
Python
4
star
23

starlit-emacs

Deep blue and colorful emacs theme like a clear night sky 🌃
Emacs Lisp
4
star
24

openage-data-3dmodels

3d models for openage assets
4
star
25

openage-modding

openage content creation guidelines
Python
4
star
26

cooputils

When working in a shell collaboratively using tmux, this collection of scripts can be used to automatically switch to a 'coop' user and choose a TMUX session.
Python
4
star
27

openage-debian

Debian packaging files for openage
3
star
28

openage-blog

Development blog for openage
CSS
3
star
29

sftmake

simple make system in python
Python
3
star
30

sftkit

Software Development Kit for SFT projects
TypeScript
2
star
31

sftbot

State of the art artificial intelligence to perform various cutting-edge cloud-based enterprise tasks.
2
star
32

openage-webdoc

openage online documentation
HTML
2
star
33

sftutils

shell utilities to complement coreutils, moreutils and beyond
Python
2
star
34

factorioplanner

Web interface for planning factories in factorio
1
star
35

kerbmath

mathematic helper software for kerbal space program
Python
1
star
36

dirtreeflattener

Useful when organizing huge directory structures. Unpacks archives and removes unnecessary subdirectory layers.
Python
1
star
37

kicad-lib

Common KiCAD lib for SFT hardware projects
Python
1
star
38

nyan-vscode

Visual Studio Code extension for creating nyan code
1
star
39

flow3rtron

Tron for the CCC Flow3r
Python
1
star
40

openage-kevin

kevin environment for building openage
1
star
41

kevin-win-setup

Tools to automatically download and prepare a free Windows VM for kevin.
Makefile
1
star