-
Notifications
You must be signed in to change notification settings - Fork 0
JSON Content System
garrison hinson-hasty edited this page Apr 30, 2021
·
25 revisions
There's a lot of "stuff" that needs to be represented in the world, so having an automatic content loading system is super convenient. The content system loads data from JSON files in the assets folder, and saves them to be used and reused. It also tries to provide helpful messages when something is missing, it isn't perfect but will catch most mistakes. Currently textures in textures.c and blocks in block_gen.c are loaded using the system.
| Key | Status | Type | Possible Values |
|---|---|---|---|
| name | required | string | |
| path | optional | string | path without file ending; defaults to name |
| type | required | string | sprite, texture, voxel, connected, sheet |
| transparent | required* | bool |
*voxels and sprites are never transparent, they will always be false
| Key | Status | Type | Possible Values |
|---|---|---|---|
| name | required | string | |
| texture | optional | string | texture name; defaults to block name |
| collision | optional | string | none, custom, default; defaults to default |
| bbox | optional* | bbox | [float[3], float[3]] |
*required for custom collision