[7DRL Prep] Cookbook 4: Responsive design guide #249

Closed
opened 2026-02-09 02:44:41 +00:00 by john · 2 comments
Owner

Goal

Write Cookbook 4: a responsive design guide showing how a single codebase can switch resolution with one line.

The "One Line"

mcrfpy.Window.get().game_resolution = (1280, 720)

Engine Infrastructure (Already Exists)

  • mcrfpy.Window.game_resolution - internal game resolution (read/write)
  • mcrfpy.Window.scaling_mode - Center / Stretch / Fit
  • scene.on_resize callback for window resize events
  • reapply_alignment() on UIDrawables for layout recalculation

Cookbook Should Cover

  1. Resolution switching (the one line)
  2. Scaling modes comparison (Center vs Stretch vs Fit)
  3. Relative positioning patterns (percentages, not hardcoded pixels)
  4. Resize callback handling
  5. Working multi-resolution demo
  6. Mobile-ready layout considerations

Deliverables

  • tests/cookbook/features/responsive_demo.py - Interactive demo
  • docs/cookbook/ui/responsive_design.md - Written guide
  • Update cookbook_main.py to use responsive patterns (currently hardcoded 1024x768)

Detailed Report

.claude/reports/cookbook4_responsive.md

7DRL Critical Path

Must understand responsive patterns before hand-coding the 7DRL game.

## Goal Write Cookbook 4: a responsive design guide showing how a single codebase can switch resolution with one line. ## The "One Line" ```python mcrfpy.Window.get().game_resolution = (1280, 720) ``` ## Engine Infrastructure (Already Exists) - `mcrfpy.Window.game_resolution` - internal game resolution (read/write) - `mcrfpy.Window.scaling_mode` - Center / Stretch / Fit - `scene.on_resize` callback for window resize events - `reapply_alignment()` on UIDrawables for layout recalculation ## Cookbook Should Cover 1. Resolution switching (the one line) 2. Scaling modes comparison (Center vs Stretch vs Fit) 3. Relative positioning patterns (percentages, not hardcoded pixels) 4. Resize callback handling 5. Working multi-resolution demo 6. Mobile-ready layout considerations ## Deliverables - `tests/cookbook/features/responsive_demo.py` - Interactive demo - `docs/cookbook/ui/responsive_design.md` - Written guide - Update `cookbook_main.py` to use responsive patterns (currently hardcoded 1024x768) ## Detailed Report `.claude/reports/cookbook4_responsive.md` ## 7DRL Critical Path Must understand responsive patterns before hand-coding the 7DRL game.
Author
Owner

Intended labels (apply manually due to MCP label bug): priority:tier1-active, Documentation

**Intended labels** (apply manually due to MCP label bug): `priority:tier1-active`, `Documentation`
Author
Owner

Closing -- the engine infrastructure for responsive design already exists (game_resolution, scaling_mode, on_resize). The cookbook guide is a nice-to-have but not blocking 7DRL. The patterns are documented well enough in the API reference and existing demos. Can revisit as part of the post-jam documentation push.

Closing -- the engine infrastructure for responsive design already exists (`game_resolution`, `scaling_mode`, `on_resize`). The cookbook guide is a nice-to-have but not blocking 7DRL. The patterns are documented well enough in the API reference and existing demos. Can revisit as part of the post-jam documentation push.
john closed this issue 2026-02-15 00:31:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
john/McRogueFace#249
No description provided.