Change the ring buffer to Uint32Array

Store only TileRef instead of packed tile+state values
This commit is contained in:
scamiv
2025-11-26 14:36:11 +01:00
parent 314d8ef25a
commit 37315e5fa5
5 changed files with 19 additions and 13 deletions
+5 -1
View File
@@ -662,11 +662,15 @@ export class ClientGameRunner {
if (this.tileRingViews) {
const MAX_TILE_UPDATES_PER_RENDER = 100000;
const tileRefs: TileRef[] = [];
drainTileUpdates(
this.tileRingViews,
MAX_TILE_UPDATES_PER_RENDER,
combinedPackedTileUpdates,
tileRefs,
);
for (const ref of tileRefs) {
combinedPackedTileUpdates.push(BigInt(ref));
}
} else {
for (const gu of batch) {
gu.packedTileUpdates.forEach((tu) => {