https://github.com/patryk27/kartoffels
a game where you're given a potato and your job is to implement a firmware for it
https://github.com/patryk27/kartoffels
fighting-game game mmo real-time risc-v riscv robot rust simulation
Last synced: about 1 year ago
JSON representation
a game where you're given a potato and your job is to implement a firmware for it
- Host: GitHub
- URL: https://github.com/patryk27/kartoffels
- Owner: Patryk27
- License: gpl-3.0
- Created: 2024-06-02T14:17:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-06T17:37:49.000Z (about 1 year ago)
- Last Synced: 2025-05-10T04:03:11.226Z (about 1 year ago)
- Topics: fighting-game, game, mmo, real-time, risc-v, riscv, robot, rust, simulation
- Language: Rust
- Homepage: https://kartoffels.pwy.io
- Size: 6.88 MB
- Stars: 459
- Watchers: 4
- Forks: 9
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kartoffels 🥔
kartoffels is an online game where
you're given a potato and your job is to implement
a firmware for it:


play it in browser or terminal:
ssh kartoffels.pwy.io
---
[build](#build) • [contribute](#contribute) • [license](#license)
---
## name
kartoffel (🇩🇪)
= potato
= slang for _slow machine_
= exactly what kartoffels are!
## build
so you want to launch kartoffels on your own machine? easy!
### using nix
```bash
# step i: clone repository
$ git clone https://github.com/patryk27/kartoffels
$ cd kartoffels
# step ii: create a place for storing kartoffels, server keys etc.
$ mkdir store
# step iii: launch server
$ nix run . -- serve ./store --ssh 127.0.0.1:1314
# step iiii: join the game
$ ssh 127.0.0.1 -p1314
```
note that this only starts the ssh server - if you want to use the web frontend:
```bash
# step iii: launch server (note the `--http` argument)
$ nix run . -- serve ./store --http 127.0.0.1:1313
# step iiii: launch frontend
$ nix run .#web
# step iiiii: join the game at http://localhost:5173
```
### on linux / macos
```bash
# step i: clone repository
$ git clone https://github.com/patryk27/kartoffels
$ cd kartoffels
# step ii: build application
$ cd app
$ cargo build --release
$ cd ..
# step iii: create a place for storing kartoffels, server keys etc.
$ mkdir store
# step iiii: launch server
$ ./app/target/release/kartoffels serve ./store --ssh 127.0.0.1:1314
# step iiiii: join the game
$ ssh 127.0.0.1 -p1314
```
note that this only starts the ssh server - if you want to use the web frontend:
```bash
# step iiii: launch server (note the `--http` argument)
$ ./app/target/release/kartoffels serve ./store --http 127.0.0.1:1313
# step iiiii: launch frontend
$ cd web
$ npm install
$ npm run dev
# step iiiiii: join the game at http://localhost:5173
```
### on windows
i'd suggest installing wsl and following the linux instructions
## contribute
so you want to contribute to kartoffels? easy! -- the code is divided into
roughly three areas:
- all things risc-v (`kartoffels-cpu`),
- all things world-and-bot (`kartoffels-world`),
- all things user-interface (`kartoffels-front`).
so, say:
- if you wanted to introduce support for risc-v compressed instructions, you'd
modify (mostly) `kartoffels-cpu`,
- if you wanted to introduce a new bot peripheral, you'd modify (mostly)
`kartoffels-world`,
- if you wanted to introduce a new challenge, you'd modify (mostly)
`kartoffels-front`.
note that those are just rough examples, different features or fixes might
require touching different places
also:
- use `cargo test --release` and `cargo fmt`,
- some tests (notably those ui-based) utilize snapshots - they take a
"screenshot" (a textshot?) of the current frame and compare it against the
expected frame - you can run `just test-and-bless` to quickly fix such tests
after you e.g. modify a commonly-used ui widget,
- pls don't introduce larger changes (e.g. a new peripheral) without some
discussion first - it might happen that something hasn't been implemented
deliberately and i wouldn't like for people to waste time just to tell them
"sorry, it doesn't fit my vision"
## license
copyright (c) 2024, patryk wychowaniec (`pwychowaniec @at@ pm.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, version 3.
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 .