#143789 - yellowstar - Fri Oct 26, 2007 12:06 am
I'm having sprites problems.
Click here for a screenshot.(or click here
if you want to view paletted instead of mono)
I'm trying to use the same gfx and gfxID for
2 sprites.
The other is seperate.
Also,
when I try to move the sprite,(during init)
it won't move.
The left and right sprites are
supposed to be the bats.(64x64)
The other is supposed to be the ball.(32x32)
(VRAM E and D are for main and sub sprites, A and C for main and sub
backgrounds, B for LCD(screenshots))
*Code removed*
Last edited by yellowstar on Mon Oct 29, 2007 12:09 am; edited 4 times in total
#143852 - yellowstar - Fri Oct 26, 2007 8:39 pm
This game can't happen unless somebody helps with this
problem.(and possiblely other problems related to this game)
Does the difference between the SpriteGfxIDs
matter?(Or how does it work?)
Does a bigger/smaller difference mean
more and less space?
#143887 - yellowstar - Sat Oct 27, 2007 2:49 am
VRAM isn't the problem.
I disabled the sub screen sprites and sprite mapping,
but that didn't do anything.
When I singled-out every sprite,(made only one sprite
init and display, and repeat for the others)
it worked fine.
Except,
for the ball.(screenshot)
Also,
when I only display the bats,(with and without the same gfxIDs)
only the right bat is displayed.(second sprite)
#143955 - yellowstar - Sat Oct 27, 2007 8:11 pm
I tried to google,
but I couldn't find anything about using
multiple sprites.
Does anybody know of any examples/demos
for using multiple sprites?
#143997 - Lick - Sun Oct 28, 2007 2:12 am
#144003 - yellowstar - Sun Oct 28, 2007 3:30 am
That didn't help
me find what's wrong with this.
#144030 - melw - Sun Oct 28, 2007 11:06 am
I would suggest to go through libnds examples and taking a look at existing tutorials. Gbadev forum search is also your second best friend. As a whole, internet is full of useful resources.
Somehow I have this feeling that whenever there's a problem, the first thing you do is post about it here. Asking for help on these forums is ok, but rather do that after no other means have proven helpful.
#144047 - yellowstar - Sun Oct 28, 2007 7:12 pm
I have found and fixed one problem.
Here,
I had the 32x32 ball sprite size wrong.(64)
Now,
it seems only the last initiated sprite
is displayed.
(So, when I displayed all the sprites,
only the ball was displayed.)
(I have tested this,
and that's correct.)
(Only the last initiated sprite being
displayed.)
EDIT:
I have updated the source.
The ball's sprite ID
was the same as the second bat.
I fixed that,
but nothing happened.
#144070 - yellowstar - Sun Oct 28, 2007 10:57 pm
I have updated the source.
I have found and fixed another bug.
All the lines with spriteEntry[0]
were supposed to have ID for the index.
But,
I'm still having problems.
All the sprites are displayed
this time.
But,
there is white pixels displayed,(and some gone)
that shouldn't be.
screenshot
#144083 - yellowstar - Sun Oct 28, 2007 11:54 pm
I have solved it!
All I had to do was up the ball's sprite gfxID to 128.