Show HN: Sprigman – Pac-Man Recreated in a Limited Tile Based JavaScript Engine
a year ago
- #JavaScript
- #Hack Club
- #game development
- Sprig is a tiny construction kit for building tile-based games in JavaScript.
- Created by Hack Club, a global community of teen coders focused on learning through making and sharing.
- Games can be run using the Run button or Shift+Enter.
- New users are encouraged to start with the tutorial and join the #sprig channel on Hack Club Slack for support.
- Games are made up of grids of square tiles, with sprites defined using single-character bitmap keys.
- Sprites can be set as solid to prevent overlap or pushable to allow movement.
- Levels are designed using map templates and can be stored in arrays for multiple levels.
- Input handling includes directional controls (w, a, s, d) and action buttons (i, j, k, l).
- Sprite manipulation includes moving, changing types, and removing sprites.
- Text can be added to the screen with customizable position and color.
- Sprig includes a built-in sound engine for creating and playing tunes.
- The editor includes a heuristic to detect potential infinite loops in code.