a37eb14ba5
- Introduced a JSON schema for game levels to validate level data structure. - Added comprehensive tests for tilemap functionalities including collision resolution, tile type retrieval, and level loading. - Enhanced the SyncSystem to manage remote state synchronization and interpolation for smoother gameplay. - Implemented an AudioSystem with tests to ensure audio loading and playback functionality. - Updated NetworkClient to support dynamic WebSocket URLs from environment variables. - Added integration tests for matchmaking and network communication between clients. - Improved RenderSystem to correctly render player nicknames above sprites. Co-authored-by: Copilot <copilot@github.com>
73 lines
1.7 KiB
JSON
73 lines
1.7 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "LevelData",
|
|
"description": "Schema for Zamny Browser game levels",
|
|
"type": "object",
|
|
"properties": {
|
|
"width": {
|
|
"description": "Width of the level in tiles",
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"height": {
|
|
"description": "Height of the level in tiles",
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"tileSize": {
|
|
"description": "Size of each tile in pixels (e.g. 32)",
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"tiles": {
|
|
"description": "Flat array of tile types (0=walkable, 1=wall, 2=water, 3=door)",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 3
|
|
}
|
|
},
|
|
"spawnPoints": {
|
|
"description": "Locations where players can spawn",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"x": {
|
|
"type": "number"
|
|
},
|
|
"y": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": ["x", "y"]
|
|
}
|
|
},
|
|
"entities": {
|
|
"description": "Entities to spawn in the level (enemies, items, etc.)",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"x": {
|
|
"type": "number"
|
|
},
|
|
"y": {
|
|
"type": "number"
|
|
},
|
|
"props": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"required": ["type", "x", "y"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["width", "height", "tileSize", "tiles"]
|
|
}
|