| 1 | export const CHUNK_SIZE = 16; |
| 2 | export const REGION_CHUNKS = 4; |
| 3 | export const SPRITE_SIZE_PX = 16; |
| 4 | export const VISIBLE_CHUNK_RADIUS = 1; |
| 5 | |
| 6 | export const WORLD_YEAR_OFFSET = 1200; |
| 7 | |
| 8 | export const DEFAULT_WORLD_SETTINGS = Object.freeze({ |
| 9 | walkTilesPerSecond: 2, |
| 10 | simulationTickHz: 20, |
| 11 | shopPriceLerpDurationMs: 60 * 60 * 1000, |
| 12 | groundItemDespawnDurationMs: 10 * 60 * 1000, |
| 13 | regionUnloadGracePeriodMs: 30 * 1000, |
| 14 | defaultGroundTypeId: 1, |
| 15 | characterDeletionDelayMs: 24 * 60 * 60 * 1000 |
| 16 | }); |
| 17 | |
| 18 | export const GAIT = Object.freeze({ |
| 19 | walk: "walk", |
| 20 | run: "run" |
| 21 | }); |
| 22 | |
| 23 | export const SEX = Object.freeze({ |
| 24 | male: "male", |
| 25 | female: "female" |
| 26 | }); |
| 27 | |
| 28 | export const MessageType = Object.freeze({ |
| 29 | hello: "HELLO", |
| 30 | session: "SESSION", |
| 31 | error: "ERROR", |
| 32 | characterList: "CHARACTER_LIST", |
| 33 | createCharacter: "CREATE_CHARACTER", |
| 34 | selectCharacter: "SELECT_CHARACTER", |
| 35 | scheduleDeleteCharacter: "SCHEDULE_DELETE_CHARACTER", |
| 36 | cancelDeleteCharacter: "CANCEL_DELETE_CHARACTER", |
| 37 | leaveWorld: "LEAVE_WORLD", |
| 38 | enterWorld: "ENTER_WORLD", |
| 39 | moveTo: "MOVE_TO", |
| 40 | setGait: "SET_GAIT", |
| 41 | chunkSnapshot: "CHUNK_SNAPSHOT", |
| 42 | chunkDelta: "CHUNK_DELTA", |
| 43 | unsubscribeChunk: "UNSUBSCRIBE_CHUNK", |
| 44 | entityMove: "ENTITY_MOVE", |
| 45 | entityDespawn: "ENTITY_DESPAWN", |
| 46 | worldStatus: "WORLD_STATUS", |
| 47 | editorLoadChunk: "EDITOR_LOAD_CHUNK", |
| 48 | editorChunk: "EDITOR_CHUNK", |
| 49 | editorSaveChunk: "EDITOR_SAVE_CHUNK", |
| 50 | editorSaveSettings: "EDITOR_SAVE_SETTINGS", |
| 51 | editorApplyRevision: "EDITOR_APPLY_REVISION", |
| 52 | editorChangelog: "EDITOR_CHANGELOG" |
| 53 | }); |