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

knightFox

Well-Known Member
OP
Newcomer
Joined
Dec 30, 2007
Messages
49
Trophies
1
Age
49
Location
Barcelona, Spain
Website
www.nightfoxandco.com
XP
229
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
1
Website
www.corenting.fr
XP
1,057
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
1
Age
49
Location
Barcelona, Spain
Website
www.nightfoxandco.com
XP
229
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
1
Website
www.corenting.fr
XP
1,057
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
30,871
Trophies
3
Location
Gaming Grotto
XP
29,995
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
20
XP
61
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,

TuanPanda

Member
Newcomer
Joined
Aug 14, 2020
Messages
6
Trophies
0
Age
24
XP
78
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 TuanPanda,

ExplodingGoose123

Member
Newcomer
Joined
Aug 11, 2020
Messages
9
Trophies
0
Age
20
XP
61
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,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • kijetesantakalu042 @ kijetesantakalu042:
    It cant do image editing but for drawing its really good
    +1
  • BigOnYa @ BigOnYa:
    There was a cool Ai character animator tool I found online , can't remember name, but it would take any pic and create animated scenes for you, was expensive, I only tried the trial. I remember getting pissed cause trial would not let you save, just preview.
    +1
  • kijetesantakalu042 @ kijetesantakalu042:
    Can't you just do that with a video editor or open toonz
  • BigOnYa @ BigOnYa:
    Maybe, but you have to create every frame/pic, walking right may have 8 frames/ pics, walking left 8 frames/pics etc. Takes forever.
    +1
  • kijetesantakalu042 @ kijetesantakalu042:
    @BigOnYa you can just use a plastic deform + keyframes. It's way easier than animating it by hand or paying 100 bucks
    +1
  • BigOnYa @ BigOnYa:
    I was kinda starting to learn how to do that with a model in adobe, but haven't messed w in awhile. Been gaming too much lately.
    +1
  • BigOnYa @ BigOnYa:
    I recently finished remodeling my basement (my man cave) and all I do is sit down down there, drink smoke and game, here lately.
    +2
  • kijetesantakalu042 @ kijetesantakalu042:
    @BigOnYa sounds bad for your health
  • BigOnYa @ BigOnYa:
    Nuh, I get exercise, every time I get up to pee and make another drink.
  • kijetesantakalu042 @ kijetesantakalu042:
    @BigOnYa If that's excersise I'd be a professional body builder
    +2
  • BigOnYa @ BigOnYa:
    I just semi- retired so I'm enjoying it for now. I was working 50+ hours a week, so now just working a few days when needed. I own my own company so was time to slow down and let other fam run it for me.
    +1
  • SylverReZ @ SylverReZ:
    Well that's good to hear. What type of business do you run?
    +1
  • BigOnYa @ BigOnYa:
    Electrical Contractor (Electricians). I have over 25 people, 11 work vans. Been in business for over 20 years. Luckily my nephew has taken over most the daily overseeing, give me a break.
    +2
  • SylverReZ @ SylverReZ:
    Seems like a long time you've been doing this. One of my parents' friends worked as an electrician for also 20-years with plenty of experience, but got fired many times from not going to work after drunken nights.
    +1
  • BigOnYa @ BigOnYa:
    Yup, brown bottle flu is common, esp on mondays. :grog:Ive had so many guys come and go, fired a many just for that.
    +1
  • K3Nv2 @ K3Nv2:
    I told my cat if you walk this way it's the Chinese restaurant or if you walk this way it's the Air fryer the cat chose the Air fryer
    +1
  • BigOnYa @ BigOnYa:
    I used to have poker night on Fridays after work at my shop, free beer, had a keg on tap, then couple guys got DUI on way home, so had to stop. Now I just give them doughnuts and coffee free in the mornings.
  • K3Nv2 @ K3Nv2:
    Bit down on a bean that got lodged right on my wisdon tooth extraction site the pain over a damn soft bean
  • K3Nv2 @ K3Nv2:
    Is it just indie hoes and 6 cocks that's popular on Gamepass right now
  • BigOnYa @ BigOnYa:
    COD Black ops 6 is good, Stalker 2 good, Fallout 76 good, Indy, plus many others, 150+ games on there.
  • kijetesantakalu042 @ kijetesantakalu042:
    Apparently intel is backordered for intel battlemage cards
  • kijetesantakalu042 @ kijetesantakalu042:
    They sold out on the preorder
  • kijetesantakalu042 @ kijetesantakalu042:
    I feel really hopeful for intel battlemage
  • K3Nv2 @ K3Nv2:
    I like how youtubes like here's a new video then like here's a video from 12 years ago
    K3Nv2 @ K3Nv2: I like how youtubes like here's a new video then like here's a video from 12 years ago