youre-the-os: A game where you are a computer's OS

Title: youre-the-os: A game where you are a computer’s OS

标题:youre-the-os:一款让你扮演电脑操作系统的游戏

You’re the OS! This is a game where you are the operating system of a computer. As such, you have to manage processes, memory and I/O events. Make sure not to leave processes idling for too long, or the user will get really impatient and reboot you! You can play the game here: https://plbrault.github.io/youre-the-os Also available on itch.io. 你就是操作系统!在这款游戏中,你将扮演一台电脑的操作系统。你需要管理进程、内存和 I/O 事件。千万别让进程闲置太久,否则用户会失去耐心并重启你!你可以在这里游玩:https://plbrault.github.io/youre-the-os,该游戏也已上架 itch.io。

Prerequisites Python 3.14 The project is not guaranteed to work with other versions. If needed, use pyenv to install the required version without impacting your system globally. pipenv An empty .venv directory at the root of the project 先决条件 Python 3.14 本项目不保证在其他版本下能正常运行。如有需要,请使用 pyenv 安装所需版本,以免影响你的系统全局环境。 pipenv 在项目根目录下创建一个空的 .venv 目录。

Usage The main branch can be unstable. For a stable version, checkout a release tag. Install dependencies: pipenv sync —dev Run as a desktop app: pipenv run desktop Run web version: pipenv run web 使用方法 主分支(main branch)可能不稳定。如需稳定版本,请检出(checkout)发布标签(release tag)。 安装依赖:pipenv sync —dev 以桌面应用运行:pipenv run desktop 运行网页版:pipenv run web

Run sandbox mode The sandbox mode allows you to skip the menu and immediately run a custom stage. It is provided for development purposes. First, you need to create a sandbox configuration file. An example is provided in src/sandbox/sample.py. It is recommended to store your configuration file in that same src/sandbox directory. Files added to that directory will be ignored by Git. Next, run the following command, replacing sandbox.sample by the Python module path from src to your own configuration file (for instance, if your file is src/sandbox/myConfig.py, the module path will be sandbox.myConfig): pipenv run sandbox sandbox.sample 运行沙盒模式 沙盒模式允许你跳过菜单,直接运行自定义关卡。该模式仅供开发使用。首先,你需要创建一个沙盒配置文件。src/sandbox/sample.py 中提供了一个示例。建议将你的配置文件存放在同一个 src/sandbox 目录下。添加到该目录的文件将被 Git 忽略。接下来,运行以下命令,并将 sandbox.sample 替换为你从 src 开始的 Python 模块路径(例如,如果你的文件是 src/sandbox/myConfig.py,则模块路径应为 sandbox.myConfig): pipenv run sandbox sandbox.sample

Run with an automated script: (Original implementation by @Wiguwbe) WARNING: Running automation scripts (including the provided example) may cause rapidly changing colors on the screen. pipenv run auto <script.py> [args]

to get all the available options

pipenv run auto —help See automation/skeleton.py for information on how to write your script. 使用自动化脚本运行:(最初由 @Wiguwbe 实现) 警告:运行自动化脚本(包括提供的示例)可能会导致屏幕颜色快速闪烁。 pipenv run auto <script.py> [args]

获取所有可用选项

pipenv run auto —help 有关如何编写脚本的信息,请参阅 automation/skeleton.py。

Build web version without running: pipenv run web build Create web.zip archive for itch.io: pipenv run web archive Run linter: pipenv run pylint Run unit tests: pipenv run pytest 构建网页版(不运行):pipenv run web build 为 itch.io 创建 web.zip 压缩包:pipenv run web archive 运行代码检查:pipenv run pylint 运行单元测试:pipenv run pytest

Contributing Pull requests that address open issues labeled bug or help wanted are welcome. If you use AI, please ensure your agent follows all instructions in AGENTS.md. If you have an idea for an improvement to this game, please share it in the Discussions tab. 贡献 欢迎提交针对标记为“bug”或“help wanted”的开放问题的 Pull Request。如果你使用 AI,请确保你的智能体遵循 AGENTS.md 中的所有说明。如果你对改进游戏有任何想法,请在 Discussions 标签页中分享。

License Copyright © 2023-present Pier-Luc Brault pier-luc@brault.me This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/. 许可证 版权所有 © 2023-至今 Pier-Luc Brault pier-luc@brault.me 本程序是自由软件:你可以根据自由软件基金会发布的 GNU 通用公共许可证(GPL)条款重新分发和/或修改它,无论是版本 3,还是(由你选择)任何后续版本。本程序的分发是希望它有用,但没有任何保证;甚至没有对适销性或特定用途适用性的默示保证。有关详细信息,请参阅 GNU 通用公共许可证。你应该已随本程序收到一份 GNU 通用公共许可证。如果没有,请参阅 https://www.gnu.org/licenses/。

Asset Licenses The game icon/logo is a modified version of an image by Muhammat Sukirman published under the Creative Commons Attribution License 3.0. Emojis used in the game are from OpenMoji. They are published under the Creative Commons Attribution-ShareAlike License 4.0. The image used in the Game Over screen is by Aleksandar Cvetanović. It was published on Pixabay prior to January 2019, and as such, is available under the Creative Commons Zero (CC0) License according to Pixabay’s Terms of Service. The primary font used in the game is named VT323, and was designed by Peter Hull. The secondary font is named Victor Mono and was designed by Rune Bjørnerås. Both are published under the Open Font License. 资源许可证 游戏图标/Logo 是 Muhammat Sukirman 所创作图像的修改版本,该图像根据知识共享署名 3.0 许可证发布。游戏中使用的表情符号来自 OpenMoji,根据知识共享署名-相同方式共享 4.0 许可证发布。游戏结束(Game Over)屏幕中使用的图像由 Aleksandar Cvetanović 创作。该图像于 2019 年 1 月之前发布在 Pixabay 上,根据 Pixabay 的服务条款,它适用于知识共享零(CC0)许可证。游戏中使用的主要字体名为 VT323,由 Peter Hull 设计。次要字体名为 Victor Mono,由 Rune Bjørnerås 设计。两者均根据开放字体许可证(Open Font License)发布。