Need help with shipyard?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

leudz
267 Stars 22 Forks Other 761 Commits 13 Opened issues

Description

Entity Component System focused on usability and speed.

Services available

!
?

Need anything else?

Contributors list

# 207,891
Rust
HTML
entity-...
data-or...
623 commits
# 105,240
Rust
PureScr...
specifi...
fantasy...
39 commits
# 76,212
mobx-st...
OpenCV
scene-r...
Sass
17 commits
# 648,359
CSS
HTML
entity-...
data-or...
6 commits
# 10,662
Rust
no-std
C
proc-ma...
5 commits
# 89,938
Rust
webasse...
inverse...
vulkan
3 commits
# 122,736
Go
Shell
Markdow...
entity-...
2 commits
# 49,429
Lua
Tensorf...
ode
kmeans-...
2 commits
# 313,990
Vue.js
carouse...
applesc...
CSS
2 commits
# 220,031
Rust
vulkan
elm
entity-...
2 commits
# 71,752
unittes...
Rust
python-...
testing...
2 commits
# 20,472
Rust
asmjs
webwork...
elm
1 commit
# 448,567
C
Shell
Android
CSS
1 commit

Shipyard

Shipyard is an Entity Component System focused on usability and speed.

If you have any question or want to follow the development more closely Chat.

Crates.io Documentation LICENSE

Guide | Demo

Basic Example <!-- omit in toc -->

use shipyard::{IntoIter, View, ViewMut, World};

struct Health(u32); struct Position { x: f32, y: f32, }

fn in_acid(positions: View, mut healths: ViewMut) { for (_, mut health) in (&positions, &mut healths) .iter() .filter(|(pos, _)| is_in_acid(pos)) { health.0 -= 1; } }

fn is_in_acid(_: &Position) -> bool { // it's wet season true }

fn main() { let mut world = World::new();

world.add_entity((Position { x: 0.0, y: 0.0 }, Health(1000)));

world.run(in_acid).unwrap();

}

Small Game Example <!-- omit in toc -->

Inspired by Erik Hazzard's Rectangle Eater.

Play Source

Table of Contents <!-- omit in toc -->

Origin of the name

Assembly lines take input, process it at each step, and output a result. You can have multiple lines working in parallel as long as they don't bother each other.

Shipyards such as the Venetian Arsenal are some of the oldest examples of successful, large-scale, industrial assembly lines. So successful that it could output a fully-finished ship every day.

Shipyard is a project you can use to build your own highly-parallel software processes.

Motivation

I initially wanted to make an ECS to learn how it works. After a failed attempt and some research, I started working on Shipyard.

Specs was already well established as the go-to Rust ECS but I thought I could do better and went with EnTT's core data-structure (

SparseSet
) and grouping model. A very flexible combo.

Cargo Features

  • parallel (default) — enables workload threading and add parallel iterators
  • serde1 — adds (de)serialization support with serde
  • std (default) — lets Shipyard use the standard library
  • thread_local — adds methods and types required to work with
    !Send
    and
    !Sync
    components

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.