knightfox75 / nds_nflib

C library for Nintendo DS software development based upon DevkitARM
Other
92 stars 8 forks source link
c develop game libnds library nds

############## NightFox’s Lib ##############

Introduction

NightFox’s Lib is a library written in C to make it easier to develop for the NDS. It depends on libnds, but it is much easier than libnds if the user wants to use backgrounds, sprites, collision maps, etc.

Features:

Setup instructions for BlocksDS

  1. Clone this repository. If you have followed the getting started guide of BlocksDS <https://blocksds.github.io/docs/>_, all you have to do is go to the folder of NFlib and run:

    .. code:: bash

    make install

  2. That's it! Go to the folder of any of the examples and try to build it with:

    .. code:: bash

    make

Note: The build system of the examples in this repository is make. The makefiles aren't very flexible, and they don't support saving graphics to the filesystem (you can only inject them as data to the ARM9, which isn't acceptable for big games).

You can try ArchitectDS <https://github.com/AntonioND/architectds>_. This build system written in Python is more flexible, and it allows you to save your converted graphics to NitroFS so that your game can grow as much as you want.

Setup instructions for devkitPro

This option is discouraged. The implementation of NitroFS of devkitPro is buggy and it won't work in accurate emulators like melonDS.

  1. Clone this repository. Create a symbolic link to it inside the devkitPro folder in your system, and call it nflib.

    For example, in Linux, create a symlink so that /opt/devkitpro/nflib points to the folder with NFlib:

    .. code:: bash

    ln -sT /path/to/nds_nflib /opt/devkitpro/nflib

    On Windows, the path should be C:\devkitpro\nflib.

    If this doesn't work, copy the folder of NFlib to the devkitPro folder and rename it to nflib.

  2. Go to the nflib folder and type this on the terminal:

    .. code:: bash

    make -f Makefile.dkp

  3. That's it! Go to the folder of any of the examples and try to build it with:

    .. code:: bash

    make -f Makefile.dkp