This commit is contained in:
LunarAkai 2025-08-19 23:32:35 +02:00
commit e48fff45f0
4 changed files with 21 additions and 2 deletions

7
Cargo.lock generated
View file

@ -82,6 +82,12 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04"
[[package]]
name = "anyhow"
version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"
[[package]]
name = "anymap"
version = "0.12.1"
@ -840,6 +846,7 @@ dependencies = [
name = "moonhare_log"
version = "0.1.0"
dependencies = [
"anyhow",
"fern",
"humantime",
"log",

View file

@ -39,9 +39,18 @@ So far these parts have been published:
![](/docs/engine_design.drawio.png)
### Game Loop:
### Game Loop
![](/docs/game_loop.drawio.png)
window_update()
- is concerned about handling input
- checks if the window moves/minimizes,...
update()
- for example: calculates npc movement, etc.
render()
- renders updated game state to the screen

View file

@ -7,4 +7,5 @@ authors.workspace = true
[dependencies]
log = "*"
fern = { version = "0.7", features = ["colored"] }
humantime = "*"
humantime = "*"
anyhow = "1"

View file

@ -1,6 +1,8 @@
//! Wrapper around `log` and `fern` crates
use std::{fmt::Display, io, time::SystemTime};
pub use anyhow;
/// Configures the Log Output Settings
pub fn configere_logger() -> Result<(), fern::InitError> {
let base_config = fern::Dispatch::new().level(log::LevelFilter::Info);