Underground 2 Revived
Play Need for Speed: Underground 2 (2004) in Chrome and Firefox with WebGPU graphics, Web Audio, up to 120 fps widescreen, controller support, free roam and Online races with friends. Fan project, not
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Classic Snake in Python and Pygame, with pause, restart and WASD or arrow controls.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Classic Snake in Python and Pygame, with a neon arcade look - and the same code runs in your browser, compiled to WebAssembly.
Play it in your browser - arrows, WASD, or swipe on a phone.查看完整 README ↗Classic Snake in Python and Pygame, with a neon arcade look - and the same code runs in your browser, compiled to WebAssembly.
Play it in your browser - arrows, WASD, or swipe on a phone.
localStorage in the browser. A corrupt save just starts from zeroasync and yields to the browser every frame, which is what lets pygbag run it as WebAssemblypython -m pip install -r requirements.txt
python src/main.py
(With MSYS2 Python, install Pygame with pacman -S mingw-w64-x86_64-python-pygame instead.)
python scripts/build_web.py # pygbag compiles src/ and copies it into site/game/
python -m http.server 8000 --directory site # then open http://localhost:8000
site/index.html is the arcade-cabinet page that frames the game.
python -m pytest -q # 17 tests on the game logic, run headless
python scripts/record_demo.py # re-records assets/demo.gif
The GIF is recorded by an autopilot that plays the real game headlessly: a breadth-first search finds the shortest safe path to the food each move.
| Action | Keyboard | Touch |
|---|---|---|
| Move | Arrows or WASD | Swipe |
| Start / restart | Space or Enter | Tap |
| Switch mode (between games) | M | Swipe sideways |
| Pause / resume | P | - |
| Quit (desktop only) | Esc | - |
update() moves the snake and decides the outcome; draw() only reads state. That is what lets the tests drive whole games without a window, and the GIF recorder play headlessly.async main loop and the save location; pygbag's platform.window gives Python direct access to the browser's localStorage.