- NFlib
-
NFlib Developer(s) Cesar Rincon Stable release 20110906 / September 6, 2011 Operating system Cross-platform Type API License Creative Commons Website http://www.nightfoxandco.com/index.php/coding/nfl-en/?lang=en NFlib or NightFox’s lib is a library written in the C programming language, developed to facilitate programming for the Nintendo DS. It is based upon devkitARM and libnds. It contains functions that ease the use of backgrounds, sprites, collision detection, and more.
The basic features of the library are:
- 256 colors Tiled Backgrounds - It is possible to load up to 32 backgrounds to RAM from files using the FAT filesystem or the Nitro filesystem. The pixel size of backgrounds must be in multiples of 256. The background system also supports extended palettes and can have up to 16 palettes of 256 colors. The VRAM configuration allows the use of 96 Kilobytes for tiles and 32 Kilobytes for maps. The system also supports infinite maps, using the “bank swap” technique, maintaining the entire map on RAM and copying only the necessary portions to VRAM. The only limitation is the size of the Tileset, which may not exceed 96 Kilobytes for all of the layers. NFLib also contains functions for manipulating backgrounds: display/hide backgrounds, unload from RAM, change the map tiles by code, change the palette colors, extended palettes, and more.
- 256 colors Sprites - You can load up to 256 graphics and 64 palettes for sprites. The system allows creation/deletion of sprites and hiding, rotating, resizing and flipping them. You can place up to 128 sprites per screen. The system also supports animated sprites with unlimited amount of frames, the frames can also be stored in VRAM, or just the current one. The system also supports the modification of a sprite palette to create effects.
- Text Engine - Based on the tiled backgrounds system, has support for fonts of 8×8 and 8×16 pixels. Fonts supports up to 256 colors (you can use colored fonts), definition of your own colors, choice of the orientation of the text (normal, rotated clockwise, rotated counterclockwise), scrolling, and more. You must load a font for each text layer (up to 4 per screen).
- Sound - Basic support for loading RAW files from the FAT filesystem or the Nitro filesystem. Use of Libnds engine for playback. You can load up to 32 sounds in RAM.
- Collision Maps - Many games require the use of Collision Maps. NFlib supports Collision Maps, editable from code and can work with up to 32 maps at a time and stored in RAM.
- 8-bit color and 16-bit color backgrounds - You can use 8-bit color or 16-bit color backgrounds and images if you need more color depth on the screen. It includes functions for loading and drawing these backgrounds on the screen. You can load up to 16 RAW images of 8-bit color or 16-bit color. This system also has support writing to the Backbuffer.
- Bitmaps - The library provides functions for loading and displays bitmap files. You can load 8, 16 or 24 bits bitmap files and display them on the screen (16-bit mode). The library also handles the loading of BMP files and conversion into 16-bit color depth.
- 3D Sprites - Unique features using the 3D engine of the Nintendo DS, which can create up to 256 sprites on a screen simultaneously with a maximum size of 1024×1024, with the possibility of rotation, scaling and up to 62 units of different transparency.
- Wi-fi - Very basic support for wireless communication using a wireless access point. There is partial support for UDP and it is under development.
- Examples - The library includes over 30 examples ready for compilation, who show almost all of the functionality it incorporates.
- Documentation - Complete documentation in PDF, with full description of all of the functions.
References
External Links
Nintendo DS homebrew Storage devices Homebrew programming Categories:
Wikimedia Foundation. 2010.