grid logic

This commit is contained in:
2026-09-19 16:32:04 +02:00
parent 6143cac61d
commit 56d90253bd
12 changed files with 104 additions and 49 deletions
+21
View File
@@ -0,0 +1,21 @@
use bevy::prelude::*;
// Grid
pub const CELL_SIZE: f32 = 32.0;
pub const TERRAIN_COLS: i32 = 60;
pub const CHUNK_ROWS: i32 = 32;
pub const TERRAIN_WIDTH: f32 = CELL_SIZE * TERRAIN_COLS as f32;
pub const HALF_TERRAIN_WIDTH: f32 = TERRAIN_WIDTH / 2.0;
pub const CHUNK_HEIGHT: f32 = CELL_SIZE * CHUNK_ROWS as f32;
// Streaming
pub const MARGIN_ABOVE: f32 = 400.0;
pub const MARGIN_BELLOW: f32 = 400.0;
// Player
pub const PLAYER_HITBOX: Vec2 = Vec2::new(20.0, 40.0);
pub const FALL_SPEED: f32 = 600.0;
pub const DIVE_SPEED: f32 = 1000.0;
pub const HORIZONTAL_SPEED: f32 = 500.0;
pub const START_POSITION: Vec3 = Vec3::new(0.0, 0.0, 2.0);