Homebrew Change size of 32x32 Sprite?

Ray =D

Well-Known Member
OP
Member
Joined
May 17, 2011
Messages
288
Trophies
0
Website
www.youtube.com
XP
143
Country
Gambia, The
Hey!
I want to ask if its possible to scale sprites in DS Homebrews. I want to resize my 32x32 sprite to 16x16. And I'm using libnds.
I hope someone can help me :D
 

LeRodeur

Well-Known Member
Member
Joined
Dec 12, 2009
Messages
162
Trophies
0
Age
31
XP
200
Country
France
Hey!
I want to ask if its possible to scale sprites in DS Homebrews. I want to resize my 32x32 sprite to 16x16. And I'm using libnds.
I hope someone can help me :D
Maybe using a buffer and doing something like
For (i=0;i
 

Ray =D

Well-Known Member
OP
Member
Joined
May 17, 2011
Messages
288
Trophies
0
Website
www.youtube.com
XP
143
Country
Gambia, The
Hmm... I have no gbatek examples :D Only the libnds examples. But there is a demo which shows scaling. The problem is, it shows scaling with BG's. Is it possible with sprites, too? :P *Sounds like a noob xD*
 

CoolAs

Well-Known Member
Newcomer
Joined
Oct 21, 2011
Messages
75
Trophies
0
XP
109
Country
Can you tell me what you need this for?

Scaling sprites is something that you can not do with hardware and you can not easily do it with software...

But yeah, the way thatLeRodeur said would be the easiest. (but it does not blend the colours properly)
Although you could use the 3D engine, but if you do that then I can not help you as I have never used that part of the DS properly...
 

Schmendrick

Well-Known Member
Newcomer
Joined
Sep 12, 2009
Messages
55
Trophies
0
Website
www.dennisvanzwieten.com
XP
166
Country
Netherlands
If you wish to use the 3D engine, take a look at relminator's Easy GL2D lib (http://forum.gbadev.org/viewtopic.php?t=17417). It's easy enough to use, very tiny and allows you to do a ton of things with sprites. It also comes with examples.
 

huiminghao

Well-Known Member
Member
Joined
Mar 6, 2011
Messages
175
Trophies
0
Website
Visit site
XP
96
Country
Switzerland
This answer is yes, but the scale function is limited.
Take a look at http://nocash.emubase.de/gbatek.htm#lcdobjoamattributes

with the reg of OBJ Attribute 0 (R/W)
you should enable the Rotation/Scaling Flag
with the reg of OBJ Attribute 1 (R/W)
you should set a number 0~31 for bit 9-13, which determines the 'Scaling Parameters'

for the 'Scaling Parameters', here is the description:
Location of Rotation/Scaling Parameters in OAM
Four 16bit parameters (PA,PB,PC,PD) are required to define a complete group of Rotation/Scaling data. These are spread across OAM as such:

1st Group - PA=07000006, PB=0700000E, PC=07000016, PD=0700001E
2nd Group - PA=07000026, PB=0700002E, PC=07000036, PD=0700003E


You should check the BG scaling for the meanings of PA,PB,PC,PD.
e.g. if PA=0x100, PB=0, PC=0, PD=0x100, the picture shows what it is.
if PA=0x80, PB=0, PC=0, PD=0x80, the size of picture would be half of the original(32x32 -> 16x16)

So, there are only 32 scaling groups, that is what limited.
 

iDallin

Member
Newcomer
Joined
Jan 22, 2012
Messages
9
Trophies
0
XP
22
Country
United States
On paint copy the sprite , go to resize and pixels, it should say 32 by 32 change that to 16 by 16, I assume this is for the jazz jackrabbit game? Lol appreciate it
 

Kiiro_Yakumo

Kitsune
Member
Joined
Apr 14, 2009
Messages
400
Trophies
1
Location
Gensokyo
Website
clash-of-gods.netau.net
XP
393
Country
Poland
Bite me, Tileset for Jazz Jackrabbit fits into 32x32 and it can be left that way, the Jazz character is diffrent story, in some cases it fits in 32x32 but in some others You must use 64x64 or 64x32 or 32x64 OR cut/resize/scale/whatever-that-breaks-img-awesomeness
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • realtimesave @ realtimesave:
    @SylverReZ that guy seriously spent over 2 grand on that hot wheels pc?
    +1
  • RedColoredStars @ RedColoredStars:
    LTT is a noob
  • RedColoredStars @ RedColoredStars:
    Guy doesnt know wtf hes talking about half the time
  • realtimesave @ realtimesave:
    @SylverReZ that reminds me that my friend sells CRTs he gets cheap or free for hundreds of dollars. people are dumb
    +1
  • RedColoredStars @ RedColoredStars:
    And is incredibly annoying.
  • realtimesave @ realtimesave:
    man I just washed my shoes and they look exactly the same as before I washed them :|
  • realtimesave @ realtimesave:
    luckily they didn't fall apart
  • RedColoredStars @ RedColoredStars:
    Some CRTs are very much worth the price
  • RedColoredStars @ RedColoredStars:
    i used to go out to the recycling center every couple weeks and look at the crts and other electronics people would drop off. Usually screens were broken or severely scratched from being tossed around. Did find a good one here and there, but never anything like a 1080i widescreen crt.
  • RedColoredStars @ RedColoredStars:
    Or a good contition 40" Sony Trini that weighs 300 lbs. lol
  • RedColoredStars @ RedColoredStars:
    Literally 300 lbs. lolol
  • BigOnYa @ BigOnYa:
    I have a few of those boat anchors in my basement I tried giving away but no one wanted them, So anyone close to Columbus, Ohio area that wants them, (26", 2x 19") please come get, for free.
  • RedColoredStars @ RedColoredStars:
    Dont know anyone wants those smaller ones. Most are after larger sizes and the kinda top of the line models
  • RedColoredStars @ RedColoredStars:
    Motion handling and input lag on those things destroy plasmas, led, oled
  • realtimesave @ realtimesave:
    I had some really nice CRTs I should've kept
  • realtimesave @ realtimesave:
    now I have all lcd
  • realtimesave @ realtimesave:
    one in particular I regret getting rid of oh well :|
  • realtimesave @ realtimesave:
    the Sonys and stuff I don't care about
  • realtimesave @ realtimesave:
    and used LCD are hard to sell I can imagine.. not worth much
  • realtimesave @ realtimesave:
    @SylverReZ where do u lurk
  • a_username_that_isnt_cool @ a_username_that_isnt_cool:
    Is it piracy if it was released for free? Not in my opinion, but I also think it's not piracy if buying it isn't owning it, and it's not piracy if you can't buy it from the original creators anymore.
  • K3Nv2 @ K3Nv2:
    Free release can have loopholes where they still make money through ads
    Xdqwerty @ Xdqwerty: :sad: