game-preset-arcade
Arcade game preset — preconfigured runtime with score, lives, levels, and collision
1 2 3 4 5 6 7 8 9 10 11
import { ConfigBuilder, ArcadeRuntime } from '@sbx/game-preset-arcade';
const config = new ConfigBuilder()
.setGrid(20, 20)
.setSpeed(5)
.setLives(3)
.build();
const runtime = new ArcadeRuntime(config);
runtime.onScoreChange = (score) => updateUI(score);
runtime.onGameOver = (finalScore) => showLeaderboard(finalScore);About
Ready-to-use arcade game configuration. Bundles a game state manager (score, lives, level progression), collision detection, sprite animation helpers, and standard arcade mechanics (powerups, enemy waves, difficulty scaling). Drop it into a Game component as a preset for instant arcade-style gameplay.
Public API
| Name | Kind | Signature |
|---|---|---|
| ArcadeRuntime | type | class ArcadeRuntime — score, lives, level, update(dt) |
| ArcadeState | type | class ArcadeState — playing, paused, gameOver, highScore |
| ConfigBuilder | type | class ConfigBuilder — setGrid(), setSpeed(), setLives(), build() |
| arcadePreset | const | const arcadePreset: GamePreset |
Dependencies
Imports (2)
Rendering engine — PixiJS-based game renderer with grid, backgrounds, and visual effects
Input manager — unified keyboard, mouse, and touch input handling for games
Related Packages
Svelte game framework — Game component shell with lifecycle, loop, and renderer integration
Rendering engine — PixiJS-based game renderer with grid, backgrounds, and visual effects
Input manager — unified keyboard, mouse, and touch input handling for games