@maco-online/paint-tanks-rules 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { PAINT_TANKS_ONLINE_GAME, PAINT_TANKS_STATE_EVERY, PAINT_TANKS_TEAM_SIZE
3
3
  /** Paint Tanks as the room server hosts it: up to five players on one team against the dust tanks. */
4
4
  export const paintTanksRoomGame = {
5
5
  id: PAINT_TANKS_ONLINE_GAME,
6
- protocolVersion: 1,
6
+ protocolVersion: 2,
7
7
  maxMembers: PAINT_TANKS_TEAM_SIZE,
8
8
  tickRate: PAINT_TANKS_TICK_RATE,
9
9
  stateEvery: PAINT_TANKS_STATE_EVERY,
@@ -11,6 +11,10 @@ export const paintTanksRoomGame = {
11
11
  idleInput: { d: -1, f: false, x: Number.NaN, y: Number.NaN, n: 0 },
12
12
  // A tap of fire carried by an input that the newest one overtook within the same tick still fires.
13
13
  mergeInput: (pending, next) => ({ ...next, f: pending.f || next.f }),
14
+ // Each browser drives its own tank and claims where it ended up, one claim per tick. Played as they arrive, claims
15
+ // bunched by a wobbly link moved the tank in starts and stops on teammates' screens; queued, it moves as it was
16
+ // driven, at the cost of up to six ticks (100 ms) of delay on a bad link and one on a steady one.
17
+ inputPlayout: { maxTicks: 6 },
14
18
  inputSchema: paintTanksInputSchema,
15
19
  settingsSchema: paintTanksSettingsSchema,
16
20
  profileSchema: paintTanksProfileSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maco-online/paint-tanks-rules",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "The pure Paint Tanks rules (simulation, levels, AI, wire protocol, prediction) and its Maco room definition",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "sideEffects": false,
13
13
  "maco": {
14
- "protocolVersion": 1
14
+ "protocolVersion": 2
15
15
  },
16
16
  "exports": {
17
17
  ".": {
@@ -27,7 +27,7 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@maco-online/online-core": "0.1.0"
30
+ "@maco-online/online-core": "0.2.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "zod": "^4.1.12"