Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 89-OpenCode-Projects/03-asteroids/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Project

- Vanilla HTML5 Canvas clone of the arcade game Asteroids. No dependencies, no build step, no bundler, no manifest, no tests.
- `index.html` mounts a fixed 800×600 canvas and loads `game.js`, which holds all game logic in a single file.
- `index.html` mounts a fixed 1600×1200 canvas and loads `game.js`, which holds all game logic in a single file.
- Run by opening `index.html` directly in a browser, or serve the directory (`npx serve .`) and visit `http://localhost:3000`.

## Code layout (`game.js`)
Expand Down
4 changes: 2 additions & 2 deletions 89-OpenCode-Projects/03-asteroids/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
const W = 800;
const H = 600;
const W = 1600;
const H = 1200;

// ── Input ─────────────────────────────────────────────────────────────────────
const keys = {};
Expand Down
2 changes: 1 addition & 1 deletion 89-OpenCode-Projects/03-asteroids/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</style>
</head>
<body>
<canvas id="canvas" width="800" height="600"></canvas>
<canvas id="canvas" width="1600" height="1200"></canvas>
<script src="game.js"></script>
</body>
</html>