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 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Play Tic Tac Toe against the computer.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
This game allows you to play Tic Tac Toe against the computer.
Play in your browser
The game is also built for the browser with pygbag and served at https://tic-tak-toe.play.danielstephenson.dev, alongside the other games at https://danielstephenson.dev/play. Nothing needs to be installed: the page loads Python and pygame compiled to WebAssembly, then asks for a click or tap to start. The board and buttons work with a mouse or a tap on a phone. There is no Quit button in the browser build (closing the tab is how to leave).檢視完整 README ↗This game allows you to play Tic Tac Toe against the computer.
The game is also built for the browser with pygbag and served at https://tic-tak-toe.play.danielstephenson.dev, alongside the other games at https://danielstephenson.dev/play. Nothing needs to be installed: the page loads Python and pygame compiled to WebAssembly, then asks for a click or tap to start. The board and buttons work with a mouse or a tap on a phone. There is no Quit button in the browser build (closing the tab is how to leave).
To build and serve it locally:
python3 -m pip install pygbag==0.9.3
python3 -m pygbag --build src
python3 -m http.server 8000 --bind 127.0.0.1 --directory src/build/web
then open http://127.0.0.1:8000 (pygbag looks for its packages on a local CDN when the page is served from localhost, so the address matters). src/main.py is the browser entry point; src/tictactoe.py stays the desktop one. The build output in src/build/ is not committed.
For the browser, every screen draws one frame per pass and yields to the event loop with await asyncio.sleep(0), and the one-second pauses use await asyncio.sleep(1), so the screens, the cell handlers and the win check are coroutines. A button is pressed by the left-button press event that lands on it, once per click or tap (a browser tap delivers its press and release in the same frame, so the vendored src/Graphik.py's held-button check is not used for pressing). Presses made during the one-second pause before an end screen are discarded, because Play Again is drawn over the bottom-middle cell.
pip install -r requirements.txt
python3 src/tictactoe.py
The tests use pytest and run headlessly, so no display is required. They run the screens and handlers with asyncio.run and replace asyncio.sleep, so nothing actually waits.
pip install -r requirements-dev.txt
python3 -m pytest
.github/workflows/ci.yml runs the tests on every push to master and every pull request, then launches the game under the dummy SDL drivers to confirm it starts and keeps running.
.github/workflows/browser.yml runs on the same events and builds the browser version with pygbag, checking that src/build/web/index.html was produced. On a manual run (workflow_dispatch), or on a push to master once the repository variable ARCADE_ENABLED is true, it deploys the build to arcade with arcade-deploy, as version <version.txt>+g<short commit>; the upload token is the ARCADE_TOKEN secret.
You can find the support discord server here.
| Name | Main Contributions |
|---|---|
| Daniel Stephenson | Creator |