A Snake game with queued input, correct collision rules, swipe controls, a saved high score and a retro monitor look.
A Snake game with queued input, correct collision rules, swipe controls, a saved high score and a retro monitor look.
7 models tried this prompt on a first try; 6 passed. Showing 4.
Build "CRT SNAKE": a playable Snake game in pixel-art style with a retro CRT monitor look, using plain JavaScript and Canvas 2D. Use a fixed random seed of 61 for food positions so every new game is the same. LOOK - A 24 by 24 cell board centered on screen, as large as fits, with each cell at least 12px on an iPhone in portrait. - Colors: background #050A05, snake #39FF14 with a slightly brighter head #B6FF9E, food #FF3B3B, grid lines #0F2A0F. - A CRT effect: visible horizontal scanlines, a slight screen curve or vignette at the corners, and a soft green glow. The board must stay sharp and readable through it. - Title "CRT SNAKE" top center, at least 28px, readable in any frozen frame. Below it, "Score: N" and "Best: N". GAMEPLAY (the stress test) - The snake starts 3 cells long in the center, moving right, at 8 moves per second, getting faster by 0.5 moves per second for every 5 food eaten (max 16). - Controls: arrow keys and WASD on desktop. Swipe on touch. Pressing the opposite direction never kills the snake instantly, and two quick key presses within one move are both kept in order. - Eating food adds exactly 1 cell to the length and exactly 1 to the Score, and new food never appears on the snake. - Hitting a wall or the snake's own body ends the game. A "GAME OVER - tap or press Space" screen appears, and the game restarts cleanly from it. - "Best" is saved in localStorage and survives a page reload. - P or a pause button pauses and resumes. CHECKLIST 1. One index.html file, opens with zero console errors. 2. Score goes up only when the snake eats food, by exactly 1 each time. 3. Reversing direction never causes an instant death. 4. Food never spawns on the snake. 5. Walls and self-hits end the game, and restart works. 6. Swipe controls work on iPhone, and Best survives a reload. 7. The CRT scanlines and glow are visible, and the board is still crisp. RULES FOR EVERY BUILD - Output ONE self-contained file named index.html: inline CSS and JS, any library only from a public CDN, no other files, no build step. Add <link rel="icon" href="data:,"> so there is no favicon 404. - It must open straight from disk in desktop Chrome and on an iPhone in Safari, fill the screen, and resize cleanly with no scrollbars. - Zero console errors or warnings on load and while interacting. - Animation runs on requestAnimationFrame and stays smooth (about 60fps on a laptop). WORK LOOP (do this yourself before answering) 1. Build the file. 2. If you can run code, open it in a browser, read the console, take screenshots at 3 s and 6 s, and test the interactions. If you can't run code, mentally trace the code against the checklist line by line. 3. Mark every checklist item PASS or FAIL. Mark PASS only when it is visibly true on screen, not just present in the code. 4. Fix every FAIL and recheck. Repeat until all items pass. 5. Final answer: the complete index.html in ONE code block, output once, then the checklist with PASS/FAIL. Nothing else.
Built one? Post it on X and tag @wikiwaynePost on X