A Snake game built with Pixi.js and vanilla JavaScript (ES modules).
ES modules require a local server. Any of these options will work:
Option 1 — VS Code
Install the Live Server extension, right-click index.html → Open with Live Server.
Option 2 — Node.js
npx serve .Then open http://localhost:3000 in your browser.
Option 3 — Python
python -m http.server 8080Then open http://localhost:8080.
| Key | Action |
|---|---|
| ← → ↑ ↓ | Move snake |
| Mode | Description |
|---|---|
| Classic | Game over on wall or self collision |
| God mode | Snake passes through walls and itself |
| Walls | Each food eaten spawns a random wall cell |
| Portal | Two foods on field — eating one teleports the snake to the other |
| Speed | Snake speeds up by 10% on each food eaten |
- Pixi.js v7 — WebGL 2D rendering
- Vanilla JavaScript — ES modules, OOP, no build tools