#75044 - genfish - Thu Mar 09, 2006 8:44 pm
Hi guys.
I finally got sprites loaded on the DS in framebuffer mode (some of u may remember my other threads!!)
I had to create my own image format which basically stored the image data in a file in the pixel format for the DS. I've written a converter and a viewer for the PC too, which i'll upload soon as i get time.
Anyway, back on topic... I now want to animate sprites, and was wondering which is the best way to go about this. How about having a front buffer and backbuffer, in memory, and then alternate copying them into VRAM_A?
thanks :)
_________________
there is no rl only afk
#75047 - DekuTree64 - Thu Mar 09, 2006 8:52 pm
Why on earth are you rendering sprites by hand? Use one of the modes with an extended affine layer and make it a bitmap, then you can use hardware sprites.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#75049 - genfish - Thu Mar 09, 2006 8:56 pm
im not sure how to do that, does it really matter as long as it works?
Do u mean using the tile mode?
_________________
there is no rl only afk
#75056 - tepples - Thu Mar 09, 2006 9:22 pm
Using the 2D hardware may let you 1. use more sprites and/or 2. use less battery power.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#75063 - Mollusk - Thu Mar 09, 2006 10:03 pm
Why don't you use normal sprites ???
And you probably could have avoided writing your own converter, there are quite a few already ^^
_________________
PAlib official forum : http://www.palib.info
PAlib official tutorials: http://www.palib.info/wiki
Updates, help, code examples, tutorials, etc...
#75071 - genfish - Thu Mar 09, 2006 11:26 pm
yeah i know, but this is for a university project, my dissertation in fact :/ so doing all this demonstrates what i've learnt at university, which is what they want to see really
_________________
there is no rl only afk
#75073 - DekuTree64 - Thu Mar 09, 2006 11:35 pm
It will work, it's just slow, and more work than is necessary optimizing the drawing routines (not always a bad thing for learning purposes).
If you really want to do software sprites, you'd probably be best double buffering between VRAM A and B, to avoid the time consuming copy from a main RAM buffer.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#75077 - genfish - Thu Mar 09, 2006 11:51 pm
thats what i thought, how do i tell the screen to display VRAM B then instead of VRAM A ?
thanks :)
_________________
there is no rl only afk
#75222 - silent_code - Sat Mar 11, 2006 2:03 am
recently saw some code here. search the forum.
i'm not sure, but i think it was posted by darkfader (sorry if i'm wrong).
#75224 - DekuTree64 - Sat Mar 11, 2006 2:13 am
I don't know the libnds calls for it, but it's bits 18-19 of dispcnt that set which VRAM bank (A-D) to display.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#75559 - genfish - Tue Mar 14, 2006 2:43 am
DekuTree64 wrote: |
I don't know the libnds calls for it, but it's bits 18-19 of dispcnt that set which VRAM bank (A-D) to display. |
hmm i've had a little read up on this and cant find much info, does anyone know where i can find this out? thanks
_________________
there is no rl only afk