0.1.0-0-pre.4
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/apps/game-snake-poc-desktop/src/main.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
#![warn(missing_docs)]
|
||||
#![deny(unreachable_pub)]
|
||||
@@ -10,6 +10,14 @@
|
||||
//! This binary exercises the platform-independent fixed-step loop. SDL3 windowing and physical input mapping are introduced in the next dedicated delta.
|
||||
|
||||
fn main() {
|
||||
let _logging_guard = match game_logging_lib::init_console_tracing() {
|
||||
std::result::Result::Ok(guard) => guard,
|
||||
std::result::Result::Err(error) => {
|
||||
eprintln!("failed to initialize tracing: {error}");
|
||||
return;
|
||||
},
|
||||
};
|
||||
tracing::info!(target: "games::runner", game = "snake", "desktop POC runner started");
|
||||
let _monetization = engine_v1_platform_api::MonetizationCapabilities::disabled();
|
||||
let input = engine_v1_common::InputState::none().with_action(engine_v1_common::GameAction::Primary, true);
|
||||
let mut runner = engine_v1_common::FixedStepRunner::new(std::time::Duration::from_millis(16));
|
||||
@@ -17,6 +25,7 @@ fn main() {
|
||||
for _ in 0..3 {
|
||||
runner.tick(&mut state, input);
|
||||
}
|
||||
tracing::info!(target: "games::runner", game = "snake", frames = runner.next_frame_index(), "desktop POC runner completed");
|
||||
println!("Snake POC desktop runner: length={} frames={}", state.length(), runner.next_frame_index());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user