-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Labels
refactorRelates to code refactoringRelates to code refactoring
Description
Currently, data for all entities of the game are stored in XML format.
Example for an item (located in data/items.xml):
<items>
<bones>
<name>
Bones
</name>
<sprite>
food/bone.png
</sprite>
<info>
<en> The remains of a skeleton... Maybe there is a way to bring it back to life </en>
<zh_cn> 骷髅残骸……也许有办法让它复活 </zh_cn>
</info>
<price>
200
</price>
<category>
None
</category>
</bones>
[... other items]
</items>The issue is this language is not lean enough for such project and for beginners ; it's too heavy for something that deserves to be light.
Some other formats could convey the same amount of information in a simpler way, such as YAML.
Example for the same item in YAML:
items:
- name: Bones
sprite: food/bone.png
info:
en: The remains of a skeleton... Maybe there is a way to bring it back to life
zh_cn: 骷髅残骸……也许有办法让它复活
price: 200It's much shorter!
Other possibility is JSON.
[{
"name": "Bones",
"sprite": "food/bone.png",
"info": {
"en": "The remains of a skeleton... Maybe there is a way to bring it back to life",
"zh_cn": "骷髅残骸……也许有办法让它复活"
},
"price": 200
}]Similar length as YAML.
Metadata
Metadata
Assignees
Labels
refactorRelates to code refactoringRelates to code refactoring