orca-scan/punter.js ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple 2D JavaScript game engine that runs in the browser on a single canvas and is easy for beginners to understand.
I want the engine to let me set up a game, preload images and sounds, create scenes like a menu or level, and switch between them cleanly. It should support sprites that can move around, animate from multiple frames, collide with each other, and be easy to draw and update in a game loop. I’d also like basic keyboard input, a debug mode that shows useful info like bounds and FPS, and a few simple helper methods for things like centering, scrolling backgrounds, and destroying sprites.
Please include a small set of example games, a simple homepage or index to launch them, and a clear getting started guide for making a first game. Keep the code straightforward and beginner friendly, because this is meant for learning JavaScript and how game programming works. If you need to check current browser or canvas behavior, look up the latest docs online.
Are you gonna build this?
make sure you review the code using coderabbit