cyremur
cyremur
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
So I've tested this compression on the last three gamestates
PS C:\Users\cyremur\oasis-dreams> npx ts-node .\compress.ts
encode: 0.803ms
compress: 6.71ms
decompress: 3.181ms
[lz4] Compressed 45.02KB to 7.59KB (ratio: 0.17)
encode: 0.424ms
compress: 0.879ms
decompress: 0.254ms
[lz4] Compressed 29.43KB to 5.54KB (ratio: 0.19)
encode: 0.552ms
compress: 0.886ms
decompress: 0.33ms
[lz4] Compressed 41.22KB to 7.23KB (ratio: 0.18)
PS C:\Users\cyremur\oasis-dreams> npx ts-node .\compress.ts
encode: 0.803ms
compress: 6.71ms
decompress: 3.181ms
[lz4] Compressed 45.02KB to 7.59KB (ratio: 0.17)
encode: 0.424ms
compress: 0.879ms
decompress: 0.254ms
[lz4] Compressed 29.43KB to 5.54KB (ratio: 0.19)
encode: 0.552ms
compress: 0.886ms
decompress: 0.33ms
[lz4] Compressed 41.22KB to 7.23KB (ratio: 0.18)
Seeing an average ratio of 0.18 Based on those last three playtests and that compression ratio, my bandwitdh per game is about: Uncompressed 43MB Compressed 8MB So if I look at current pricing, that would be UNCOMPRESSED $0.01/game COMPRESSED $0.002/game Honestly, that still feels ok for now and I think I'll just upgrade my account in january and eat the bandwidth cost...
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
And thanks again for all the advice you've already given here.
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
I like the idea of this. However, I have also grown fond to the schema niceties. Is it possible to reuse my schema definition for validation of the uncompressed doc?
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
I think the main issue is just that my gamestate representation is gratuitously verbose for development conveniences and I need to add encoding like chess notation to compress it. The json for the battlefield alone is way to big when it arguably can be downsized to 64bytes for the terrain types and maybe a couple more bytes for hexId to entityId mapping. Really was designed for maximum typescript convenience and takes an awful amount of space. That's what I'm considering quick wins atm. At some point, I could go deep and only selectively load gamestate for the actions that need it and split up everything but that feels like a big challenge and will slow down development. Better encoding will be a data layer only change on the other hand and not touch game logic.
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
Appreciate all the attention you're giving even to more out there use cases like mine by the way 🙂
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
Not really but I'm reconsidering provisioning a little server that just keeps the state in memory and implements its own websocket api. Would be a lot more inconvenient though. Will look into splitting up the state more. But I guess 0.2Mb state * 100 game actions for 20Mb feels ball park correct.
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
also @Clever Tagline if you're interested in the game feel free to DM me
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
No description
25 replies
CCConvex Community
Created by cyremur on 11/29/2024 in #support-community
Index on optional nested properties
Maybe I'm too spoiled by ?. but I expected both variants to resolve to Id<"users"> | undefined
5 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
Thanks for the input, once the game is stable enough (hopefully in like a month) I will start working on the more out there performance improvements.
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
hm I kinda want to have all moves on screen the whole time, implementing this via the pagination concept feels like a bit of a misuse. Like I would ALWAYS have to trigger loadMore as soon as status hits "CanLoadMore"
25 replies
CCConvex Community
Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
No description
25 replies
CCConvex Community
Created by cyremur on 9/19/2024 in #support-community
Convex Auth discord roles
oh yeah, I have discord oauth up and running. I was wondering how to configure it to get extra information
7 replies
CCConvex Community
Created by cyremur on 9/16/2024 in #support-community
convex@latest with vite / convex auth starter kit streamlining
happy to help you improve! will likely dedicate the rest of the year to building on convex, so I'll keep sharing when I stumble 😉
7 replies
CCConvex Community
Created by cyremur on 9/16/2024 in #support-community
convex@latest with vite / convex auth starter kit streamlining
No description
7 replies
CCConvex Community
Created by cyremur on 9/16/2024 in #support-community
convex@latest with vite / convex auth starter kit streamlining
I assume you mean npx @convex-dev/auth ?
7 replies
CCConvex Community
Created by cyremur on 9/16/2024 in #support-community
convex@latest with vite / convex auth starter kit streamlining
npm ERR! 404 Not Found - GET https://registry.npmjs.org/convex-auth - Not found
npm ERR! 404 Not Found - GET https://registry.npmjs.org/convex-auth - Not found
7 replies
CCConvex Community
Created by cyremur on 7/27/2023 in #support-community
How to understand database bandwidth
but then data in dashboard wouldn't be legible anymore whatsoever... that's why it would be super cool to have a minification layer as middleware so that the "decryption" or "de-minification" can run between DB and dashboard as well
36 replies
CCConvex Community
Created by cyremur on 7/27/2023 in #support-community
How to understand database bandwidth
Like I'm itching to write so much boilerplate right now to take this:
controller: 1,
currentAction: 1,
currentMove: 3,
currentPower: 2,
currentToughness: -3,
hexId: 64,
isDead: true,
source: 7,
controller: 1,
currentAction: 1,
currentMove: 3,
currentPower: 2,
currentToughness: -3,
hexId: 64,
isDead: true,
source: 7,
to this:
a: 1,
b: 1,
c: 3,
d: 2,
e: -3,
f: 64,
g: true,
h: 7,
a: 1,
b: 1,
c: 3,
d: 2,
e: -3,
f: 64,
g: true,
h: 7,
to save like 70 extra bytes, cause with 10+ creatures on the field stupid stuff like this can easily shave off another kB
36 replies
CCConvex Community
Created by cyremur on 7/27/2023 in #support-community
How to understand database bandwidth
I still feel like there's a clash between full typesafety and traffic efficiency
36 replies