| Crates.io | nightshade |
| lib.rs | nightshade |
| version | 0.6.67 |
| created_at | 2025-11-07 07:40:09.818548+00 |
| updated_at | 2026-01-22 04:06:44.869831+00 |
| description | A cross-platform data-oriented game engine. |
| homepage | https://github.com/matthewjberger/nightshade |
| repository | https://github.com/matthewjberger/nightshade |
| max_upload_size | |
| id | 1921286 |
| size | 4,671,802 |
A cross-platform data-oriented game engine built with wgpu.
Use the nightshade-template to create a new project, or add nightshade to your Cargo.toml:
[dependencies]
nightshade = "0.6.67"
use nightshade::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
launch(MyGame)?;
Ok(())
}
struct MyGame;
impl State for MyGame {
fn title(&self) -> &str {
"My Game"
}
fn initialize(&mut self, world: &mut World) {
world.resources.user_interface.enabled = true;
let camera_position = Vec3::new(0.0, 2.0, 10.0);
let main_camera = spawn_camera(world, camera_position, "Main Camera".to_string());
world.resources.active_camera = Some(main_camera);
}
fn ui(&mut self, _world: &mut World, ui_context: &egui::Context) {
egui::Window::new("My Game").show(ui_context, |ui| {
ui.heading("Hello, world!");
});
}
fn run_systems(&mut self, world: &mut World) {
fly_camera_system(world);
}
}
WebGPU is supported in:
Nightshade is free, open source and permissively licensed! All code in this repository is dual-licensed under either:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in nightshade by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.