µ
Library is a new library for Nintendo DS. Basically, it is meant to use the 3D GPU to create nice 2D games very easily, using a different approach than existing libraries (quite similar to OSLib).
The 3D GPU provides additional effects over the 2D GPU, like full transparency with alpha channel (objects can blend amongst them), a larger number of sprites (up to 1536 instead of 128), no zoom or rotation limit (2x with the 2D GPU), a larger limit for the sprite size (2048x2048 instead of 64x64). It is also possible to draw primitives like lines, rectangles, etc. allowing nice effects like in Yoshi's island for example
µLibrary also provides a low level layer and is open to the hardware. You can also mix 2D and 3D in a single project.
The problem of using the 3D GPU is clear: you can only use one screen at a time, or 2 screens but at 30 fps. However, µLibrary is fully compatible with PALib and you can use it to handle the second screen at 60 fps. It's a good solution if you do not plan to use the second screen intensively: displaying a BG with some sprites and get the stylus state could be enough, and you can concentrate on the main screen which is driven by µLibrary.
Here is a small list of functionalities offered by µLibrary:
Supported image formats: PNG, GIF, JPG
Special image effects: stretching, tinting (4 corners), mirroring, rotation (with a defined center), selection of an image frame to display (just like on spritesheets).
18-bit render quality instead of 15-bit: provides 8 times more colors!
Virtual file system: it is possible to load files independantly from the actual support (RAM, libFat, GBFS are supported by default, but you can define your own). Allows to create more easily software that are compatible with all existing linkers
Untextured geometry (rectangles, gradients, lines, etc.)
Basic message box system
VideoGL wrapper for texture and palette loading in VRAM: it is now possible to load and unload things dynamically. Furthermore, it is more flexible (you can choose which banks you want to use for what, etc.)
Keypad and touchscreen handler namely with support of stylus speed and double click and support of autorepeated keys (menus for example).
Includes 2 splash screens
Low level wrapper to draw primitives
Text system using the same font format as OSLib
Performance is good, one of the examples shows that an unoptimized C++ code that draws 400 balls bouncing on the screen uses less than 15% of CPU...
A few examples are supplied, as well as a Doxygen documentation and a small .chm documentation with a FAQ. There are also 2 templates for VHAM, Programmers Notepad or just make, one with PALib and one without it.
The render method is similar to a sheet of paper: you first draw a background, then put some mountains, then some trees, some characters and so on: you draw your objects in the order they should appear on the screen (the first is behind, the last one is over the others).
23.08.08 | µLibrary 1.11
An update to µLibrary, correcting a few bugs.