Mike over at Manders vs. Machine also has a cool new stroke-based text rendering solution over at his blog... this solution differs from the other text rendering solutions out there because it is resolution independent and shader based. The basic idea is to draw the font's glyphs with a series of strokes of a virtual pen... Mike outlines some of the pros and cons of using this type of solution:
- Nice and scalable!
- Flexible: I can do my usual mischief with vertex shaders and pixel shaders to make text look interesting and "game-like."
- Tight: You can probably tell by now that I like small programs that do a lot, so a complete font solution in 500 lines (and no external resources needed) makes me happy.
- You can change the font boldness to whatever you like by changing the line thickness.
- With a script font, it would be possible to draw text slowly and incrementally (as if by an invisible pen) for dramatic effect.
- Drawing curvy glyphs with straight lines is pretty inefficient, especially with my rounded caps at both ends of every segment. I'm sure my code is much slower than just splatting down a textured quad per character, but for the kind of programs I'm doing, Windows and the Xbox 360 have so much graphics horsepower to spare that I'm not concerned about it, especially for the small amount of text I'll be drawing (e.g., "Game Over" or "Score: 56,000"). The demo app draws a lot of text, so it's a bit clunky.
- If you zoom enough, the tessellation of curved characters is visible.
Most of my line effects look bad on the stroke text, due to the overlap between line segments. I'm planning to write some different pixel shaders that do effects based on the transformed position, rather than on each line's rho/theta -- that should avoid those issues.
take a look...
Thanks to Mateusz Kierepka for the link to Visual3D.NET... Visual3D.NET is a shader-based 3D engine and rapid production toolset for visually authoring interactive virtual worlds using C# and VB with Microsoft .NET, XNA Framework, and Visual Studio.
Looks like it offer alot of the same functionality of XNAMagic... it is great to see these kinds of tools poping up for XNA! Take a look!
OK! If you haven't seen it yet you HAVE to jump over to http://www.xnamagic.com
and checkout the Media Gallery! XNAMagic is "The first true 3D game development system designed exclusively for the XNA Framework"!
XNAMagic should hit BETA one in Feburary and they are taking signups right now at their site! The core engine is designed to work on both Windows and the 360 and features a fully dynamic design time environment that allows you to see changes to all your game components, shaders, and assets in real time!
THIS LOOKS VERY COOL! I spent almost an hour at the site looking at the various demos they have up! Take a look!
Jon Watte has released an XNA compatable Lisp interpreter library to allow for run-time scripting in XNA games. From the description:
It is a small Lisp interpreter intended for use for high- level functions in games written in Microsoft XNA, or other C#-dependent platforms. To use it simply build this file as an assembly named LispLib, and add it to your project. You can then execute text Lisp code through the Interpreter.Eval function.