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.