BlueGit

timfa questward

Files

questward / shared / protocol / constants.js

constants.js

constants.js 3.1 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 pigeonTakeoffTilesPerSec: 3,
44 pigeonCruiseTilesPerSec: 8,
45 pigeonLandingTilesPerSec: 3,
46 pigeonPhaseTiles: 5
47});
48
49export const GAIT = Object.freeze({
50 walk: "walk",
51 run: "run"
52});
53
54export const SEX = Object.freeze({
55 male: "male",
56 female: "female"
57});
58
59export const MessageType = Object.freeze({
60 hello: "HELLO",
61 session: "SESSION",
62 error: "ERROR",
63 characterList: "CHARACTER_LIST",
64 createCharacter: "CREATE_CHARACTER",
65 selectCharacter: "SELECT_CHARACTER",
66 scheduleDeleteCharacter: "SCHEDULE_DELETE_CHARACTER",
67 cancelDeleteCharacter: "CANCEL_DELETE_CHARACTER",
68 leaveWorld: "LEAVE_WORLD",
69 enterWorld: "ENTER_WORLD",
70 moveTo: "MOVE_TO",
71 setGait: "SET_GAIT",
72 chunkSnapshot: "CHUNK_SNAPSHOT",
73 chunkDelta: "CHUNK_DELTA",
74 unsubscribeChunk: "UNSUBSCRIBE_CHUNK",
75 entitySpawn: "ENTITY_SPAWN",
76 entityMove: "ENTITY_MOVE",
77 entityDespawn: "ENTITY_DESPAWN",
78 worldStatus: "WORLD_STATUS",
79 editorLoadChunk: "EDITOR_LOAD_CHUNK",
80 editorChunk: "EDITOR_CHUNK",
81 editorSaveChunk: "EDITOR_SAVE_CHUNK",
82 editorSaveSettings: "EDITOR_SAVE_SETTINGS",
83 editorLoadSettings: "EDITOR_LOAD_SETTINGS",
84 editorSettings: "EDITOR_SETTINGS",
85 editorApplyRevision: "EDITOR_APPLY_REVISION",
86 friendRequest: "FRIEND_REQUEST",
87 friendAccept: "FRIEND_ACCEPT",
88 friendDecline: "FRIEND_DECLINE",
89 friendRemove: "FRIEND_REMOVE",
90 friends: "FRIENDS",
91 chatSay: "CHAT_SAY",
92 chatBubble: "CHAT_BUBBLE",
93 dropItem: "DROP_ITEM",
94 pickupItem: "PICKUP_ITEM",
95 equipItem: "EQUIP_ITEM",
96 unequipItem: "UNEQUIP_ITEM",
97 inventory: "INVENTORY",
98 groundItemAppear: "GROUND_ITEM_APPEAR",
99 groundItemDespawn: "GROUND_ITEM_DESPAWN",
100 entityAppearance: "ENTITY_APPEARANCE",
101 openBank: "OPEN_BANK",
102 bankSnapshot: "BANK_SNAPSHOT",
103 bankDeposit: "BANK_DEPOSIT",
104 bankWithdraw: "BANK_WITHDRAW",
105 claimInheritance: "CLAIM_INHERITANCE",
106 attack: "ATTACK",
107 cancelAttack: "CANCEL_ATTACK",
108 interact: "INTERACT",
109 combatSwing: "COMBAT_SWING",
110 combatHit: "COMBAT_HIT",
111 combatMiss: "COMBAT_MISS",
112 follow: "FOLLOW",
113 cancelFollow: "CANCEL_FOLLOW",
114 sendPigeon: "SEND_PIGEON",
115 pigeonDispatched: "PIGEON_DISPATCHED",
116 pigeonDelivered: "PIGEON_DELIVERED"
117});
118