See the version list below for details.
dotnet add package SadConsole --version 9.2.1
NuGet\Install-Package SadConsole -Version 9.2.1
<PackageReference Include="SadConsole" Version="9.2.1" />
paket add SadConsole --version 9.2.1
#r "nuget: SadConsole, 9.2.1"
// Install SadConsole as a Cake Addin #addin nuget:?package=SadConsole&version=9.2.1 // Install SadConsole as a Cake Tool #tool nuget:?package=SadConsole&version=9.2.1
SadConsole is a generic library that emulates old-school console game systems. It provides command prompt-style graphics where one or more tile textures are used to represent an ascii character set. Console's are made up of a grid of cells, each of which can have its own foreground, background, glyph, and special effect applied to it.
While SadConsole is a generic library that doesn't provide any rendering capabilities, "host" libraries are provided that add renderers to SadConsole. The two hosts provided by this library are for MonoGame and SFML.
SadConsole currently targets .NET 6, .NET 5, .NET Core 3.1, and .NET Standard 2.1.
For the latest changes in this release, see the notes below
Here are some of the features SadConsole supports:
- Show any number of consoles.
- Uses graphical tile-based images to build out an ascii-character font with support for more than 256 characters.
- Use more than one font file. However, each console is restricted to a single font.
- Independently controlled entities for game objects.
- Keyboard and Mouse support.
- Text UI control framework.
- Windowing capabilities.
- Importers for DOS ANSI files, TheDraw text fonts, RexPaint, and Playscii.
- Animation support.
- Translating images to text-blocks.
- Highly customizable system.
String display and parsing
SadConsole uses NuGet for its .NET dependencies:
(v9.2.1 fixes API documentation generation, all other changes are for 9.2.0)
Print(int x, int y, ColoredGlyph glyph)renamed to
- [Breaking] Surface
SetEffectmethod signatures have changed.
- [Breaking] Renamed
- [Breaking] Removed
ColorGradientas this type is implemented in the SadRogue.Primitives library as
ColoredString.String.Setforced the string through the parser. This has now changed to use the characters directly.
- [Behavior] All
ColoredStringcontructors that used the
(string)overload used the string parser. This is no longer the case.
ColoredString.IgnoreEffectno longer defaults to
- [Behavior] Using
Surface.Printmethods that used the string parser for fore/back/mirror will force those settings after the string was parsed and not before.
- [Behavior] Surface
Fillmethods now clear the effect.
- New overload added that accepts decorators.
- Print clears the effect over the glyphs printed.
- Print that uses the string processor now processes the string and then sets the appropriate overloaded settings. For example, the overload that sets the foreground and background colors will process the string and then set the foreground and background of the entire string. This is a change from previous behavior which set the colors at the start of the string processor and allowed the processor to override the overload.
- [MonoGame] Added DrawCallManager to allow injecting custom sprite batch rendering during final scene composition.
- [MonoGame/SFML] Fixed a bug that caused all surfaces to redraw all cells 100% of the time even if nothing changed. Should bring 300%-400% fps increase in surfaces that aren't changing content.
- [MonoGame/SFML] ITexture improvements for GetPixel/SetPixel; Demos on editing textures. (RychuP)
- [MonoGame/SFML] The game host now has a
FrameNumberproperty that incremenets each frame cycle.
- [SFML] Fixed
Settings.UnlimitedFPS. This now works.
- [Core] Fixed bug that caused redraws every frame even if nothing had changed.
- [Core] Cursor didn't respect
Cursor.UseStringParserbecause of how
ColoredStringwas always using the string parser. This is fixed now.
- [Core] Cursor has a
Cursor.MouseClickRepositionHandlesMouseproperty which sets the handled flag on mouse left-click for the cursor reposition.
- [Core] Cursor updates the space character appearance while printing. Previously only the first character was used to determine the space's appearance.
DrawStringinstruction overrides reset now, fixing a bug with having the instruction run more than once.
Surface.ShiftLeft|Right|Up\Downmethods now move decorators.
- [Core] New
Surface.ShiftColumnmethods added. (Chris3606)
ColoredString.SetDecoratorsadded, to fit in with
- [Core] Renamed
EffectSetand added new
- [Core] Effects use
TimeSpaninstead of double.
- [Core] The
EffectsManagerused by a surface now works on cell instances, not cell indicies.
- [Core] Resizing a surface without the
clearparameter keeps existing effects instead of dropping them.
AnimatedSurface.FromImagehelper added which converts image-based animations to an animated surface. (RychuP)
- [Core] Added TheDraw font reader:
SadConsole.Readers.TheDrawFont. Not a SadConsole Font.
- [Core] Playscii support added in the
- [Core] Entity renderer has a
RemoveAllmethod to clear out all the entities.
- [Core] Entity renderer now has a
SkipExistsChecksproperty which can greatly improve performance when adding/removing entities (when you already have a lot of entities).
- [Core] For entities, added
AnimatedAppearanceComponentwhich can be added to an entity to animate the glyph like the
AnimatedSurfacedid for the old entity type.
- [UI] Fix various minor bugs with controls.
Textboxhas more events related to text changing.
Textboxbehaviors have changed slightly. For example,
EditingTextevent doesn't fire when the text ends up being the same prior to editing.
ListBoxitems can be inserted as a
ValueTuple<string, object>which will use the string (can be a
ColoredString) as the display text of the item.
- [StringParser] Introduced new interface for string parsing:
- [StringParser] Moved current parse code to
ColoredString.Parseis obsolete and forwards to
- [StringParser] String processor now has a decorators command:
- [StringParser] String processor no longer hides effects until they're used. All processed strings will set a null effect that will be set on the cells that are printed.
- [ExtendedLib] Added ClassicConsoleKeyboardHandler and C64KeyboardHandler for cursor handlers.
- [ExtendedLib] Added MoveViewPortKeyboardHandler component.
- [ExtendedLib] Added
surface.PrintFadingTextextension method that prints text using the
DrawStringinstruction with an effect.
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed.|
|.NET Core||netcoreapp3.0 was computed. netcoreapp3.1 is compatible.|
|.NET Standard||netstandard2.1 is compatible.|
|MonoAndroid||monoandroid was computed.|
|MonoMac||monomac was computed.|
|MonoTouch||monotouch was computed.|
|Tizen||tizen60 was computed.|
|Xamarin.iOS||xamarinios was computed.|
|Xamarin.Mac||xamarinmac was computed.|
|Xamarin.TVOS||xamarintvos was computed.|
|Xamarin.WatchOS||xamarinwatchos was computed.|
NuGet packages (7)
Showing the top 5 NuGet packages that depend on SadConsole:
A canvas class that works with SadConsole and MonoGame host.
A graphics hosting library for SadConsole that targets MonoGame.
A library of common classes that extend SadConsole with new controls, windows, and more.
A graphics hosting library for SadConsole that targets SFML.
A helper library for SadConsole games built with GoRogue.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on SadConsole:
A .NET ascii/ansi console engine written in C# for MonoGame and XNA. Create your own text roguelike (or other) games!
9.2.0 contains lots of changes, including breaking changes. See NuGet or GitHub documentation for more information. 9.2.1 only fixes API documentation