diff --git a/Cargo.lock b/Cargo.lock index 71c5896..e7be14d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -81,21 +81,6 @@ dependencies = [ "winit", ] -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - [[package]] name = "ahash" version = "0.8.12" @@ -216,12 +201,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "anyhow" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" - [[package]] name = "approx" version = "0.5.1" @@ -315,25 +294,6 @@ dependencies = [ "futures-lite", ] -[[package]] -name = "async-io" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" -dependencies = [ - "async-lock", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix", - "slab", - "tracing", - "windows-sys 0.59.0", -] - [[package]] name = "async-lock" version = "3.4.0" @@ -413,21 +373,6 @@ dependencies = [ "syn", ] -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base64" version = "0.21.7" @@ -798,7 +743,6 @@ dependencies = [ "bevy_platform", "bevy_ptr", "bevy_reflect", - "bevy_remote", "bevy_render", "bevy_scene", "bevy_sprite", @@ -1016,29 +960,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "bevy_remote" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4c243aefa8f99ab90baf8c39f9c7100d3f470f616fe2324012c3797d0bcbc" -dependencies = [ - "anyhow", - "async-channel", - "async-io", - "bevy_app", - "bevy_derive", - "bevy_ecs", - "bevy_platform", - "bevy_reflect", - "bevy_tasks", - "bevy_utils", - "http-body-util", - "hyper", - "serde", - "serde_json", - "smol-hyper", -] - [[package]] name = "bevy_render" version = "0.16.0" @@ -2063,12 +1984,6 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foldhash" version = "0.1.5" @@ -2168,24 +2083,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-task", - "pin-project-lite", - "pin-utils", -] - [[package]] name = "getrandom" version = "0.2.16" @@ -2211,12 +2108,6 @@ dependencies = [ "wasi 0.14.2+wasi-0.2.4", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "gl_generator" version = "0.14.0" @@ -2405,71 +2296,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "http" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", -] - [[package]] name = "image" version = "0.25.6" @@ -2525,12 +2351,6 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - [[package]] name = "jni" version = "0.21.1" @@ -2721,15 +2541,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" -dependencies = [ - "adler2", -] - [[package]] name = "naga" version = "24.0.0" @@ -3173,15 +2984,6 @@ dependencies = [ "objc2-foundation", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "offset-allocator" version = "0.2.0" @@ -3346,12 +3148,6 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "piper" version = "0.2.4" @@ -3752,12 +3548,6 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - [[package]] name = "rustc-hash" version = "1.1.0" @@ -3806,12 +3596,6 @@ dependencies = [ "unicode-script", ] -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "safe_arch" version = "0.7.4" @@ -3887,18 +3671,6 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_json" -version = "1.0.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -3989,19 +3761,6 @@ dependencies = [ "xkeysym", ] -[[package]] -name = "smol-hyper" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7428a49d323867702cd12b97b08a6b0104f39ec13b49117911f101271321bc1a" -dependencies = [ - "async-executor", - "async-io", - "futures-io", - "hyper", - "pin-project-lite", -] - [[package]] name = "smol_str" version = "0.2.2" @@ -4241,16 +4000,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -[[package]] -name = "tokio" -version = "1.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" -dependencies = [ - "backtrace", - "pin-project-lite", -] - [[package]] name = "toml_datetime" version = "0.6.9" diff --git a/Cargo.toml b/Cargo.toml index 938a0ef..22b0721 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,6 @@ avian2d = { version = "0.3.0", features = ["serialize", "simd"] } bevy = { version = "0.16.0", default-features = false, features = [ "bevy_color", "bevy_core_pipeline", - "bevy_remote", "bevy_render", "bevy_ui", "bevy_window", @@ -38,8 +37,5 @@ log = { version = "*", features = [ "max_level_debug", "release_max_level_warn", ] } -rand = { version = "0.9.1", default-features = false, features = [ - "std", - "thread_rng", -] } +rand = { version = "0.9.1", default-features = false, features = ["std", "thread_rng"] } wyrand = "0.3.2" diff --git a/src/game/runtime.rs b/src/game/runtime.rs index 81b1ddf..664dc49 100644 --- a/src/game/runtime.rs +++ b/src/game/runtime.rs @@ -1,7 +1,6 @@ use avian2d::prelude::*; use bevy::{ input::mouse::{AccumulatedMouseScroll, MouseScrollUnit}, - math::curve::EaseFunction::SmoothStep, prelude::*, }; @@ -15,19 +14,19 @@ pub fn move_player( ) -> Result { let acceleration = 500.0; - let delta_v = acceleration * time.delta_secs(); + let delta_time = time.delta_secs(); if keyboard_input.any_pressed([KeyCode::KeyW, KeyCode::ArrowUp]) { - velocity.y += delta_v; + velocity.y += acceleration * delta_time; } if keyboard_input.any_pressed([KeyCode::KeyS, KeyCode::ArrowDown]) { - velocity.y -= delta_v; + velocity.y -= acceleration * delta_time; } if keyboard_input.any_pressed([KeyCode::KeyA, KeyCode::ArrowLeft]) { - velocity.x -= delta_v; + velocity.x -= acceleration * delta_time; } if keyboard_input.any_pressed([KeyCode::KeyD, KeyCode::ArrowRight]) { - velocity.x += delta_v; + velocity.x += acceleration * delta_time; } Ok(()) @@ -40,14 +39,10 @@ pub fn quit(mut exit: EventWriter) { /// Follow the player character with the camera pub fn move_camera( - time: Res