alu-games-sdk
v1.0.0
Published
Embed browser games with a simple API - compatible with HTML, React, and Node.js
Maintainers
Readme
ALU Games SDK
A unified SDK for embedding browser games into web applications with a simple, consistent API.
What is ALU Games?
ALU Games SDK allows developers to programmatically embed browser games into their web applications. It supports multiple platforms:
- Vanilla JS/HTML - Use directly in any web page
- React - React hooks and components for game embedding
- Node.js - Server-side rendering support for SSR/SSG frameworks
Features
- Simple, unified API for all games
- 50+ built-in games across multiple categories
- React hooks for easy integration
- Full game control (play, pause, resume, fullscreen)
- TypeScript support
- Lightweight and dependency-free core
Quick Start
Vanilla JS
<script src="https://cdn.example.com/alu-games-sdk.min.js"></script>
<div id="game-container"></div>
<script>
await aluGames.init({ basePath: '/games/' });
const game = await aluGames.embedGame('doodle-jump', {
containerId: 'game-container',
width: 800,
height: 600
});
</script>React
import { useGame } from 'alu-games-sdk/react';
function GamePlayer({ gameId }) {
const { instance, status, play, pause } = useGame({
gameId,
width: 800,
height: 600
});
return (
<div>
<div id="game-container" />
<button onClick={status === 'playing' ? pause : play}>
{status === 'playing' ? 'Pause' : 'Play'}
</button>
</div>
);
}ES Modules
import { embedGame, getGames, init } from 'alu-games-sdk';
await init({ basePath: '/assets/games' });
const games = getGames();
const game = await embedGame('minecraft-classic', {
containerId: 'my-game',
width: 1024,
height: 768
});Available Games
The SDK includes 50+ games across categories including:
- Arcade - Doodle Jump, Chrome Dino, Retro Bowl
- Puzzle - 2048, Fireboy and Watergirl, Cell Machine
- Action - Slope, Tunnel Rush, Fall Boys
- Sports - Basketball Stars, Moto X3M
- Simulation - Minecraft Classic, Duck Life, BitLife
- Horror - Five Nights at Freddy's, Backrooms
- And more...
Documentation
For full API documentation, detailed examples, and configuration options, see SPEC.md.
License
MIT
