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.