File
One file is enough for a first ship.
Engines exist. You do not need one to prove the loop. GameDever’s preview is a single index.html on purpose — itch.io and Cloudflare Pages both eat that file.
What belongs in the file
- Markup — a canvas or a few DOM nodes. A score. A restart control.
- CSS — inline. Dark playfield. Big hit targets on a phone.
- JS — input, update, draw.
requestAnimationFrameor a small interval. Collision. Game over. - Touch — if it only has arrow keys, half the testers bounce off.
- No CDN engines — a preview iframe and a locked-down host both fight extra scripts.
What can wait
Audio, particle editors, accounts, leaderboards on a server, ads. GameHub adds coins later; the first Snake clone does not need them. See the arcade walkthrough.