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.
15 lines
590 B
JavaScript
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)
|