From f7bdf4f6b1d75ef936d2ce264f17db8a6fa89893 Mon Sep 17 00:00:00 2001 From: Cameron Dubas Date: Thu, 19 Aug 2021 22:48:22 -0700 Subject: [PATCH] Release 0.1.0 --- resources/template.ron | 8 ++++---- src/main.rs | 8 ++++---- src/map_builder/mod.rs | 9 ++++----- src/spawner/mod.rs | 2 +- src/systems/hud.rs | 3 ++- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/template.ron b/resources/template.ron index 63b5823..16e32dd 100644 --- a/resources/template.ron +++ b/resources/template.ron @@ -51,7 +51,7 @@ Templates( Template( entity_type: Enemy, name: "Goblin", - glyphs: ['g','h'], + glyphs: ['g'], levels: [0,1,2], hp: Some(1), frequency: 3, @@ -60,7 +60,7 @@ Templates( Template( entity_type: Enemy, name: "Orc", - glyphs: ['n', 'o'], + glyphs: ['o'], levels: [0,1,2], hp: Some(2), base_damage: Some(1), // This cannot be the bottom item in the Template, due to a parsing error in the RON crate @@ -69,7 +69,7 @@ Templates( Template( entity_type: Enemy, name: "Ogre", - glyphs: ['N', 'O'], + glyphs: ['O'], levels: [ 1, 2 ], hp: Some(5), frequency: 1, @@ -78,7 +78,7 @@ Templates( Template( entity_type: Enemy, name: "Ettin", - glyphs: ['E', 'F'], + glyphs: ['E'], levels: [ 2 ], hp: Some(10), frequency: 1, diff --git a/src/main.rs b/src/main.rs index 9c5e8e4..8c5a0a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,9 +18,9 @@ mod prelude { pub const DISPLAY_WIDTH: i32 = SCREEN_WIDTH / 2; pub const DISPLAY_HEIGHT: i32 = SCREEN_HEIGHT / 2; pub const NUM_TILES: usize = (SCREEN_WIDTH * SCREEN_HEIGHT) as usize; - pub const TILE_WIDTH: i32 = 16; - pub const TILE_HEIGHT: i32 = 16; - pub const TILESET: &str = "Sprite-0001.png"; + pub const TILE_WIDTH: i32 = 32; + pub const TILE_HEIGHT: i32 = 32; + pub const TILESET: &str = "dungeonfont.png"; pub use crate::camera::*; pub use crate::components::*; @@ -282,7 +282,7 @@ fn main() -> BError { let context = BTermBuilder::new() .with_title("Dungeon Crawler") .with_fps_cap(30.0) - .with_dimensions(DISPLAY_WIDTH * 3, DISPLAY_HEIGHT * 3) + .with_dimensions(DISPLAY_WIDTH, DISPLAY_HEIGHT) .with_tile_dimensions(TILE_WIDTH, TILE_HEIGHT) .with_resource_path("resources/") .with_font(TILESET, TILE_WIDTH, TILE_HEIGHT) diff --git a/src/map_builder/mod.rs b/src/map_builder/mod.rs index 9c2c8db..c7c9a82 100644 --- a/src/map_builder/mod.rs +++ b/src/map_builder/mod.rs @@ -36,11 +36,10 @@ pub struct MapBuilder { impl MapBuilder { pub fn new(rng: &mut RandomNumberGenerator) -> Self { - let mut architect: Box = match rng.range(0, 4) { - 0 => Box::new(EmptyArchitect {}), + let mut architect: Box = match rng.range(0, 3) { + 0 => Box::new(RoomsArchitect {}), 1 => Box::new(CellularAutomataArchitect {}), - 2 => Box::new(DrunkardsWalkArchitect {}), - _ => Box::new(RoomsArchitect {}), + _ => Box::new(DrunkardsWalkArchitect {}), }; let mut mb = architect.new(rng); @@ -48,7 +47,7 @@ impl MapBuilder { mb.theme = match rng.range(0, 2) { 0 => DungeonTheme::new(), - _ => DungeonTheme::new(), + _ => ForestTheme::new(), }; mb diff --git a/src/spawner/mod.rs b/src/spawner/mod.rs index 26c9075..115f48d 100644 --- a/src/spawner/mod.rs +++ b/src/spawner/mod.rs @@ -19,7 +19,7 @@ pub fn spawn_player(ecs: &mut World, pos: Point) { pos, Render { color: ColorPair::new(WHITE, BLACK), - glyphs: vec![to_cp437('@'), to_cp437('A')], + glyphs: vec![to_cp437('@')], }, Health { current: 10, diff --git a/src/systems/hud.rs b/src/systems/hud.rs index 61a5529..7a53bc6 100644 --- a/src/systems/hud.rs +++ b/src/systems/hud.rs @@ -12,7 +12,8 @@ pub fn hud(ecs: &SubWorld) { let mut draw_batch = DrawBatch::new(); draw_batch.target(2); - draw_batch.print_centered(1, "Explore te Dungeon. Cursor keys to move."); + draw_batch.print_centered(1, "Explore te Dungeon. WASD to move."); + draw_batch.print_centered(2, "E to pick up. Number keys to use items."); draw_batch.bar_horizontal( Point::zero(), SCREEN_WIDTH * 2,