Files
Some_Projects/Prehistorik/constants.js

22 lines
1.1 KiB
JavaScript

'use strict';
// ─── Canvas ──────────────────────────────────────────────────────────────────
const canvas = document.getElementById('gameCanvas');
const ctx = canvas.getContext('2d');
const W = canvas.width;
const H = canvas.height;
// ─── Physics ─────────────────────────────────────────────────────────────────
const GRAVITY = 0.55;
const MAX_FALL = 16;
const JUMP_POW = -12.5;
const WALK_SPD = 4;
const STOMP_BOUNCE = -11; // vy after successful stomp
// ─── Gameplay ────────────────────────────────────────────────────────────────
const ATTACK_FRAMES = 22;
const INVINC_FRAMES = 100;
const WORLD_H = 600;
const COMBO_TIMEOUT = 150; // frames before combo resets
const MAX_COMBO_MULT = 8; // maximum score multiplier