jetcode-scrubjs
v2.3.5
Published
HTML5 Game Library with a Focus on Ease of Learning
Maintainers
Readme
ScrubJS — HTML5 Game Library with a Focus on Ease of Learning
The architecture and naming system are inspired by Scratch, a popular visual programming environment, making ScrubJS intuitive for beginner developers.
Purpose
The library is designed to provide a simple and accessible way to learn the fundamentals of game development, such as:
- Game loop
- Sprite management
- Event handling
- Animation
- Collisions
Advantages
- Multi-scene support
- Built-in collider system and touch detection
- Easy handling of sounds, costumes, and layers
- Debugging tools and collider visualization
- Error display with hints
Quick Start:
const game = new Game(800, 600);
const stage = new Stage();
const cat = new Sprite();
cat.addCostume("cat.png");
stage.forever(() => {
cat.move(5);
cat.bounceOnEdge();
});
game.run();