| |
Bastet
Registered: Jul 2005 Posts: 88 |
Sprite multiplexing, when is it save to edit the values?
I have a little question to the pros here, when is it save to edit the sprite data so that the first one dosnt get corrupted?
Do i have to wait the full 21 lines of the sprite or can i savely edit it somewhere in betwhen there? |
|
| |
Conrad
Registered: Nov 2006 Posts: 849 |
If you mean by changing the sprite image, then yes you will have to change the sprite after 21 lines. The best time to change it is when the cycle/raster position line is positioned just after the full sprite drawn (at the bottom of the sprite in other words.) Or, when the cycle position is around the border area, that'll be the best time to change it - that applies especially if the sprite is horizontally moving as well. |
| |
Bastet
Registered: Jul 2005 Posts: 88 |
Ok, thanks.
I thought the VIC has some kind of puffer for the sprite data, but after your post i must kill that dream ;) |
| |
Conrad
Registered: Nov 2006 Posts: 849 |
Again, this only applies for 1 sprite usually.
Having 8 sprites on the same row would be more work of course :) |
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
If you are only interested in changing the shape (framepointer) you can use a trick Usagi Yojimbo & Double Dragon 3 (possibly others) use: have a half-shape that has the new upper part but old lower part. Then changing the framepointer isn't timecritical anymore, but there's added memory use and added trouble of changing to the real new shape after the new sprite has started displaying. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Quote: If you are only interested in changing the shape (framepointer) you can use a trick Usagi Yojimbo & Double Dragon 3 (possibly others) use: have a half-shape that has the new upper part but old lower part. Then changing the framepointer isn't timecritical anymore, but there's added memory use and added trouble of changing to the real new shape after the new sprite has started displaying.
I use this technique a lot too :) Makes life easy :D |
| |
hollowman
Registered: Dec 2001 Posts: 474 |
Quote: Again, this only applies for 1 sprite usually.
Having 8 sprites on the same row would be more work of course :)
One solution that might work depending on what you're doing is to have two screens and alternate between setting the spritepointers in them, and then only switching d018 at the right moment to change all sprite data |
| |
Conrad
Registered: Nov 2006 Posts: 849 |
Quote: One solution that might work depending on what you're doing is to have two screens and alternate between setting the spritepointers in them, and then only switching d018 at the right moment to change all sprite data
That's quite a good and easy way actually! :)
I never thought of that. |
| |
Bastet
Registered: Jul 2005 Posts: 88 |
I thought so that double puffering will make my life a lot easier.
I dint wanted to take that route because of the memory constrains but i will investigate that :) |
| |
Devia
Registered: Oct 2004 Posts: 401 |
what hollowman said... especially if doing no-border stuff at the same time ;-)
It gives you the convenience of updating pointers and data when YOU have the time for it.. depending on what you want to achieve of course ;-)
|
| |
Radiant
Registered: Sep 2004 Posts: 639 |
So simple, yet so elegant. Thanks hollowman! :-) |
... 15 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 - Next |