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 |