Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-sonuga/bare-metal-blasterball
The blasterball game, from scratch
https://github.com/d-sonuga/bare-metal-blasterball
bare-metal game osdev rust uefi x86-64
Last synced: 1 day ago
JSON representation
The blasterball game, from scratch
- Host: GitHub
- URL: https://github.com/d-sonuga/bare-metal-blasterball
- Owner: d-sonuga
- Created: 2022-08-11T18:23:55.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-20T20:27:56.000Z (3 months ago)
- Last Synced: 2024-10-21T00:58:35.437Z (3 months ago)
- Topics: bare-metal, game, osdev, rust, uefi, x86-64
- Language: Rust
- Homepage:
- Size: 7.93 MB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Overview
This is the blasterball game for x86_64 from scratch, no game engine, no OS.
The only external libraries used are the Rust core library (because without this
library, Rust wouldn't be Rust) and the compiler_builtins library, because the core
library depends on it.More detailed info on how the game works is at https://d-sonuga.netlify.app/game-from-scratch/
![Blasterball Gameplay](https://github.com/d-sonuga/bare-metal-blasterball/blob/assets/blasterball-gameplay.gif)
I had a lot of fun building this project, but it has a lot of loose ends and I won't
be able to get back to those loose ends because of time. The physics is really wonky, ACPI
isn't fully supported and the game itself has only background music but no sound effects.# Running
I developed this on a Linux Fedora 38 system, so if you're on Windows, ..., I don't know what to
tell you.## Requirements
* To run the code, you need a python3 interpreter installed, and I think that should come
with most Linux systems.* Install qemu and OVMF (https://wiki.osdev.org/OVMF) for UEFI emulation
`sudo dnf install qemu edk2-ovmf`
or
`sudo apt install qemu edk2-ovmf`* Copy the OVMF_CODE.fd and OVMF_VARS.fd from the OVMF root directory (`/usr/share/edk2/ovmf` on my system)
to the root of this project* Because of some features I used and decisions I made, you need the
`nightly-2022-08-26` toolchain installed.To install this toolchain: `rustup install nightly-2022-08-26`
## Running in the emulator
* Run the Python script
`python3 run.py`
* When the shell loads in the emulator loads up, type in
`fs0:bootloader.efi`
and hit enter## Running on your machine
* Build the project`python run.py --build-only --release`
* Copy the `bootloader.efi` in target/x86_64-unknown-uefi/debug file to a flash drive
* Shutdown your computer
* Power on your computer again, and open the boot menu
* Choose boot from efi file
* Select the `bootloader.efi` in your flash drive root