Sprite flicker

Page 1/2
| 2

By PingPong

Prophet (4093)

PingPong's picture

13-03-2010, 21:17

I never seen that also C64 sprite could flicker!

Based on the sprite architecture of vic-ii i ever thought that sprites does not flicker at all. C64 has not limit on scanline.
However, looking at castlevania port they flicker, in most situations, a lot!

Login or register to post comments

By Edwin

Paragon (1182)

Edwin's picture

13-03-2010, 21:55

Sprite flicker is not something that "can" happen, it's something done by the software to work around a limitation. Which could be the actual number of sprites as well.

By PingPong

Prophet (4093)

PingPong's picture

13-03-2010, 22:53

Sprite flicker is not something that "can" happen, it's something done by the software to work around a limitation. Which could be the actual number of sprites as well.
So if the limitation is reached, "can happen" Wink

By MäSäXi

Paragon (1884)

MäSäXi's picture

14-03-2010, 12:37

Can´t remember any c64 game at the moment which has sprite flicker, but I remember one home-brew c64 game from the nineties or early 2000s, which clearly had very familiar looking sprite "loss" problem, it happened all the time when there was N amount of sprites on same row, "last" sprites just disappeared exactly the same way they do in MSX. Smile And when those disappeared sprites either raised or lowered their Y-coordinates, they became visible again! Smile And there are MANY commercial Commodore 64 games, where sprites just DISAPPEAR every now and then. I should try to remember what games they were.... can´t quite remember their names correctly... they were some 1985 or 1986 games.

By PingPong

Prophet (4093)

PingPong's picture

14-03-2010, 14:35

Can´t remember any c64 game ... sprite flicker....
castlevania has.

By PingPong

Prophet (4093)

PingPong's picture

14-03-2010, 14:48

By Hrothgar

Champion (479)

Hrothgar's picture

14-03-2010, 16:36

@PingPong: that looks more like sloppy coding.
C64 sprite limit is 8 per scanline, and as those 8 are wider than MSX, can be coloured and individually stretched it is a lot harder to reach this limit on C64 than on MSX. In short, in this particular example I don't even think the limit is reached at all, nor can I imagine this for Castlevania.

By PingPong

Prophet (4093)

PingPong's picture

14-03-2010, 18:06

@PingPong: that looks more like sloppy coding.
C64 sprite limit is 8 per scanline, and as those 8 are wider than MSX, can be coloured and individually stretched it is a lot harder to reach this limit on C64 than on MSX. In short, in this particular example I don't even think the limit is reached at all, nor can I imagine this for Castlevania.

No, C64 limit is 8 sprites on entire screen- not on scan line- the reason of flickering is to overcome the 8 sprites / screen limit.
Now, if it's relatively easy to do a sprite-split on C64 to achieve more than 8 sprites on screen, it's not so easy when you want to achieve more than 8 sprites/scanline. that's because one see 8 sprites on even frames and another set of 8 sprites on odd frames. 16 sprites flickering.

That's no sloppy code, it's only a tech limit. You can't have in a game more than 8 sprites on scanline. about stretching and multicolor, both affects resolution. a big chucky sprite does not look always better.

I do not know if the vic-ii allows on a single scanline to multiplex the same sprite. (i remember that as the msx vdp does, sprite pointers are fetched on the hblk of the previous scanline, so changing during the active frame does not take effect.)
But even if it's allowed, a scanline last for 64us. The most fast 6502 instruction lasts for 2us, so teoretically the 6510 can execute 32 instructions, not taking into account the fact that most instructions take 3-4us and the wait states imposed by the vic-ii when it has to deal with bad scanlines and sprites.

By PingPong

Prophet (4093)

PingPong's picture

14-03-2010, 18:10

In short, in this particular example I don't even think the limit is reached at all, nor can I imagine this for Castlevania.
in the youtube video, look at 0:10- the dragon is made up 8 sprites exacly. they need to flicker. if not all the sprites resources of the C64 would be wasted for the main charater. leaving the sprites flicker allows for 4 sprites/frame used. leaving 4 sprites for enemies, bullets. etc.

By Hrothgar

Champion (479)

Hrothgar's picture

14-03-2010, 20:30

I still don't get the point. There are many C64 games with sprite multiplexing to get more than 8 on screen, some of them have a multitude of sprites on screen compared to the video you just posted.

I maintain that it is sloppy coding to have all sprites flickering all the time when there is no >8 per line, or at least it's a highly unfavourable design choice to do it this way. The instances where there are >8 in this video are not that numerous, and certainly not constantly.

By Hrothgar

Champion (479)

Hrothgar's picture

14-03-2010, 20:35

I'd like to post this video as a counter-example of how you do sprite multiplexing on a C64:

http://www.youtube.com/watch?v=oyf2W239eRY

Page 1/2
| 2