Skip to content

Commit

Permalink
refactor: migrate to bones framework. (#852)
Browse files Browse the repository at this point in the history
Migrates Jumpy to use the new Bones framework, unifying `jumpy` and
`jumpy_core`, removing the direct dependency on Bevy and moving the
whole game to Bones ECS.
  • Loading branch information
zicklag authored Oct 14, 2023
1 parent 02bf071 commit 1343ad1
Show file tree
Hide file tree
Showing 175 changed files with 5,839 additions and 16,385 deletions.
3,226 changes: 1,124 additions & 2,102 deletions Cargo.lock

Large diffs are not rendered by default.

202 changes: 104 additions & 98 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,103 +7,112 @@ license = "MIT OR Apache-2.0"
name = "jumpy"
version = "0.7.0"

[workspace]
members = [".", "core"]

[features]
default = []
# Enable to simulate horrible network latency/slowness
debug-network-slowdown = ["async-timer", "turborand"]
# Enable bevy tracing scopes in profiling and tracy profiler support.
profiling-full= ["bevy/trace", "dep:tracing-tracy"]
# # Enable to simulate horrible network latency/slowness
# debug-network-slowdown = ["async-timer", "turborand"]
# # Enable bevy tracing scopes in profiling and tracy profiler support.
# profiling-full = ["bevy/trace", "dep:tracing-tracy"]

[dependencies]
bones_bevy_asset = "0.2"
bones_bevy_renderer = "0.2"
bones_lib = { version = "0.2", features = ["bevy"] }
type_ulid = "0.2"

anyhow = "1.0"
async-channel = "1.7"
bevy_console = "0.7"
bevy-inspector-egui = { version = "0.18", default-features = false }
bevy_egui = "0.20"
bevy_fluent = "0.6"
bevy_framepace = "0.12"
bevy_kira_audio = { version = "0.15", features = ["ogg"], default-features = false }
bevy_tweening = { version = "0.7", default-features = false }

async-timer = { version = "0.7", optional = true }
bytemuck = "1.12"
clap = { version = "4.0", features = ["derive", "env"] }
directories = "5.0"
downcast-rs = "1.2"
egui_extras = "0.21"
either = "1.8"
fluent = "0.16"
fluent_content = "0.0"
futures-lite = "1.12"
getrandom = { version = "0.2", features = ["js"] }
jumpy_core = { path = "./core" }
leafwing-input-manager = { version = "0.9", default-features = false }
log = { version = "0.4", features = ["release_max_level_debug"] }
normalize-path = "0.2"
once_cell = "1.17"
peg = "0.8"
puffin = { version = "0.15", features = ["web"] }
puffin_egui = "0.21"
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
thiserror = "1.0"
tracing = { version = "0.1", features = ["release_max_level_debug"] }
tracing-core = "0.1"
tracing-log = "0.1"
tracing-subscriber = "0.3"
unic-langid = "0.9"
byte-pool = "0.2.4"

[dependencies.turborand]
features = ["atomic"]
optional = true
version = "0.10"

[dependencies.bevy]
default-features = false
features = ["x11", "png", "filesystem_watcher", "bevy_gilrs"]
version = "0.10"

[dependencies.tracing-tracy]
version = "0.10.0"
default-features = false
features = ["enable", "system-tracing", "context-switch-tracing", "code-transfer"]
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.83"
web-sys = { version = "0.3", features = ["Window", "Location", "Storage"] }
tracing-wasm = "0.2"
console_error_panic_hook = "0.1"
js-sys = "0.3"
chrono = { version = "0.4", default-features = false, features = ["std", "wasmbind"] }
bones_framework = { git = "https://github.com/fishfolk/bones" }
bones_bevy_renderer = { git = "https://github.com/fishfolk/bones" }
bevy_tasks = "0.11"
turborand = { version = "0.10.0", features = ["atomic"] }
tracing = "0.1.37"
puffin = "0.16.0"
petgraph = "0.6.4"
rapier2d = { version = "0.17.2", features = ["debug-render", "enhanced-determinism"] }
indexmap = "2.0.0"
serde = { version = "1.0.188", features = ["derive"] }
shiftnanigans = "0.3.3"
humantime-serde = "1.1.1"
ordered-float = "3.9.1"
nalgebra = { version = "0.32", features = ["glam024"] }
once_cell = "1.18.0"
async-channel = "1.9.0"
serde_yaml = "0.9.25"
thiserror = "1.0.48"
peg = "0.8.1"
egui_extras = { version = "0.23.0", default-features = false }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy_dylib = "0.10"
mimalloc = { version = "0.1", default-features = false }
# Networking deps
bitfield = "0.14"
bones_matchmaker_proto = "0.2"
bytes = "1.4"
ggrs = { version = "0.9", features = ["sync-send"] }
mdns-sd = { version = "0.7", default-features = false }
numquant = "0.2"
ping-rs = "0.1"
postcard = { version = "1.0", features = ["alloc"] }
quinn = { version = "0.10", default-features = false, features = ["tls-rustls"] }
rcgen = "0.10"
rustls = { version = "0.21", features = ["dangerous_configuration", "quic"] }
smallvec = "1.10"
quinn_runtime_bevy = "0.2"
directories = "1.0"
bevy_dylib = "0.11"

# anyhow = "1.0"
# async-channel = "1.7"
# bevy_console = "0.7"
# bevy-inspector-egui = { version = "0.18", default-features = false }
# bevy_egui = "0.21.0"
# bevy_fluent = "0.6"
# bevy_framepace = "0.12"
# bevy_kira_audio = { version = "0.15", features = ["ogg"], default-features = false }
# bevy_tweening = { version = "0.7", default-features = false }

# async-timer = { version = "0.7", optional = true }
# bytemuck = "1.12"
# clap = { version = "4.0", features = ["derive", "env"] }
# directories = "5.0"
# downcast-rs = "1.2"
# egui_extras = "0.22.0"
# either = "1.8"
# fluent = "0.16"
# fluent_content = "0.0"
# futures-lite = "1.12"
# getrandom = { version = "0.2", features = ["js"] }
# log = { version = "0.4", features = ["release_max_level_debug"] }
# normalize-path = "0.2"
# once_cell = "1.17"
# peg = "0.8"
# puffin = { version = "0.15", features = ["web"] }
# puffin_egui = "0.21"
# rand = "0.8"
# serde = { version = "1.0", features = ["derive"] }
# serde_yaml = "0.9"
# thiserror = "1.0"
# tracing = { version = "0.1", features = ["release_max_level_debug"] }
# tracing-core = "0.1"
# tracing-log = "0.1"
# tracing-subscriber = "0.3"
# unic-langid = "0.9"
# byte-pool = "0.2.4"

# [dependencies.turborand]
# features = ["atomic"]
# optional = true
# version = "0.10"

# [dependencies.tracing-tracy]
# version = "0.10.0"
# default-features = false
# features = ["enable", "system-tracing", "context-switch-tracing", "code-transfer"]
# optional = true

# [target.'cfg(target_arch = "wasm32")'.dependencies]
# wasm-bindgen = "0.2.83"
# web-sys = { version = "0.3", features = ["Window", "Location", "Storage"] }
# tracing-wasm = "0.2"
# console_error_panic_hook = "0.1"
# js-sys = "0.3"
# chrono = { version = "0.4", default-features = false, features = ["std", "wasmbind"] }

# [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# mimalloc = { version = "0.1", default-features = false }
# # Networking deps
# bitfield = "0.14"
# bones_matchmaker_proto = "0.2"
# bytes = "1.4"
# ggrs = { version = "0.9", features = ["sync-send"] }
# mdns-sd = { version = "0.7", default-features = false }
# numquant = "0.2"
# ping-rs = "0.1"
# postcard = { version = "1.0", features = ["alloc"] }
# quinn = { version = "0.10", default-features = false, features = ["tls-rustls"] }
# rcgen = "0.11.1"
# rustls = { version = "0.21", features = ["dangerous_configuration", "quic"] }
# smallvec = "1.10"
# quinn_runtime_bevy = "0.2"

# Optimize dependencies even in development
[profile.dev.package."*"]
Expand All @@ -112,13 +121,9 @@ debug = 1 # Only keep line numbers
opt-level = 3

# Optimize our code a little bit.
[profile.dev.package.jumpy_core]
codegen-units = 512
opt-level = 1

[profile.dev]
codegen-units = 128
opt-level = 1
opt-level = 0

[profile.dev-optimized]
debug = 1
Expand All @@ -131,6 +136,7 @@ lto = true

[package.metadata.cargo-machete]
ignored = [
"tracing", # Needed to add `release_max_level_debug` feature
"getrandom", # Needed to add `js` feature
"tracing", # Needed to add `release_max_level_debug` feature
"getrandom", # Needed to add `js` feature
]

8 changes: 4 additions & 4 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[target.x86_64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH",
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH",
]

[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH",
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH",
]
77 changes: 0 additions & 77 deletions assets/default.core.yaml

This file was deleted.

Loading

0 comments on commit 1343ad1

Please sign in to comment.