c# console library - Is there any console “graphics” library for .Net?


1 Answers

You could try Curses-Sharp http://sourceforge.net/projects/curses-sharp/ or libtcod https://bitbucket.org/libtcod/libtcod

curses-sharp is a "A full featured, object-oriented, multi-platform C# wrapper for the curses terminal control library. "

and libtcod is "...a free, fast, portable and uncomplicated API for roguelike developpers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes."

c# console gui

My basic goal here is writing a .NET remake of Kingdom of Kroz. For those not familiar with the game:

http://www.indiefaqs.com/index.php/Kingdom_of_Kroz

http://www.youtube.com/watch?v=cHwlNAFXpIw

Originally it was supposed to be a quick distraction project to give me a break from all the generic enterprise WCF/WF/LINQ2SQL/etc work projects occupying most of my time lately. While the result of my effort is playable, it looks like absolute arse (even for a console-based game) because of the way I'm redrawing everything in each frame.

I'm aware of some alternate approaches but in the brief tests I've done they still don't offer significant performance or aesthetic benefits. I don't want to resort to a library which 'emulates' a console if I can help it. I'd prefer to work with the proper Win32 console API under the hood, but not to work with it directly if I can help it. Keeping in mind that it's a distinctly niche use case, what would be the 'generally' accepted best approach for this? Are there any particularly optimal console 'drawing' techniques one should be aware of? I don't mind swimming in a sea of PInvoke and marshalling as long as it still ends up with a fast, responsive and efficient console UI.



Related