| |
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.... |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Quote: Isn't the ball in Pinball Dreams just some plain old layered hardware sprites? Any "software" involved in that?
lot of software involved in that! :)
the ball consists of 3 single colored sprites for each of the 3 colors. Sometimes the ball has to go behind objects, so i have to cut pieces out of the sprites. To do this the fastest, i use 24 pre-shifted spritedefinitions (8 images for every color of the ball) which i AND with the mask data. The sprites themselves only move by 8 pixel spacings in x, and every single pixel in y. |
| |
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...? |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 - Next |