barkour/js/consts.js
w1n5t0n 2f60136b36 feat: initial Barkour — movement-PvP dog fighting game
5 dogs with distinct movement physics, seeded procedural arenas with
traps and mineable powerups, smash-style knockback/stocks combat,
local 2P and P2P netplay (PeerJS room keys), procedural art and sfx,
headless sim smoke tests.
2026-06-10 14:26:58 +02:00

15 lines
590 B
JavaScript

// Shared constants for sim + render. Logical resolution is exactly the tile grid.
export const TILE = 12, GW = 80, GH = 45;
export const W = GW * TILE, H = GH * TILE; // 960 x 540
// Tile types
export const T = { EMPTY: 0, SOLID: 1, PLAT: 2, SPIKE: 3, PAD: 4, CRYSTAL: 5 };
// Input bitmask
export const B = { L: 1, R: 2, U: 4, D: 8, JUMP: 16, ATK: 32, SPC: 64, ITM: 128 };
export const ITEMS = ['ball', 'bomb', 'shield', 'boost', 'heal'];
export const GRAV = 0.42, MAXFALL = 9.5;
export const STOCKS = 3;
export const SNAP_EVERY = 2; // host sends a snapshot every N sim ticks (30/s)