diff --git a/Makefile b/Makefile index 93e39bb..684f370 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ shell: devenv shell # nix develop startserver: - cargo run --bin=trictrac-server + RUST_LOG=trictrac_server cargo run --bin trictrac-server startclient1: - cargo run --bin=trictrac-client Titi + RUST_LOG=trictrac_client cargo run --bin=trictrac-client Titi startclient2: - cargo run --bin=trictrac-client Tutu + RUST_LOG=trictrac_client cargo run --bin=trictrac-client Tutu diff --git a/client/.cargo/config.toml b/client/.cargo/config.toml index 0243f8f..b6bc0d3 100644 --- a/client/.cargo/config.toml +++ b/client/.cargo/config.toml @@ -1,3 +1,8 @@ [target.x86_64-unknown-linux-gnu] linker = "clang" rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"] + +# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only' +# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains. +#[profile.dev] +#debug = 1 diff --git a/client/assets/Inconsolata.ttf b/client/assets/Inconsolata.ttf new file mode 100644 index 0000000..34848ca Binary files /dev/null and b/client/assets/Inconsolata.ttf differ diff --git a/client/assets/board.png b/client/assets/board.png new file mode 100644 index 0000000..5d16ac3 Binary files /dev/null and b/client/assets/board.png differ diff --git a/client/src/main.rs b/client/src/main.rs index 97488e3..81ba442 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -24,7 +24,7 @@ fn main() { primary_window: Some(Window { // Adding the username to the window title makes debugging a whole lot easier. title: format!("TricTrac <{}>", username), - resolution: (480.0, 540.0).into(), + resolution: (1080.0, 1080.0).into(), ..default() }), ..default() @@ -34,10 +34,80 @@ fn main() { .add_plugins(NetcodeClientPlugin) .insert_resource(client) .insert_resource(transport) + .add_systems(Startup, setup) + .add_systems(Update, update_waiting_text) .add_systems(Update, panic_on_error_system) .run(); } +////////// COMPONENTS ////////// +#[derive(Component)] +struct UIRoot; + +#[derive(Component)] +struct WaitingText; + +////////// UPDATE SYSTEMS ////////// +fn update_waiting_text(mut text_query: Query<&mut Text, With>, time: Res