BlueGit

timfa questward

Files

questward / shared / protocol / constants.js

constants.js

constants.js 2.7 KiB Download Raw
1export const CHUNK_SIZE = 16;
2export const REGION_CHUNKS = 4;
3export const SPRITE_SIZE_PX = 16;
4export const PIVOT_FROM_BOTTOM_PX = 8;
5export const VISIBLE_CHUNK_RADIUS = 1;
6
7export const DEFAULT_CHUNK_LOADER = Object.freeze({
8 simulationRadiusChunks: 1,
9 regionLoadRadius: 1
10});
11
12export const CHUNK_RUNTIME_STATE = Object.freeze({
13 dormant: "dormant",
14 simulating: "simulating"
15});
16
17export const REGION_RUNTIME_STATE = Object.freeze({
18 unloaded: "unloaded",
19 resident: "resident"
20});
21
22export const WORLD_YEAR_OFFSET = 1200;
23
24export const DEFAULT_WORLD_SETTINGS = Object.freeze({
25 walkTilesPerSecond: 2,
26 simulationTickHz: 20,
27 shopPriceLerpDurationMs: 60 * 60 * 1000,
28 groundItemDespawnDurationMs: 10 * 60 * 1000,
29 regionUnloadGracePeriodMs: 30 * 1000,
30 defaultGroundTypeId: 1,
31 characterDeletionDelayMs: 24 * 60 * 60 * 1000,
32 nightDarkness: 0.72,
33 chatMaxCharacters: 100,
34 bloomThreshold: 0.35,
35 bloomSoftKnee: 0.3,
36 bloomIntensity: 1.35,
37 bloomBlurSize: 3,
38 bloomSaturation: 1.15,
39 bloomColorPreserve: 0.35,
40 bloomDilate: 2,
41 bloomScales: 2,
42 bloomHalfRes: 1
43});
44
45export const GAIT = Object.freeze({
46 walk: "walk",
47 run: "run"
48});
49
50export const SEX = Object.freeze({
51 male: "male",
52 female: "female"
53});
54
55export const MessageType = Object.freeze({
56 hello: "HELLO",
57 session: "SESSION",
58 error: "ERROR",
59 characterList: "CHARACTER_LIST",
60 createCharacter: "CREATE_CHARACTER",
61 selectCharacter: "SELECT_CHARACTER",
62 scheduleDeleteCharacter: "SCHEDULE_DELETE_CHARACTER",
63 cancelDeleteCharacter: "CANCEL_DELETE_CHARACTER",
64 leaveWorld: "LEAVE_WORLD",
65 enterWorld: "ENTER_WORLD",
66 moveTo: "MOVE_TO",
67 setGait: "SET_GAIT",
68 chunkSnapshot: "CHUNK_SNAPSHOT",
69 chunkDelta: "CHUNK_DELTA",
70 unsubscribeChunk: "UNSUBSCRIBE_CHUNK",
71 entitySpawn: "ENTITY_SPAWN",
72 entityMove: "ENTITY_MOVE",
73 entityDespawn: "ENTITY_DESPAWN",
74 worldStatus: "WORLD_STATUS",
75 editorLoadChunk: "EDITOR_LOAD_CHUNK",
76 editorChunk: "EDITOR_CHUNK",
77 editorSaveChunk: "EDITOR_SAVE_CHUNK",
78 editorSaveSettings: "EDITOR_SAVE_SETTINGS",
79 editorLoadSettings: "EDITOR_LOAD_SETTINGS",
80 editorSettings: "EDITOR_SETTINGS",
81 editorApplyRevision: "EDITOR_APPLY_REVISION",
82 friendRequest: "FRIEND_REQUEST",
83 friendAccept: "FRIEND_ACCEPT",
84 friendDecline: "FRIEND_DECLINE",
85 friendRemove: "FRIEND_REMOVE",
86 friends: "FRIENDS",
87 chatSay: "CHAT_SAY",
88 chatBubble: "CHAT_BUBBLE",
89 dropItem: "DROP_ITEM",
90 pickupItem: "PICKUP_ITEM",
91 equipItem: "EQUIP_ITEM",
92 unequipItem: "UNEQUIP_ITEM",
93 inventory: "INVENTORY",
94 groundItemAppear: "GROUND_ITEM_APPEAR",
95 groundItemDespawn: "GROUND_ITEM_DESPAWN",
96 entityAppearance: "ENTITY_APPEARANCE",
97 openBank: "OPEN_BANK",
98 bankSnapshot: "BANK_SNAPSHOT",
99 bankDeposit: "BANK_DEPOSIT",
100 bankWithdraw: "BANK_WITHDRAW",
101 claimInheritance: "CLAIM_INHERITANCE"
102});
103