MovingBlocks/Terasology — Issue #157: Rendering(and others) - Configuration interaction problem
Author: KaiKratz
Created: 2012-02-26 12:10:00+00:00
State: open

## Problem:
The rendering component initializes internal values from configuration only at initialization. Changes later applied to the configuration go unnoticed and have to be set directly to the rendering component. -> Redundant state -> source of high quality bugs

## Suggestions to improve on this:
### Alternative a)
Introduce observer pattern - all components which require information from the config register as observers of the configuration. Can store their own state (for fast access) and can update state on config change.

### Alternative b)
Introduce event handling system and propagate config state changes - similar to a) but can be modeled with a finer granularity and potentially cleaner in case we add event handling to the system

### Alternative c)
Remove all local config info - All information regarding configuration is always queried from the config. This would possibly require the config component to ditch the multiple hash-maps it uses now in favor of faster access. (Profile this first if speed i REALLY an issue! -> Some config info is used multiple times per frame so i guess it will be a performance issue)

## Synopsis
Interacting with config info is unsatisfactory. Need to decide how to improve on this situation.