SadConsole supports effects to take place on glyphs, these effects run overtime on the update loop of the game.
How do these effects work?
Each effect uses the ICellEffect interface, SadConsole has an abstract implementation of this interface “CellEffectBase” which provides some base functionality for effects. This is also the baseline for each effect in the SadConsole build in effects.
You can easily create your own custom effect using this interface or base implementation.
Build in effects
- Fade (Fades both the background and foreground).
- Recolor (Recors the foreground or the background of a cell)
- Blink (Switches between the normal foreground of a cell)
- Blinker (Blinks the foreground and background colors of a cell)
- BlinkCharacter (Switches between the glyph of a cell)
- CodeEffect (Applies a custom code effect based on an Action to the cell)
- Delay (Does nothing but delay for a certain time, useful in a set of effects)
- EffectSet (Chains one effect after another)
Example blinking effect
Here I will show a basic blinking effect that is also build into SadConsole.
var console = Game.Instance.StartingConsole;
// Increase size to see the effect better
console.FontSize = console.Font.GetFontSize(IFont.Sizes.Three);
// Define a blinking effect
var blinkingEffect = new Blinker
{
// Blink forever
Duration = System.TimeSpan.MaxValue,
BlinkOutForegroundColor = Color.Black,
// Every half a second
BlinkSpeed = TimeSpan.FromMilliseconds(500),
RunEffectOnApply = true
};
// Set initial color
console.SetGlyph(1, 1, 'A', Color.White, Color.Black);
console.SetEffect(1, 1, blinkingEffect);

Thats it for effects!
