CellView API #114
Labels
No Label
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: john/McRogueFace#114
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create ergonomic .at((x,y)) access pattern for grid cells.
Definition of Done:
Refined Design - CellView API Integration
After design discussion, #114 is being expanded to encompass the Perspective System for layer-based FOV rendering.
New Scope
Phase 1: FOV Foundation
mcrfpy.FOVenum (BASIC, DIAMOND, SHADOW, PERMISSIVE_0-8, RESTRICTIVE)mcrfpy.default_fovmodule property (copied to new grids at creation)grid.fovandgrid.fov_radiuspropertiesFOV_*constantsPhase 3: Perspective Binding (after #113)
layer.apply_perspective(fov=None, visible=, discovered=, unknown=)- binds layer to perspective updatesentity.updateVisibility()updates all bound layers, marks dirty chunksgrid.perspective_enabledtoggles ALL perspective-bound layers visible/invisibleKey Design Decisions
Manual visibility updates are intentional - animations may move entities frequently, so
updateVisibility()is called explicitly by game logic (e.g., after movement animation completes)grid.perspective = entitycallsupdateVisibility()once as cleanup when switching perspective entitiesDirty region optimization - when entity moves, only mark chunks within old/new FOV radius as dirty, not entire layer
Data Structure (Layer Perspective Binding)
Dependencies
Commit
018e735implements Phase 1:mcrfpy.FOVIntEnum with all TCOD FOV algorithms (BASIC, DIAMOND, SHADOW, PERMISSIVE_0-8, RESTRICTIVE, SYMMETRIC_SHADOWCAST)mcrfpy.default_fovmodule property (defaults to FOV.BASIC)grid.fovandgrid.fov_radiusproperties for per-grid defaultsFOV_*module-level constants - usemcrfpy.FOV.BASICetc. insteadExample usage:
Tests updated and all 141 pass.