#![warn(missing_docs)] //! Compile-time parameters /// Minimum zoom level pub const ZOOM_MIN: f32 = 200.0; /// Maximum zoom level pub const ZOOM_MAX: f32 = 2000.0; /// Z-axis range for starfield stars /// This does not affect scale. pub const STARFIELD_Z_MIN: f32 = 100.0; /// Z-axis range for starfield stars /// This does not affect scale. pub const STARFIELD_Z_MAX: f32 = 200.0; /// Size range for starfield stars, in game units. /// This is scaled for zoom, but NOT for distance. pub const STARFIELD_SIZE_MIN: f32 = 0.2; /// Size range for starfield stars, in game units. /// This is scaled for zoom, but NOT for distance. pub const STARFIELD_SIZE_MAX: f32 = 1.8; /// Size of a square starfield tile, in game units. /// A tile of size STARFIELD_Z_MAX * screen-size-in-game-units /// will completely cover a (square) screen. This depends on zoom! /// /// Use a value smaller than zoom_max for debug. pub const STARFIELD_SIZE: u64 = STARFIELD_Z_MAX as u64 * ZOOM_MAX as u64; /// Average number of stars per game unit pub const STARFIELD_DENSITY: f64 = 0.01; /// Number of stars in one starfield tile /// Must fit inside an i32 pub const STARFIELD_COUNT: u64 = (STARFIELD_SIZE as f64 * STARFIELD_DENSITY) as u64; /// Name of starfield sprite pub const STARFIELD_SPRITE_NAME: &'static str = "starfield"; /// Root directory of game content pub const CONTENT_ROOT: &'static str = "./content"; /// Root directory of game images pub const IMAGE_ROOT: &'static str = "./assets/render"; /// We can draw at most this many object sprites on the screen. pub const OBJECT_SPRITE_INSTANCE_LIMIT: u64 = 500; /// We can draw at most this many ui sprites on the screen. pub const UI_SPRITE_INSTANCE_LIMIT: u64 = 100; /// The size of our circular particle buffer. When we create particles, the oldest ones are replaced. pub const PARTICLE_SPRITE_INSTANCE_LIMIT: u64 = 1000; /// Must be small enough to fit in an i32 pub const STARFIELD_SPRITE_INSTANCE_LIMIT: u64 = STARFIELD_COUNT * 24; /// The maximum number of sprites we can define pub const SPRITE_LIMIT: u32 = 1024; /// The maximum number of images we can load pub const IMAGE_LIMIT: u32 = 1024;