Some ConsoleWrapper changes

Have spent a bit of time working on ConsoleWrapper today:

Click through to see full size. As an aside, looking at that less-than-savoury edge antialiasing, I’m kind of tempted to implement some AA. An easier way would be to just put a black border into the texture though. Maybe something for next update.

Also evident in this screenshot, is the new feature whereby strings are rendered as individual letters, each letter being a sprite. Unfortunately, this means kerning is lost, and the string renders with significant whitespace between each character. This is something I am working to fix, but seems to be related to .NET’s Graphics library overestimating font sizes when performing a MeasureString operation.

Using sprites has also seemed to result in sub-par performance (i.e. lower performance than the old method of using pre-rendered full string textures), and I’m not entirely sure why – it was meant to increase performance, if anything. This is especially noticeable when rendering large swathes of text, such as from a DIR command on a large directory. Definitely something else to work on improving and optimising.

Note that I haven’t put out a compiled release of this yet, but the latest source is available as always on SourceForge.

Update 27th April: Here is a video showing the latest changes (including a fix to kerning problems):

New ConsoleWrapper version released!

ConsoleWrapper has had another large overhaul over the last few weeks.

Download the new release here!

New ConsoleWrapper version

I took the time today to make a few small changes to ConsoleWrapper which should improve usability and stability, namely:

Download it here!

Sending keystrokes to the console

One of the ways Console Wrapper is currently lacking, is that it doesn’t have a full set of features that one would expect from a regular console. Some are being built in (such as command history), but TAB completion, Ctrl-C process kill etc are still missing. These could be solved (in theory) by directly passing advanced keystrokes through to the console process.

ConsoleWrapper currently communicates with the console process via input and output streams. These allow for sending and receiving of string data, but not specific keystrokes (such as Ctrl-C). Unfortunately I’m still working on exactly how I can pass a key to the console. Because it doesn’t run in its own window (in order to capture input/output streams and hide the real console from the user) normal WinAPI methods for sending keystrokes do not work, as they target a window handle. In fact the regular console may not even have a message queue. So for now I’m stuck experimenting with SendMessage and WM_KEYDOWN, WM_KEYUP, etc. Not a nice clean .NET solution as I would have liked!

What is Console Wrapper?

ConsoleWrapper is, in short, a Direct3D wrapper for a standard Windows console.

Output from any console application (usually cmd.exe) is redirected through ConsoleWrapper, slapped onto 3D geometry, and animated. Currently, animation is basically smooth scrolling with a small amount of perspective, but potential is almost limitless.

Picture running multiple terminals at once, flipping through them like pages on a book, with full transparency, reflection, and physics effects. Lines drop into view, and discarded applications quietly fade away. These are just some of the possible concepts which can be achieved using a 3D environment such as ConsoleWrapper.

For more details, visit the ConsoleWrapper home page, or download the latest source code from SourceForge.