Homebrew NightFox's lib for Libnds (NFlib) (DS Entry -- Coding Library)

knightFox

Well-Known Member
OP
Newcomer
Joined
Dec 30, 2007
Messages
49
Trophies
0
Age
46
Location
Barcelona, Spain
Website
www.nightfoxandco.com
XP
164
Country
NightFox’s Lib is a library written in C that we have developed to facilitate programming for the DS. Based on Libnds of devkitArm, our library contains functions witch make the use of backgrounds, sprites, collision maps, etc much easier.

Major upgrade since last 4 months:
- 3D Sprites.
Unique features using 3D engine console, which can create up to 256 sprites on screen simultaneously with a maximum size of 1024×1024, with the possibility of rotation, scaling and up to 62 units of different transparency.

Complete info and downloads:
http://www.nightfoxandco.com/index.php/cod...nfl-en/?lang=en

Games made with this lib:
http://www.nightfoxandco.com/index.php/pro...y-wars/?lang=en
http://www.nightfoxandco.com/index.php/pro...rap-en/?lang=en

Games that uses this new feature:
http://www.nightfoxandco.com/index.php/wor...d-maze/?lang=en

Regards!
 
  • Like
Reactions: eyeliner

corenting

Well-Known Member
Member
Joined
Jul 17, 2008
Messages
288
Trophies
0
Website
www.corenting.fr
XP
677
Country
France
Great library, keep us the good work !

But is there an equivalent to Palib's PA_StylusInZone ? I find this function useful and I wanted to do the same with nflib but I don't know how...
 

knightFox

Well-Known Member
OP
Newcomer
Joined
Dec 30, 2007
Messages
49
Trophies
0
Age
46
Location
Barcelona, Spain
Website
www.nightfoxandco.com
XP
164
Country
corenting said:
Great library, keep us the good work !

But is there an equivalent to Palib's PA_StylusInZone ? I find this function useful and I wanted to do the same with nflib but I don't know how...

Look at any libnds examples with stylus support. Do that it's a simple IF with 4 conditionals... nothing hard, even for a beginner coder, that's why i dont include any thing "easy" done in libnds in my lib. Duplicate easy things on my lib only makes grow and make it unusefull
 

corenting

Well-Known Member
Member
Joined
Jul 17, 2008
Messages
288
Trophies
0
Website
www.corenting.fr
XP
677
Country
France
knightFox said:
corenting said:
Great library, keep us the good work !

But is there an equivalent to Palib's PA_StylusInZone ? I find this function useful and I wanted to do the same with nflib but I don't know how...

Look at any libnds examples with stylus support. Do that it's a simple IF with 4 conditionals... nothing hard, even for a beginner coder, that's why i dont include any thing "easy" done in libnds in my lib. Duplicate easy things on my lib only makes grow and make it unusefull

Thanks for the answer !
It's very good idea to not duplicate easy things in fact. I will try with an IF and 4 conditionals. I also have to think myself
biggrin.gif
 

frezziii

Member
Newcomer
Joined
Aug 14, 2012
Messages
10
Trophies
0
XP
3
Country
Gambia, The
Geat library! But the only reason why I don't use it, is that the text engine isn't very well. The text engine should support text fonts which are created by dsFont...
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
28,279
Trophies
2
Location
Gaming Grotto
XP
25,686
Country
Poland
Geat library! But the only reason why I don't use it, is that the text engine isn't very well. The text engine should support text fonts which are created by dsFont...
What's the problem in saving your output file from dsFont as a BMP and converting it via GRIT as you normally would? :P
 

frezziii

Member
Newcomer
Joined
Aug 14, 2012
Messages
10
Trophies
0
XP
3
Country
Gambia, The
Geat library! But the only reason why I don't use it, is that the text engine isn't very well. The text engine should support text fonts which are created by dsFont...
What's the problem in saving your output file from dsFont as a BMP and converting it via GRIT as you normally would? :P
It's not so easy ^^ the letters in the text fonts which are created by dsFont have another order as the letters in text fonts in the examples of the library :P
 

ExplodingGoose123

Member
Newcomer
Joined
Aug 11, 2020
Messages
9
Trophies
0
Age
17
XP
31
Country
Netherlands
Me and a friend are trying to program a ds game, -we are pretty much total newbies- and we are having trouble. We are trying to convert a file to a tiled background. But the Convert_Backgrounds.bat only gives us error messages:

ERROR: "bmp\backgrounds.bmp" not found or can't be read.
File Not Found
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.

The background file is 256*192 pixels in a .bmp format, but i don't know if all colors are 8-bit. If so, what is the best editor where you (only) can use 8-bit colors en set your own resolution?
 
Last edited by ExplodingGoose123,

ngawung

Member
Newcomer
Joined
Aug 14, 2020
Messages
6
Trophies
0
Age
21
XP
38
Country
Indonesia
"ERROR: "bmp\backgrounds.bmp" not found or can't be read.
File Not Found

ok i personally like to convert my image manually from cmd line, so i know exactly what file im converting...

to convert background type
Code:
grit.exe your/bg/path/here.bmp -g -gTFF00FF -m -mRtf -mLs -p -ftb
this will generate .pal .map .img .... you also need to remove .bin by renaming the file... usually this is automatically if you using Convert_Backgrounds.bat from nflib

The background file is 256*192 pixels in a .bmp format, but i don't know if all colors are 8-bit. If so, what is the best editor where you (only) can use 8-bit colors en set your own resolution?

there is a good thread about how you prepared image for grit here...
gbatemp.net/threads/preparing-images-for-grit.567187
also i think you can only use square image like 256x256 or 512x512
 
Last edited by ngawung,

ExplodingGoose123

Member
Newcomer
Joined
Aug 11, 2020
Messages
9
Trophies
0
Age
17
XP
31
Country
Netherlands
Thanks for your response ngawung. The link you provided worked good, and i can now convert backgrounds. But i would like to add a sprite/sprites, and i don't get any errors when i convert it (via the batch file), but it doesn't make a .map file. It does make a .pal and a .img file. I am not sure if my images are 8-bit. If that is the problem, is there any software to convert my images? (I used the same method for backgrounds in my sprites in the link you provided)
You can use non-square images btw, at least for backgrounds.;)

Edit: Figured out you don't need a .map file for a sprite. Was just a mistake in my code (tried to load a background instead of the sprite).
 
Last edited by ExplodingGoose123,
General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://imgur.com/gallery/Zp9236z