It seems that YAML is not very conducive to defining IntFiction (IF) games for my IF game engine. I still want to move to something less tedious than XML, so after battling with various options I've decided to create my own notation language. Since I'm the one making it, I'm calling it Norman Notation (*.nrmn).
My needs for NRMN are very simple since I'm replacing a basic XML structure. My rules are:
- Minimal markup. I want it to be very easy to write so that game authoring is fun.
- Not indent dependant. Authors should be able to format their source however they want.
- Easy to nest elements. I need it to be easy to define child/parent relationships just like XML.
My needs for NRMN are very simple since I'm replacing a basic XML structure. My rules are:
- Minimal markup. I want it to be very easy to write so that game authoring is fun.
- Not indent dependant. Authors should be able to format their source however they want.
- Easy to nest elements. I need it to be easy to define child/parent relationships just like XML.
The only types I need right now are:
- Elements. These are 'objects' that can hold any combination of types.
- Properties. These are key/values and can be defined within an element.
- Content. These contain text, and can be multi-line. They can be defined within an element.
- Elements. These are 'objects' that can hold any combination of types.
- Properties. These are key/values and can be defined within an element.
- Content. These contain text, and can be multi-line. They can be defined within an element.
Special characters:
There are only three characters to watch out for:
- Curly brackets {...}
- Square brackets [...]
- Equals = (But only if in properties)
These can be escaped with a backslash \.
There are only three characters to watch out for:
- Curly brackets {...}
- Square brackets [...]
- Equals = (But only if in properties)
These can be escaped with a backslash \.
Example:
{game
name=Dragon Deep
level=0
{game
name=Dragon Deep
level=0
{player
name=Conan
class=Barbarian
name=Conan
class=Barbarian
{weapon
type=Long Sword
[description
The long sword is a two handed weapon.
Its blade is dual-edged.
]
}
}
}
type=Long Sword
[description
The long sword is a two handed weapon.
Its blade is dual-edged.
]
}
}
}
I'm working on building a parser for it now. We'll see how it evolves as I begin to use it.
No comments:
Post a Comment