{"id":15038882,"url":"https://github.com/thraka/sadconsole","last_synced_at":"2025-05-13T22:03:05.924Z","repository":{"id":15498100,"uuid":"18232012","full_name":"Thraka/SadConsole","owner":"Thraka","description":"A .NET ascii/ansi console engine written in C# for MonoGame and SFML. Create your own text roguelike (or other) games!","archived":false,"fork":false,"pushed_at":"2025-04-04T15:02:32.000Z","size":69174,"stargazers_count":1280,"open_issues_count":8,"forks_count":120,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-04-04T15:09:16.865Z","etag":null,"topics":["ansi","ascii","c-sharp","console","game-engine","gamedev","monogame","roguelike","sadconsole"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Thraka.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-03-29T01:53:48.000Z","updated_at":"2025-04-02T22:39:29.000Z","dependencies_parsed_at":"2024-05-02T06:56:18.153Z","dependency_job_id":"42edc340-989e-411d-91ab-d5a44bdf62f2","html_url":"https://github.com/Thraka/SadConsole","commit_stats":{"total_commits":1982,"total_committers":26,"mean_commits":76.23076923076923,"dds":0.0625630676084763,"last_synced_commit":"e94f37e9957d3ed0560cf8ca533d44fa12679e43"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thraka%2FSadConsole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thraka%2FSadConsole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thraka%2FSadConsole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thraka%2FSadConsole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thraka","download_url":"https://codeload.github.com/Thraka/SadConsole/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248475812,"owners_count":21110158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi","ascii","c-sharp","console","game-engine","gamedev","monogame","roguelike","sadconsole"],"created_at":"2024-09-24T20:40:38.265Z","updated_at":"2025-04-11T20:29:30.491Z","avatar_url":"https://github.com/Thraka.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![SadConsole Logo](https://raw.githubusercontent.com/Thraka/SadConsole/master/images/SadConsoleLogo.gif)\n\n[![Chat on discord](https://img.shields.io/discord/501465397518925843.svg)](https://discord.gg/pAFNKYjczM)\n[![NuGet](https://img.shields.io/nuget/v/SadConsole.svg)][nuget]\n\nSadConsole is a C#-based .NET cross-platform terminal, ascii, console, game engine. It simulates these types of programs and with it you can make ascii-styled games for modern platforms. At its heart, SadConsole is really a giant tile-based game engine. However, its object model is conceptually similar to a traditional console app.\n\nWhile 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 **SadConsole.Host.MonoGame** and **SadConsole.Host.SFML**. When adding a host library to your project, you don't need to reference the base **SadConsole** package. If you use MonoGame, you'll also need to add a rendering NuGet package, such as **MonoGame.Framework.DesktopGL**.\n\n_SadConsole currently targets .NET 6, .NET 7, .NET 8, and .NET 9_\n\nFor the latest changes in this release, see the [notes below](#latest-changes)\n\n## Features\n\nHere are some of the features SadConsole supports:\n\n- Show any number of consoles of any size.\n- Uses graphical tile-based images to build out an ASCII-character font with support for more than 256 characters.\n- Fonts are simply sprite sheet tilesets tied to ascii codes, you can use full graphical tiles if you want.\n- Use more than one font file. However, each console is restricted to a single font.\n- Full GUI system for interactive controls such as list boxes, buttons, and text fields.\n- Importers for [DOS ANSI files](https://wikipedia.org/wiki/ANSI_art), [TheDraw text fonts](https://en.wikipedia.org/wiki/TheDraw), [RexPaint](https://www.gridsagegames.com/rexpaint/), and [Playscii](http://vectorpoem.com/playscii/).\n- Animated consoles and instruction system to chain commands together.\n- String encoding system for colors and effects while printing.\n- Entity support for drawing thousands of movable objects on the screen\n- Translating images to text-blocks.\n- Keyboard and mouse support.\n- Highly customizable framework.\n\n#### String display and parsing\n\n![string pic](https://raw.githubusercontent.com/Thraka/SadConsole/master/images/stringparseexample.gif)\n\n#### GUI library\n\n![GUI library pic](https://raw.githubusercontent.com/Thraka/SadConsole/master/images/controls.gif)\n\n#### Scrolling\n\n![scrolling console](https://raw.githubusercontent.com/Thraka/SadConsole/master/images/scrolling-example2.gif)\n\n[nuget]: http://www.nuget.org/packages/SadConsole/\n\n## Example startup code\n\n```csharp\nusing Console = SadConsole.Console;\nusing SadConsole;\nusing SadConsole.Configuration;\nusing SadRogue.Primitives;\n\nSettings.WindowTitle = \"SadConsole Examples\";\n\n// Configure how SadConsole starts up\nBuilder startup = new Builder()\n    .SetScreenSize(90, 30)\n    .UseDefaultConsole()\n    .OnStart(Game_Started)\n    .IsStartingScreenFocused(true)\n    .ConfigureFonts(true)\n    ;\n\n// Setup the engine and start the game\nGame.Create(startup);\nGame.Instance.Run();\nGame.Instance.Dispose();\n\nvoid Game_Started(object? sender, GameHost host)\n{\n    ColoredGlyph boxBorder = new(Color.White, Color.Black, 178);\n    ColoredGlyph boxFill = new(Color.White, Color.Black);\n\n    Game.Instance.StartingConsole.FillWithRandomGarbage(255);\n    Game.Instance.StartingConsole.DrawBox(new Rectangle(2, 2, 26, 5), ShapeParameters.CreateFilled(boxBorder, boxFill));\n    Game.Instance.StartingConsole.Print(4, 4, \"Welcome to SadConsole!\");\n}\n```\n\n```vb\nImports SadConsole\nImports Console = SadConsole.Console\nImports SadConsole.Configuration\nImports SadRogue.Primitives\n\nModule Module1\n\n    Sub Main()\n\n        Dim startup As New Builder()\n\n        ' Configure how SadConsole starts up\n        startup.SetScreenSize(90, 30)\n        startup.UseDefaultConsole()\n        startup.OnStart(AddressOf Game_Started)\n        startup.IsStartingScreenFocused(True)\n        startup.ConfigureFonts(True)\n\n        ' Setup the engine and start the game\n        SadConsole.Game.Create(startup)\n        SadConsole.Game.Instance.Run()\n        SadConsole.Game.Instance.Dispose()\n\n    End Sub\n\n    Sub Game_Started(sender As Object, host As GameHost)\n\n        Dim boxBorder = New ColoredGlyph(Color.White, Color.Black, 178)\n        Dim boxFill = New ColoredGlyph(Color.White, Color.Black)\n\n        Game.Instance.StartingConsole.FillWithRandomGarbage(255)\n        Game.Instance.StartingConsole.DrawBox(New Rectangle(2, 2, 26, 5), ShapeParameters.CreateFilled(boxBorder, boxFill))\n        Game.Instance.StartingConsole.Print(4, 4, \"Welcome to SadConsole!\")\n\n    End Sub\n\nEnd Module\n```\n\n## Latest changes\n\n- [All] Add .NET 9 target. This will be the last release for .NET 6 and .NET 7.\n- [Core] Some components that used their own renderers weren't disposing the ones they replaced.\n- [UI] Fix bug with mouse moving over composite controls such as the list box.\n- [Extended] Rework `DebugMouseTint` class and add `DebugFocusedTint` class. Both settable as configuration builder options now.\n- [MonoGame] Use `TitleContainer` for serialization. This was previously removed for some reason. Configurable through the `UseTitleContainer` configuration builder option.\n- [Debug Library] Release the first version of the `SadConsole.Debug.MonoGame` library. This also adds general **ImGui** support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthraka%2Fsadconsole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthraka%2Fsadconsole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthraka%2Fsadconsole/lists"}