thesadrogue / TheSadRogue.Integration

An integration library between SadConsole and GoRogue
MIT License
8 stars 5 forks source link

IsVisible Defaults on Cell Types Inconsistent #63

Open Chris3606 opened 2 years ago

Chris3606 commented 2 years ago

There are two major types to use for "terrain" cells in the integration library:

  1. RogueLikeCell: the vanilla base type
  2. MemoryAwareRogueLikeCell: A subclass of RogueLikeCell designed for use with the memory-aware field of view system

Currently, RogueLikeCell doesn't assume whether or not you're using an FOV handler, so its constructor ensures the default for new objects is to set IsVisible to true; this is also consistent with SadConsole's behavior for colored glyphs. However, MemoryAwareRogueLikeCell defaults to setting IsVisible to false.

This inconsistency is not documented in the API (at least not in a place I was able to find with a cursory inspection). On the surface, this difference makes sense because, generally, MemoryAwareRogueLikeCell will only be used with the memory-aware FOV system, which will set the visibility correctly as per the FOV; however, it can be confusing particularly if someone uses memory-aware cells in anticipation of later implementing FOV, but haven't done so yet (in which case, all their cells are invisible by default).

Ideally, the default visibility behavior should be consistent across RogueLikeCell and MemoryAwareRogueLikeCell; they should both default to true, if feasible. If not, the default visibility behavior should be explicitly documented.