feat: improve FOV readability and compact HUD

This commit is contained in:
goose
2026-10-01 21:48:33 -04:00
parent df1451a45a
commit b5e520a682
11 changed files with 240 additions and 40 deletions
+9 -4
View File
@@ -2,7 +2,9 @@ class_name MapRenderer
extends Node2D
const TILE_SIZE := Vector2i(32, 32)
const EXPLORED_DIM_COLOR := Color(0.35, 0.35, 0.35, 1.0)
const EXPLORED_DIM_COLOR := Color(0.9, 0.95, 1.0, 1.0)
const EXPLORED_OVERLAY_COLOR := Color(0.9, 0.95, 1.0, 0.85)
const UNKNOWN_COLOR := Color(0.015, 0.025, 0.07, 1.0)
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
const TEXTURES := {
GridMapStateType.CellKind.FLOOR: preload("res://assets/dcss/floor.png"),
@@ -42,7 +44,7 @@ func get_cell_render_color(cell: Vector2i) -> Color:
&"explored":
return EXPLORED_DIM_COLOR
_:
return Color.BLACK
return UNKNOWN_COLOR
func _draw() -> void:
if map == null:
@@ -52,7 +54,10 @@ func _draw() -> void:
var cell := Vector2i(x, y)
var tile_rect := get_cell_rect(cell)
var color := get_cell_render_color(cell)
if color == Color.BLACK:
draw_rect(tile_rect, Color.BLACK)
if color == UNKNOWN_COLOR:
draw_rect(tile_rect, UNKNOWN_COLOR)
elif color == EXPLORED_DIM_COLOR:
draw_texture_rect(TEXTURES[map.get_cell(cell)], tile_rect, false)
draw_rect(tile_rect, EXPLORED_OVERLAY_COLOR)
else:
draw_texture_rect(TEXTURES[map.get_cell(cell)], tile_rect, false, color)