3D resolution setting extended down to 1/16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-03 09:48:25 +01:00
1 parent c54998be55
commit 4d1bf30586
4 files changed
+6 -4

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ An original dungeon management game (genre: dungeon building & defence) that run
- All UI windows use **CP437 frames** (single lines for panels, double lines for dialogs); **all bars are CP437 block characters** (█ ▌ ░) - All UI windows use **CP437 frames** (single lines for panels, double lines for dialogs); **all bars are CP437 block characters** (█ ▌ ░)
- Text only in **fixed integer sizes**: 1×, 2× and 4× the 6×8 glyph size, times an integer **interface factor** (automatic from the device resolution, or 1×–4× in the settings) - Text only in **fixed integer sizes**: 1×, 2× and 4× the 6×8 glyph size, times an integer **interface factor** (automatic from the device resolution, or 1×–4× in the settings)
- The interface is drawn in **device pixels** (high DPI) and laid out on the **character grid**, so every font pixel has exactly the same size - The interface is drawn in **device pixels** (high DPI) and laid out on the **character grid**, so every font pixel has exactly the same size
- **3D resolution** setting: the world can be rendered at 1/1, 1/2, 1/3 or 1/4 resolution and scaled up by exactly that factor (pixel look); the interface stays sharp - **3D resolution** setting: the world can be rendered at 1/1 down to 1/16 resolution and scaled up by exactly that factor (pixel look); the interface stays sharp
- Sound: event system + macroquad audio prepared (volume, mute key M); sounds will be generated later - Sound: event system + macroquad audio prepared (volume, mute key M); sounds will be generated later
- Languages: all in-game texts live in **language files** (`lang/*.lang`, key = text); English is the reference/fallback, German included, more can be added. The language is chosen on first start and stored in the browser. - Languages: all in-game texts live in **language files** (`lang/*.lang`, key = text); English is the reference/fallback, German included, more can be added. The language is chosen on first start and stored in the browser.
- Repository language: **English** (code, comments, docs, commit messages) - Repository language: **English** (code, comments, docs, commit messages)
+1 -1
View File
@@ -73,7 +73,7 @@ fn apply_settings(s: &Settings, r3d: &mut R3d) {
r3d.outlines = s.outlines; r3d.outlines = s.outlines;
r3d.set_wall_detail(s.wall_subdivisions()); r3d.set_wall_detail(s.wall_subdivisions());
r3d.max_lights = s.max_lights as usize; r3d.max_lights = s.max_lights as usize;
r3d.render_div = s.render_scale.clamp(1, 4) as u32; r3d.render_div = s.render_scale.clamp(1, 16) as u32;
audio::set_volumes(s.music_volume, s.volume, s.muted); audio::set_volumes(s.music_volume, s.volume, s.muted);
} }
+1 -1
View File
@@ -139,7 +139,7 @@ fn item_change(it: Item, s: &mut Settings, d: i32) {
Item::WallDetail => s.wall_detail = cycle(&[1u8, 2, 3], s.wall_detail, d), Item::WallDetail => s.wall_detail = cycle(&[1u8, 2, 3], s.wall_detail, d),
Item::Lights => s.max_lights = cycle(&[8u8, 16, 24], s.max_lights, d), Item::Lights => s.max_lights = cycle(&[8u8, 16, 24], s.max_lights, d),
Item::UiScale => s.ui_factor = cycle(&[0u8, 1, 2, 3, 4], s.ui_factor, d), Item::UiScale => s.ui_factor = cycle(&[0u8, 1, 2, 3, 4], s.ui_factor, d),
Item::RenderScale => s.render_scale = cycle(&[1u8, 2, 3, 4], s.render_scale.max(1), d), Item::RenderScale => s.render_scale = cycle(&(1u8..=16).collect::<Vec<u8>>(), s.render_scale.clamp(1, 16), d),
Item::GameSpeed => s.game_speed = cycle(&[1.0f32, 2.0], s.game_speed, d), Item::GameSpeed => s.game_speed = cycle(&[1.0f32, 2.0], s.game_speed, d),
Item::Hints => s.hints = !s.hints, Item::Hints => s.hints = !s.hints,
} }
+3 -1
View File
@@ -142,7 +142,8 @@ pub struct Settings {
pub wall_detail: u8, // 1 low, 2 medium, 3 high pub wall_detail: u8, // 1 low, 2 medium, 3 high
pub max_lights: u8, // 8, 16 or 24 pub max_lights: u8, // 8, 16 or 24
pub ui_factor: u8, // interface size: 0 = automatic, 1..4 = fixed integer factor pub ui_factor: u8, // interface size: 0 = automatic, 1..4 = fixed integer factor
pub render_scale: u8, // 3D world resolution divisor: 1 = full, 2..4 = pixel look pub render_scale: u8, // 3D world resolution divisor: 1 = full, 2..16 = pixel look
pub touch_ui: u8, // touch interface: 0 = automatic (after the first touch), 1 = on, 2 = off
// game // game
pub game_speed: f32, // 1 or 2 pub game_speed: f32, // 1 or 2
pub hints: bool, pub hints: bool,
@@ -168,6 +169,7 @@ impl Default for Settings {
max_lights: 24, max_lights: 24,
ui_factor: 0, ui_factor: 0,
render_scale: 1, render_scale: 1,
touch_ui: 0,
game_speed: 1.0, game_speed: 1.0,
hints: true, hints: true,
map_w: 64, map_w: 64,