|
Written by Markus Ewald
|
|
Thursday, March 17 2011 09:54 |
|
A few hours ago, I uploaded a new release of the Nuclex Framework
to CodePlex. There has been an intermediate release, R1323, which I didn't
announce here because it was more or less just a stop-gap measure to
stop reports for issues in the old (old, old) R1242 release where my
Nuclex.Input library was still subclassing XNA's Window.
This is what changed from R1242 to R1404:
-
Thanks to a generous contribution by Adrian Tsai, the TrueType importer now accepts
standard Windows font names - this is a big step towards being a drop-in replacement for
XNA's own sprite font importer.
-
The TrueType importer now lets users choose different hinting algorithms. No hinting
will result in MacOSish blurred text that stays true to the font's metrics. The
auto hinter from FreeType is a nice compromise between forcing strokes into a pixel
raster for sharpness and retaining the font's look (and imho the best option).
Native will produce a perfect match with Windows' font rendering, producing sharp
letters that may deviate from the font's actual metrics a bit.
-
You can now decide whether SpriteFonts imported by the TrueType importer are centered
on their baseline or on their upper end (like XNA). This, together with the improved
font name lookup turns the Nuclex TrueType importer into a 100% drop-in replacement
for XNA's font processor.
-
Nuclex.Input's game pads now provide a method
.GetExtendedState() with
which you can access all of DirectInput's 128 possible buttons, 24 axes and 8 sliders.
I designed this so that there's zero overhead if you don't use the
.GetExtendedState() method. The ExtendedGamePadState
already normalizes axes for you (from -1.0 to +1.0 for axes and 0.0 to 1.0 for sliders)
and in general is much nicer to work with than using DirectInput directly!
-
Nuclex.Input now supports TouchPanel input. That includes mocking TouchPanel input:
You can easily simulate the TouchPanel in your unit tests:
var m = new MockInputManager();
m.GetTouchPanel().Press(42, 10.0f, 10.0f);
m.GetTouchPanel().Move(42, 20.0f, 10.0f);
m.GetTouchPanel().Release(42);
-
The GUI is now based on the Nuclex.Input library. That will allow me to soon
implement TouchPanel input and make the GUI usable on Windows Phone 7. Note that
you can easily hack Windows Phone 7 support into a project by converting
touch input into mouse input. Due to the modular design of Nuclex.Input, you don't
have to touch a single line of code, simple create your own
IInputCapturer!
-
The game state manager has undergone a redesign. Existing projects shouldn't be in
trouble, the redesign gets rid of the GameStateManager reference (you can remember
the Reference yourself if you want your states to initiate a transition themselves).
Pop-up game states similar to XNA's game state management example are now supported.
-
Upgraded to NMock 3.0. This is mostly an internal change but it really helps being
refactoring-friendly as my unit tests no longer contain method names hardcoded in
strings anymore.
-
All assemblies in the Nuclex Framework are now signed with a strong name, this no longer
preventing you from signing your own assemblies.
-
And of course, all issues that were reporting through various channels have been
fixed -- excluding two possible problems I can't yet reproduce, but will mention here
for honesty: the AffineThreadPool might sometimes be skipping a task under heavy load
and there might be a problem in the PrimitiveBatch when it is handed large amounts of
vertices. I couldn't reproduce these issues and they're not occurring in my own game,
but if anyone notices such an issue, please contact me!
|
Comments
The next update was planned to add full support for touch input on Windows Phones to my GUI and offer some new projects to help use IoC containers with XNA.
The IoC projects are finished and usable in my Subversion repository, the GUI updates are still in the queue.
Can't tell when I will get around to the GUI updates, I'm considering just publishing an updated release to get out a few fixes for bugs people ran into.
RSS feed for comments to this post