| |
PopMilo
Registered: Mar 2004 Posts: 146 |
Software sprites....
Does anybody have any expirience with software sprites?
Bobs?
In hires or char mode?
Games I susspect have something to do with software sprites:
Cybernoid for bullets...
Last ninja for masking main character (its not a software sprite, only hardware one masked, to show visibility...)
karnov
Astromarine corps
..,
What is record for these?
|
|
... 111 posts hidden. Click here to view all posts.... |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
IC, hadn't thought of the clipping. |
| |
PopMilo
Registered: Mar 2004 Posts: 146 |
@ WVL: "pinball dreams also uses preshifted sprite definitions for the 3 ball sprites to make the masking quicker. The code is pretty well optimized, so maybe you would want to take a look?"
I have that dev package... Have already looked in there but its huge. Maybe you could give me some pointers where to look ? |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Quote: @ WVL: "pinball dreams also uses preshifted sprite definitions for the 3 ball sprites to make the masking quicker. The code is pretty well optimized, so maybe you would want to take a look?"
I have that dev package... Have already looked in there but its huge. Maybe you could give me some pointers where to look ?
the routine you need is called 'calcclippedsprite' and is inside MAIN.txt in the /sources/ directory.
the first bit of the routine fetches pointers to the chars containing the mask data (which is rle-ed in the memory), from 'clipoffset' is the loop that does the ANDing.. i've chosen for some smart way i only need to AND with the mask data once (my sprite data is set up in such a way, check it out)
clipoffset ldx #0
cliploop
spritea1 lda $1000,y //fetch correct sprite byte
char1 and $1000,x //mask data!
point1a sta spriteimage,y //store 1st byte sprite0
spriteb1 and $1000,y //and with 2nd spriteimg
point2a sta spriteimage2,y //store 1st byte sprite2
spritec1 and $1000,y //and with 3rd spriteimg
point3a sta spriteimage3,y //store 1st byte sprite3
dey
spritea2 lda $1000,y //the same, but for
char2 and $1000,x //the 2nd byte in the
point1b sta spriteimage,y //sprites
spriteb2 and $1000,y
point2b sta spriteimage2,y
spritec2 and $1000,y
point3b sta spriteimage3,y
dey
spritea3 lda $1000,y //3rd byte
char3 and $1000,x
point1c sta spriteimage,y
spriteb3 and $1000,y
point2c sta spriteimage2,y
beq point3c
spritec3 and $1000,y
point3c sta spriteimage3,y
after this is the loop condition, which is a bit awkward. It checks for all rows done (15 of them) and if the maskdata goes past any 8-pixel boundarys (if so, the char1/char2/char3 pointers get an update!)
|
| |
PopMilo
Registered: Mar 2004 Posts: 146 |
thanks! will take some time to analyse it...
First I want to finish kind of a framework for my test app... making lookup tables, sinuses, double buffering stuff like that... so I could test different aproaches more easily... |
| |
PopMilo
Registered: Mar 2004 Posts: 146 |
Am making progress but nothing to show yet.... will be soon...
But. I found this:
http://plus4.emucamp.com/forum.php?postid=10459
A game for plus4 with software sprites, with masking and speed...
It looks very interesting:
Quote: "...It only generates the sprite in that rotation when its about to draw it. So if a sprite is animating, and moving, theres a good chance that some frames won't ever be rotated.
Also the cache allows sprites that are used a lot to stay inside the cache, while ones that aren't drift to the top of the list.
So yes. Rotate on demand, but demand is mesured per-rotation and no per-sprite. (i.e. I dont do 4 rotations for a sprite, just the one it needs right now)..."
Cache for mostly used rotations? Excellent idea!
|
| |
T.M.R Account closed
Registered: Dec 2001 Posts: 749 |
Things to remember about Xeo3:
1) Mike Dailly used to work for DMA Design, wrote Blood Money on the C64 and seriously knows what he's doing.
2) The 264 series have a higher overall clock speed than the C64, at least 1.5 times the grunt to shift stuff around if memory serves. |
| |
PopMilo
Registered: Mar 2004 Posts: 146 |
Quote: Things to remember about Xeo3:
1) Mike Dailly used to work for DMA Design, wrote Blood Money on the C64 and seriously knows what he's doing.
2) The 264 series have a higher overall clock speed than the C64, at least 1.5 times the grunt to shift stuff around if memory serves.
I know he is pro... :)
I didnt like blood money that much :)
I know he knows what he's doing :)
I know I began programming 6510 back in 1986. Never stopped since. I make programs for living. Have done some pretty intensive shit on DSP's and microcontrollers. I want to take c64 to its limits :)
And I love software sprites :)
Next week Im releasing my demo with software sprites, I hope... :) |
| |
Honesty
Registered: Jan 2003 Posts: 121 |
Good luck then... :))
|
| |
T.M.R Account closed
Registered: Dec 2001 Posts: 749 |
"Next week Im releasing my demo with software sprites, I hope..."
That's a very long week...? |
| |
PopMilo
Registered: Mar 2004 Posts: 146 |
Sorry man.... :(
My parents got ill ... I wasnt able to work on it as much as I thought...
But I'm Ok and am working on it as much as I can!
I got seven 24x21 pixel software sprites moving around at 50 fps! Its murphys law I guess :) Why isnt it 8 ? I miss just a few raster lines to make it 8 sprites... But I think it can be optimized enough to squeeze in 1 more....
But it will be difficult to do anything else in the few remaining lines... :(
But! since this is all without preshifted sprite definitions I am prety satisfied... :)
Ill try to put something together for this evening for you to see it in all of its glory! :) |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 - Next |