summaryrefslogtreecommitdiff
path: root/engine/utils/dictionary.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-09-05 22:28:11 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-09-05 22:28:11 -0600
commit6708160cec15ccd4a79979ed8ba79310fbd9285f (patch)
treef716105066534b901399f2f2e5423c7caf7a773d /engine/utils/dictionary.ts
parentd19da30f6dbf316bf89355b9b840a6d77e5435ec (diff)
downloadjumpstorm-6708160cec15ccd4a79979ed8ba79310fbd9285f.tar.gz
jumpstorm-6708160cec15ccd4a79979ed8ba79310fbd9285f.zip
add compression to engine messagesHEADmain
Diffstat (limited to 'engine/utils/dictionary.ts')
-rw-r--r--engine/utils/dictionary.ts56
1 files changed, 56 insertions, 0 deletions
diff --git a/engine/utils/dictionary.ts b/engine/utils/dictionary.ts
new file mode 100644
index 0000000..5a19c6d
--- /dev/null
+++ b/engine/utils/dictionary.ts
@@ -0,0 +1,56 @@
+// basically a list of common strings between network components to help in compression
+// can't be longer than 254 "words"
+export default [
+ '{',
+ '}',
+ ',',
+ '"',
+ "'",
+ ',',
+ '1',
+ '2',
+ '3',
+ '4',
+ '5',
+ '6',
+ '7',
+ '8',
+ '9',
+ '0',
+ '.',
+ 'Map',
+ '[',
+ ']',
+ 'BoundingBox',
+ 'args',
+ 'height',
+ 'width',
+ 'name',
+ 'body',
+ 'Velocity',
+ 'Control',
+ 'Component',
+ 'NEW_ENTITIES',
+ 'REMOVE_ENTITIES',
+ 'UPDATE_ENTITIES',
+ 'NEW_INPUT',
+ 'REMOVE_INPUT',
+ 'boundingBox',
+ 'dTheta',
+ 'id',
+ 'Forces',
+ ':',
+ 'control',
+ 'controllableBy',
+ 'dimension',
+ 'rotation',
+ 'forces',
+ 'velocity',
+ 'center',
+ 'dCartesian',
+ 'x',
+ 'y',
+ '"body":[{"args":{',
+ 'controlVelocityComponent',
+ '"boundingBox":{"center":'
+];