Config File Editing

From ETC Public Wiki
Jump to: navigation, search

The importance of config files

The whole game is controlled by configuration files in this project, including all items, weapons, enemies, UIs, maps, levels.

config file format

Since Javascript has its own native JSON parser, we use JSON to write config files.

Here is a short description of JSON from

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

The syntax of JSON, please refer to:

How config files work in game

In the program, the config file is parsed in the right beginning of game. After parsing, the program will load all resources into memory.