Skip to content

Releases: Thraka/SadConsole

Version 10.4.1a

13 Jun 06:24
55790bc
Compare
Choose a tag to compare

Libraries updated for this release

  • SadConsole
  • SadConsole.Host.MonoGame
  • SadConsole.Host.SFML
  • SadConsole.Host.FNA
  • SadConsole.Host.WPF

Changes

  • [Core] When a Cursor is removed from a host object, the object is set to dirty now.

  • [Core] Overlay component now calls update on the attached visual.

  • [Core] Fix bug with DrawCircle not setting dirty.

  • [Core] Fix bug with DrawBox not respecting ignore glyph setting.

  • [MonoGame] Change host to be a lot more friendly towards running from an existing MonoGame Game instead of SadConsole's game.

  • [Renderers] Cursor rendering has changed to draw on the hosting surface. Previously it was rendered on top as an entire separate process.

  • [Misc] Added MonoGame-first game sample.

  • [Misc] Added Python sample.

Version 10.4.0

31 Mar 23:35
38f7c5a
Compare
Choose a tag to compare

New versioning system. Versions for SadConsole will be in the following format: [all libs major].[all libs minor].[individual lib revision]

When patches come out for the indvidual libraries, the X in 10.0.X would increment. These would be like host updates, or the extended library, but not public facing changes in SadConsole itself. If SadConsole itself updates, the X in 10.X.0 would increment. All libraries would increment with SadConsole, and the individual lib revisions would reset to 0. The X on X.0.0 would indicate a major change to SadConsole with most likely a lot of bigger breaking changes.

That said, SadConsole is resetting all versions to v10.4.0 for this release. From now on, the new versioning system is in place.

  • [Breaking] A minor breaking change. If you were creating your own IConfigurator startup configs, the Run method's parameter changed from Game to GameHost.

  • [Core] Added Components.Overlay which displays a surface on top of an existing console/surface object as a top layer.

  • [Core] Bug: Font.OnFontChanged wasn't actually being called. It is now.

  • [Core] Added Coroutine NuGet library. This is included now with SadConsole.

  • [Core] Added CoroutineHandlerComponent which is a manager that you can add to an object and coroutines to.

  • [Core] Cursor.PrintCoroutine which prints as a coroutine, pausing at each character.

  • [Core] Instructions.DrawString updated to use Cursor.PrintCoroutine which lets it pretty print word breaks.

  • [Core] XML docs didn't genereate correctly for the last build.

Version 10.0.3

14 Mar 17:19
2ccb1bf
Compare
Choose a tag to compare
  • [UI] ScrollBar has been completely rewritten. Minor breaking changes.
    • .Maximum has been changed to .MaximumValue.
    • Properties related to the style, such as BarGlyph, were moved to a Style property which controls how the control looks. Some property names have changed
  • [UI] NumberBox improvements.
    • Rendering code split from Textbox.
    • Added ShowUpDownButtons to show up\down buttons.
    • Fixed bug with UseMinMax messing up the value and setting it back to 0 when the control loses focus.
  • [UI] ControlBase.FindThemeFont helper method added.
  • [UI] Minor bug fixed where captured controls (such as a scroll bar) wouldn't process the mouse if the control was parented to a composite control and the mouse left the parent area.
  • [Core] Fixed EffectSet bug where the last effect wasn't applied.
  • [Core] GlyphDefinition has an init accessor now.
  • [Core] Added ShapeParameter docs and CreateFilled supports ignoring the border.
  • [Core] Added RootComponent class that can be added to SadConsole.Game.Instance.RootComponents. These components run logic before the keyboard and screen updates.
  • [Core] Splash screen collection is nulled after it runs, freeing memory.
  • [Extended] Classic keyboard handler has IsReady flag now to control when it's active.
  • [Extended] ColorPickerPopup would crash on invalid textbox values.
  • [Extended] GlyphSelectPopup added. You can use this to display a list of glyphs in your font while debugging your app.
  • [Extended] Fixed a bug in the table control that prevented the scroll bars from being displayed.
  • [Extended] Cleaned up code and enabled nullable.
  • [Host - SFML] Fix bug where it was always running at unlimited FPS.
  • [Host - MonoGame] Renderers can set backing texture usage.
  • [Host - FNA] Fix bug where the screen clear wasn't working and would default to violet.
  • [Host - All] Add OptimizedScreenSurfaceRenderer which renders.
  • [Host - All] Surface render step can accept an alternative surface with the SetData method.

Version 10.0.0

29 Oct 21:37
03627ff
Compare
Choose a tag to compare

Major changes (possibly breaking)

  • [Core] The default font's used the wrong name. It's been corrected from IBM_16x8 to IBM_8x16 and from IBM_16x8_ext to IBM_8x16_ext. If you've previously serialized a font with the wrong name, you'll need to change it in the json object. Or use the configuration extension FixOldFontName() which will add a name mapping.
  • [Core] The editor functions that changed glyphs and printed on consoles have moved from being extension methods for the ICellSurface interface to the ISurface interface. Console, IScreenSurface, and ICellSurface, all implement this new interface. This means you can now use the editing extensions directly on those objects.
  • [Core] Because Console no longer implements ICellSurface, and instead implements ISurface, some properties have been moved to the Surface property, such as myConsole.TimesShiftedUp is now myConsole.Surface.TimesShiftedUp.
  • [Core] Themes have been removed. Each control draws itself.
  • [Core] IScreenObject no longer implements IEnumerable to access the children. Use the .Children collection property instead.
  • [Core] Update and Render no longer check for IsEnabled and IsVisible, respectively. When those methods run, the properties are checked on the children before calling the respective method. This moves the check outside of the object itself, and relies on the parent object to do it. This eliminates the need for an object to check itself, and allows you to bypass the check when you want.
  • [Core] Decorators are no longer array's but rented from a list pool. Use the CellDecoratorHelpers class to manage them. SadConsole does its best to rent and return from the pool as you add or remove decorators.
  • [Core] The OnStart callback is now an event and not an Action delegate.

New features

  • [Core] Added Componenets.LayeredSurface component. Add this component to a ScreenSurface to enable multiple surface layers. Use the LayeredSurface to manage the layers.
  • [Core] StringParser supports variables with the syntax of $variable_name. The parser has a dictionary that invokes a delegate which returns a value for the variable. So the value can be determined as the variable is used. See DemoStringParsing.cs in the sample template.
  • [Core] EntityManager.AlternativeFont added so entities can use a different font than the parent object.
  • [UI] New control, TabControl. Contributed by arxae.
  • [ExtendedLib.UI] New control, Table. Contributed by Ven0maus.

Normal changes

  • Target .NET 6+ exclusively. Core library is nullable aware.
  • [Core] Splash screen printing wasn't being shown because of cursor changes.
  • [Core] IFont now defines glyph definitions.
  • [Core] Various SadFont properties and methods are now settable/callable.
  • [Core] Extensions methods added to hosts to allow manipulation of font textures.
  • [Core] Settings.CreateStartingConsole setting added to avoid creating the StartingConsole.
  • [Core] Cursor now has the property DisablePrintAutomaticLineFeed which, when true, prevents the cursor from moving to the next line if printing a character at the end of the current line.
  • [Core] Ansi.AnsiWriter handles sauce now by ignoring the rest of a document once character 26 (CTRL-Z) is encountered.
  • [Core] Ansi.AnsiWriter has always used a cursor to print, it now sets UseLinuxLineEndings = true and DisablePrintAutomaticLineFeed = true.
  • [Core] Added SadConsole.SplashScreens.Ansi1 splashscreen, the new SadConsole logo, for use with games.
  • [Core] Added ScreenSurface.QuietSurfaceHandling property. When true, this property prevents the .Surface property from raising events and calling virtual methods when the instance changes. This is useful for AnimatedScreenSurface instances that have fast moving animations.
  • [Core] Entities.Renderer renamed Entities.EntityRenderer.
  • [Core] The Entity type now supports animated surfaces. When creating an entity, you must specify it as a single cell entity or animated surface entity.
  • [Core] The effects system had a bug where if you added the same effect with the same cell twice, and the effect should restore the cell state, it wouldn't.
  • [Core] AsciiKey used by the keyboard system now detects capslock and shifted state to produce capital or lowercase letters.
  • [Core] AsciiKey exposes a bunch of static dictionaries that help with remapping keys and characters.
  • [Core] ColoredGlyph.IsVisible now sets ColoredGlyph.IsDirty to true when its value changes.
  • [Core] Surface.RenderSteps moved to the renderer.
  • [Core] RenderSteps is now a List and you must call RenderSteps.Sort(SadConsole.Renderers.RenderStepComparer.Instance) when the collection is changed.
  • [Core] Instructions.DrawString uses System.TimeSpan now, and is more accurate.
  • [Core] Effects have a RunEffectOnApply property that will run the effect.Update method once, with a duration of zero, when the effect is added to a manager.
  • [Core] EffectsManager will apply the active effect to a cell right when the cell is added to the effect. This was happening on the next render frame.
  • [Core] Surface shifting is much more performant (Thanks Chris3606)
  • [Core] Cursor has some new methods for erasing: Erase, EraseUp, EraseDown, EraseLeft, EraseRight, EraseColumn, EraseRow.
  • [Core] Mouse state object now tracks *ButtonDownDuration times. When the button is down and the time is zero, this indicates the button was just pressed. Otherwise, you can detect how long the button has been held down.
  • [Core] Rename RexPaint ToLayersComponent to ToCellSurface.
  • [Core] Rework Timer with Start/Stop/Restart methods.
  • [Core] If you load a font that's already been loaded, the existing instance is returned and the recently deserialized font is discarded. Previously the old font was replaced in the GameHost.Fonts dictionary.
  • [Core] ColoredGlyph.Decorators are Poolable Lists now and don't need to be messed with as arrays. Use SadConsole.CellDecoratorHelpers to manage the property.
  • [UI] Scroll bar with a size of 3 now disables the middle area, and you can use a size of 2 now.
  • [UI] Scroll bar supports a thickness other than 1.
  • [UI] Control host would get stuck when tabbing to a control that was disabled. Now it skips the control.
  • [UI] ControlBase.IsDirty property now calls the protected OnIsDirtyChanged method which then raises the IsDirtyChanged event.
  • [UI] Panel control uses CompositeControl as a base class. Control can draw a border.
  • [UI] ProgressBar is easier to customize.
  • [UI] Colors.Name property added.
  • [UI] ListBox.ItemsArea property added which the mouse now watches for so that it knows it's interacting with the list items specifically.
  • [ExtendedLib] Border control uses view size now instead of full size of wrapping object.
  • [ExtendedLib] Border.AddToSurface/Window has been renamed to Border.CreateForSurface/Window.
  • [ExtendedLib] Entities.EntityManager renamed Entities.EntityManagerZoned.
  • [ExtendedLib] Added SmoothMove.IsEnabled to disable the component and prevent animation.
  • [ExtendedLib] Fixed ColorBar bug with selecting a color before it's first drawn.

Removed

  • [Core] Algorithms.Line\Circle\Ellipse have been removed. The latest primitives library provides these methods.
  • [Core] Shapes namespace removed. The latest primitives library release that SadConsole uses, provides these.

Host changes

  • [MonoGame] NuGet package has a -windows framework target that targets DirectX and adds support for WPF.
  • [MonoGame] Fix conversion of Mirror to SpriteEffects.
  • [MonoGame\SFML] Surface renderers now skip the glyph if the glyph is 0.
  • [MonoGame\SFML] New SurfaceDirtyCells renderer added which only draws cells that are marked dirty.
  • [MonoGame\SFML] New SadConsole.Configuration.Builder object used for creating a SadConsole game.

Version 9.2.2

22 Jan 20:22
3e0b48d
Compare
Choose a tag to compare

This release fixes the Mirror type not converting correctly to the monogame SpriteEffect enum.

What's Changed

New Contributors

Full Changelog: 9.2.1...9.2.2

Release 9.2.1

22 Jan 20:20
Compare
Choose a tag to compare

API documentation didn't generate correctly in the 9.2.0 release. 9.2.1 is only a rebuild to fix the documentation.

Full Changelog: 9.2.0...9.2.1

Version 9.2.0

31 Dec 02:07
Compare
Choose a tag to compare

Breaking changes

  • [Breaking] Print(int x, int y, ColoredGlyph glyph) renamed to SetGlyph.
  • [Breaking] Surface SetEffect method signatures have changed.
  • [Breaking] Renamed Animation.ConvertImageFile to Animation.FromImage.
  • [Breaking] Removed ColorGradient as this type is implemented in the SadRogue.Primitives library as Gradient.

Behavioral changes

  • [Behavior] ColoredString.String.Set forced the string through the parser. This has now changed to use the characters directly.
  • [Behavior] All ColoredString contructors that used the (string) overload used the string parser. This is no longer the case.
  • [Behavior] ColoredString.IgnoreEffect no longer defaults to true.
  • [Behavior] Using Surface.Print methods that used the string parser for fore/back/mirror will force those settings after the string was parsed and not before.
  • [Behavior] Surface Clear and Fill methods now clear the effect.
  • [Behavior] Print statements have been updated to all act the same.
    • 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.

Host changes

  • [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 FrameNumber property that incremenets each frame cycle.
  • [SFML] Fixed Settings.UnlimitedFPS. This now works.

Other changes

  • [Core] Fixed bug that caused redraws every frame even if nothing had changed.
  • [Core] Cursor didn't respect Cursor.UseStringParser because of how ColoredString was always using the string parser. This is fixed now.
  • [Core] Cursor has a Cursor.MouseClickRepositionHandlesMouse property 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.
  • [Core] DrawString instruction overrides reset now, fixing a bug with having the instruction run more than once.
  • [Core] Surface.ShiftLeft|Right|Up\Down methods now move decorators.
  • [Core] New Surface.ShiftRow and Surface.ShiftColumn methods added. (Chris3606)
  • [Core] ColoredString.SetDecorators added, to fit in with SetForeground, SetBackground, etc.
  • [Core] Renamed EffectsChain to EffectSet and added new CodeEffect type.
  • [Core] Effects use TimeSpan instead of double.
  • [Core] The EffectsManager used by a surface now works on cell instances, not cell indicies.
  • [Core] Resizing a surface without the clear parameter keeps existing effects instead of dropping them.
  • [Core] AnimatedSurface.FromImage helper 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 SadConsoles.Readers namespace. (RychuP)
  • [Core] Entity renderer has a RemoveAll method to clear out all the entities.
  • [Core] Entity renderer now has a SkipExistsChecks property which can greatly improve performance when adding/removing entities (when you already have a lot of entities).
  • [Core] For entities, added AnimatedAppearanceComponent which can be added to an entity to animate the glyph like the AnimatedSurface did for the old entity type.
  • [UI] Fix various minor bugs with controls.
  • [UI] Textbox has more events related to text changing.
  • [UI] Textbox behaviors have changed slightly. For example, EditingText event doesn't fire when the text ends up being the same prior to editing.
  • [UI] ListBox items 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.IParser.
  • [StringParser] Moved current parse code to StringParser.Default.
  • [StringParser] ColoredString.Parse is obsolete and forwards to ColoredString.Parser.Parse.
  • [StringParser] String processor now has a decorators command: [c:d glyph:mirror:color[:count]]
  • [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.PrintFadingText extension method that prints text using the DrawString instruction with an effect.

Version 9.1.0

06 Jul 02:05
6748733
Compare
Choose a tag to compare
  • ListBox can display colored strings now.
  • Serialization contracts type is exposed for deriving: SadConsole.Serializer.Contracts.
  • Some On* members of ScreenSurface weren't virtual; fixed.
  • Cursor changes it's cached surface when the parent object's surface changes.
  • Cursor bug fixes.
  • Entity is serializable now.
  • Entities.Renderer can now have entities added/removed without a host object.
  • Added new extension methods in the SadConsole.Quick namespace to speed up construction of objects.
  • ScreenObject.SadComponentAdded/Removed callbacks renamed to OnSadComponentAdded/Removed`.
  • IScreenObject.Surface can now be set.

Version published for v9 NuGet packages

06 Jun 15:43
Compare
Choose a tag to compare

Main libraries were published as v9.0.0. However, some small changes to the project were made for some of the support libraries to also target .NET 5.0 and those versions were bumped to v9.0.1. All of this is considered part of the release for v9 of SadConsole.

8.99.3 Code base. Last of the v8 line

16 May 01:39
105c224
Compare
Choose a tag to compare
Merge pull request #256 from Thraka/develop

An old example of creating a monogame game and adding sadconsole to it