Sunday, February 06, 2011

XNA Command Console (XNACC)

Project Description
XNACC is a component that adds an interactive command console to your XNA project. It supports many built-in commands, as well as custom commands, key bindings, simple functions (macros), console variables and can use functions in external assemblies.
Implemented in C#/VS2010.

Origin

The code for the XNA Command Console originated with the XNA Console Component Sample, by Kevin Jurkowski. The code was originally obtained from the ZiggyWare site (http://www.ziggyware.com/readarticle.php?article_id=163) back in '09. Other versions of the original code, or pages that mention it, can be found at the following locations:

Enhancements

  • Quite a few enhancements have been made to the code since then. Some of the highlights are:
  • Abstraction into an extendable base class
  • Expanded keyboard support, and encapsulation of keyboard input providers
  • Built-in commands
  • Colorizing of console output
  • Command history and completion
  • Scrollable log/output
  • Support for "hidden" (secret) commands and functions
  • Custom functions (basically macros that support parameters)
  • External functions (implemented in a .NET assembly)
  • Key bindings
  • Addition of dynamic Console Variables (cvars)
  • Ability to lock-down functions, bindings and external functions (to prevent tampering with a released game)
More details are available in the documentation.

Read more: Codeplex