Nuclex Framework
The Nuclex Framework is a collection of well-designed building blocks for XNA games and other demanding applications written in .NET. These building blocks are not interconnected -- you can pick what you need, mix and match with other class libraries and architect your game the way you want it.
Goals
The goal of the Nuclex Framework is not to provide quickly slammed together showpieces, but to provide efficient, robust and well-designed code that tackles the really hard problems game developers will come across. Often, we developers will cut corners and choose an easier compromise when we encounter difficulties. The Nuclex Framework tries to do it right :)
In addition to the functionality itself, you will find that wherever you look, all code is thoroughly documented with XML comments and that there are unit tests in place for virtually everything. Most assemblies have 100% test coverage - that means each and every line of code is exercised at least once when you execute the unit tests.
A word of warning: using this framework requires a solid understanding of your programming language and the principles of object oriented programming. This codebase is not designed to make things easier for newbies - it's designed to help out the pros ;)
News
11/12/2009 - Almost there. Because the GUI came along so nicely, I decided that instead of releasing with an intermediate state of the GUI library, I would go for a finished GUI library in the release. Mice, keyboards and game pads are now all handled using a single, unified input response model that guarantees consistent state and prevents input routing code from flowing over into individual controls.
10/09/2009 - New Release incoming! It's probably going to be R940 or somewhere around that revision. The GUI is fully usable now and contains windows, labels, buttons, check boxes, radio buttons, input boxes and list boxes behaving like their Windows counterparts. Check out the preview here:
GUI Nearing Completion09/22/2009 - Just uploaded a new release (R884) in which the particle system is fully implemented. The Semaphore (and therefore the AffineThreadPool class) will now work on the XBox 360. The GUI demo now displays an example dialog (which is not interactive yet, the GUI is sadly still work-in-progress). And the binaries archive now also contains all the demo executables for your one-click viewing pleasure :)
Highlights
Here are direct links to some of the cooler features of the Nuclex Framework:
Features by Assembly
The services of the Nuclex Framework by the assemblies they're implemented in
Here's an illustration showing how the individual assemblies are layered:
How to Compile
To compile the Nuclex Framework, you either need one of the full Visual Studio 2008 SP1 editions or
Visual C# 2008 Express SP1, which Microsoft is providing at no charge. Express users will also have to install the Visual C
2008 SP1 Runtime (
x86,
x64) for
Nuclex.Fonts.Content.TrueTypeImporter, the custom
SpriteFont and VectorFont importer.
With all prerequisites installed, these are the steps to compile the Nuclex Framework:
- Open the Framework solution (either Framework (x86).sln for the PC build or Framework (Xbox 360).sln for the Xbox 360 build) in Visual Studio 2008 or Visual C# 2008 Express.
- Do a "Build Solution" each for the debug and the release configuration
- Right click the demo you want to run and select "Set as StartUp project", then press F5 ;)
You can also compile the Nuclex Framework from the command line using a recent version of
NAnt if you have Visual C
2008 Express SP1 or Visual Studio 2008 SP1 installed (the NAnt build script always compiles
Nuclex.Fonts.Content.TrueTypeImporter)
1. Run 'nant compile' in the root directory of the Nuclex Framework
How to Use
Recommended: Add Projects to WorkspaceIf you want to use the Nuclex Framework in your own games, my recommendation would be to directly add the projects you need to your game solution. This allows you to benefit from additional checks when you do a debug build while getting all possible speed in a release build.
Alternative: Reference BinariesYou can also use the binary release from the download page on !CodePlex, containing all assemblies in precompiled form. Visual Studio, Express or not, will however not take care to copy dependencies and sub-dependencies of the binaries into your project's output folder. For example, if you referenced the
Nuclex.UserInterface assembly,
Nuclex.Graphics and
Nuclex.Support will not automatically copied to the output directory.
To circumvent this issue, you can either reference those additional assemblies as well or add them as a linked file to your project, setting the update method to "Copy if Newer". The latter approach is cleaner because you do not reference unnecessary assemblies this way.