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,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Testing out text adventure creation and saving/loading.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A short console text adventure, written to try out text adventure creation and saving/loading.
Python 3, standard library only. (It was written for Python 2 and ported to Python 3 when it was put in the browser.)
python3 maincode.py
The game may be started from any working directory; the save path is resolved relative to maincode.py itself.
Answers are typed at the > prompt; case and surrounding spaces do not matter (yes, YES and Yes are the same answer).
YES or NO — whether a save file exists, whether to enter the cave, and whether to open the chestDOWN or LEAVE — at the hole in the chestSAVE — at any decision after the opening question, to save progress and quitAny other answer ends the game with That wasn't an option!. A save made earlier is kept, so answering YES to the opening question next time resumes from it.
Ending input (Ctrl-D, or Ctrl-Z then Enter on Windows) or pressing Ctrl-C quits the game without saving.
Progress is written to savefile.txt beside maincode.py — the copy tracked in this repository. Typing SAVE records the name of the decision the player stopped at, and answering YES to the opening question resumes from it. Answering YES when that file is empty or absent is not an error; the game reports that no save was found and starts from the beginning. Whitespace around the saved decision name is ignored; any other contents, or a save file that can't be opened or isn't text, are reported as an unreadable save file, and answering NO starts a new game, which clears it. If the save file can't be written (for example, the game is in a read-only directory), a new game still starts with a warning that saving won't work, and typing SAVE reports that the game couldn't be saved instead of crashing. Because the file is tracked, playing the game leaves a modification in the working tree; git checkout -- savefile.txt discards it.
The tests in tests/ play the game with scripted answers and check every ending, saving and loading. They use only the standard library and save to a temporary file, so savefile.txt is left untouched:
python3 -m unittest discover -s tests -t .
The same game, unmodified, runs in a browser tab under tak's console runtime (Python via Pyodide): https://cave.play.danielstephenson.dev, listed with the rest at danielstephenson.dev/play. To build and serve it locally (needs tak installed):
python3 web/build_zip.py
python3 -c "from tak.web.serve import main; main(root='.', title='Cave')"
Pushes to master deploy it to arcade (.github/workflows/browser.yml).
Licensed under the Stephenson Software Non-Commercial License (Stephenson-NC). See LICENSE.