1 unstable release
Uses new Rust 2024
| 0.1.0 | Apr 28, 2026 |
|---|
#487 in Game dev
Used in crabmos
110KB
2.5K
SLoC
Atmosim
A library for experimenting with explosive gas mixes of Space Station 14 game. Based on the original Ilya246's atmosim, but rewritten from scratch in Rust.
Usage
Installing
cargo add atmosim
main.rs
use atmosim::prelude::*;
// also this if you want to use optimizer
// use atmosim::optimizer::Optimizer;
API
Should be simple enough:
let engine = Atmosim::new(GameConfig::wizden_pmr());
let mix = engine.create_mixture(
gases! {
Gas::Oxygen => 0.95,
Gas::Plasma => 0.31,
Gas::Tritium => 0.52,
_ => 0.,
},
373.149,
);
let mut tank = GasContainer::new(mix);
tank.step_all();
Check integration tests and reference implementations (crabmos) for more examples.
Features
- optimizer - adds optimizer module and Optimizer, which is basically the search engine for the best gas mix.
- optimizer-rayon - same, but with multithreading.
- serde - makes GameConfig and some other stuff de- and serializable.
- no-std - yes. Incompatible with any of the above.
Progress
- The core simulation engine.
- Wizden gases and reaction effects.
- Gas container explosion logic (both tanks and canisters).
- Maxcap parameter optimizer (argmin).
- Good maxcap parameter optimizer (won't be argmin).
- Measuring maxcap tolerances.
- Legacy reactions (old tritium fire) and old gas tank explosion logic.
- Gases and reactions of various forks.
- Config loading (serde).
- Integration tests.
- Final polishing (whatever this is supposed to mean).
Dependencies
~0.3–2.4MB
~48K SLoC