Sounds like that black mirror multi-part episode "White Christmas".
I found that even on the easy level, the number of processes keeps growing slowly, and there isn't enough CPU time to keep all processes satisfied. I feel like the game is inherently setting you up for failure. Here is the script if anyone wants to play with it:
// ==UserScript==
// @name Auto-play "You're the OS!" game
// @include https://plbrault.github.io/youre-the-os/
// ==/UserScript==
(async function() {
const IO_EVENTS = {x: 160, y: 25};
const CPUS = 4;
const CPU1 = {x: 50+46, y: 50+42};
const SQUARE = {w: 64+5, h: 64+5};
const PROCESS = {x: 50+46, y: 155+42};
const PROCESS_ROWS = 6;
const PROCESS_COLS = 7;
let cnv = document.querySelector("body > canvas");
while (cnv.width != 1280 || cnv.height != 720)
await new Promise(res => setTimeout(res, 100));
while (true) {
const pixels = new Uint32Array(cnv.getContext("2d").getImageData(0, 0, cnv.width, cnv.height).data.buffer);
function getPixel(x, y) { return pixels[y * cnv.width + x]; }
if (getPixel(IO_EVENTS.x, IO_EVENTS.y) == 0xFF808000);
await pressKey("Space");
let cpuStatuses = [];
for (let i = 0; i < CPUS; i++) {
const p = getPixel(CPU1.x + SQUARE.w * i, CPU1.y);
cpuStatuses.push(
p == 0xFF000000 ? 1 :
p == 0xFF9A9B9B ? 2 :
p == 0xFF00FF00 ? 3 :
p == 0xFFE6D8B0 ? 4 :
0);
}
let processStatuses = [];
for (let r = 0; r < PROCESS_ROWS; r++) {
for (let c = 0; c < PROCESS_COLS; c++) {
const p = getPixel(PROCESS.x + SQUARE.w * c, PROCESS.y + SQUARE.h * r);
let s =
p == 0xFF000000 ? 1 :
p == 0xFF9A9B9B ? 2 :
p == 0xFF00FF00 ? 3 :
p == 0xFF00FFFF ? 4 :
p == 0xFF00A5FF ? 5 :
p == 0xFF0000FF ? 6 :
p == 0xFF00008B ? 7 :
p == 0xFF000050 ? 8 :
0;
if (s >= 3)
processStatuses.push({r, c, status: s});
}
}
processStatuses.sort((a, b) => a.status - b.status);
for (let i = 0; i < cpuStatuses.length; i++) {
if (cpuStatuses[i] < 1)
continue;
if (cpuStatuses[i] >= 2)
await pressKey("Digit" + "1234567890".charAt(i));
const p = processStatuses.pop();
if (p !== undefined)
await clickMouse(PROCESS.x + SQUARE.w * p.c, PROCESS.y + SQUARE.h * p.r);
}
await new Promise(res => setTimeout(res, 300));
}
async function clickMouse(x, y) {
const rect = cnv.getBoundingClientRect();
const opts = {
bubbles: true,
clientX: rect.left + x * rect.width / 1280,
clientY: rect.top + y * rect.height / 720,
};
cnv.dispatchEvent(new MouseEvent("mousemove", {...opts, buttons: 0}));
cnv.dispatchEvent(new MouseEvent("mousedown", {...opts, buttons: 1}));
cnv.dispatchEvent(new MouseEvent("mouseup", {...opts, buttons: 0}));
await new Promise(res => requestAnimationFrame(res));
}
async function pressKey(code) {
cnv.dispatchEvent(new KeyboardEvent("keydown", {code, bubbles: true}));
cnv.dispatchEvent(new KeyboardEvent("keyup", {code, bubbles: true}));
await new Promise(res => requestAnimationFrame(res));
}
})();Like has someone invented a novel scheduler or sorting algorithm?
Nice work! I have a kid trying to learn about OSes right now and I think this can be helpful for him
What I didn't like, is the tutorial is separate from the game. It would be awesome imo, if there's a tutorial stage where the game is explained hands-on (maybe pausing the game with explainers, until I start to get how to play) Otherwise I have to memorise the instructions before trying the game.
Regardless, amazing little game.
Since when have games become more about just completing boring tasks and not about using your mind and dexterity to kill evildoers? Hell, the original Space Invaders was 100x more fun then this, and all we had to do was press a button to kill advancing aliens.
You have all kind of games, some that are actual programming, some that are purely reflexes and dexterity, some that are in between.
> Since when have games become more about just completing boring tasks and not about using your mind and dexterity to kill evildoers
I encourage you to browse Steam a bit if you are asking this.
Is Monopoly about skill? Chance? Or just scratching that itch of getting more tokens than the other person?
I love TIS-100, but at some point I realized I was studying the user manual for a fictional computer, trying to learn it's fictional assembly language, to optimize some multicore data flows.... and decided I should probably get paid for doing that in real life instead.
The marketing and management of IT always had this fixation with replacing people. It always has been the wrong answer and the real value always came from making people better.
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.

.venv directory at the root of the projectThe 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
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
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.
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
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.
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/.
sudo systemctl reboot --firmware
shutdown /r /t 0 /fw
These reboot directly into BIOS.
For Windows CMD+R menu, run it by pressing CTRL+SHIFT+Enter (elevates to admin). You may have to do it twice for some unknown reasons after reinstalling the OS.
Game could start with a single CPU and 2-3 processes and then all this comes on top step by step and you can automate it away through tech tree.
If I wanted logic flow embedded in a game then I’d want it in an environment that’s far removed from traditional programming. Such as building contraptions in Minecraft.
(I enjoy more arcade style)
The games track things like cycles taken to complete the task, size/area of the machine, and cost. Those scores are shown on separate leaderboards and optimizing for one can come at the cost of another (e.g. faster machines may be bigger and/or more expensive).