View Single Post
Old 19 June 2017, 12:40   #53
Registered User

Join Date: Jul 2015
Location: The Netherlands
Posts: 1,879
Originally Posted by zero View Post
Thanks for the great explanation roondar.

I think this shows why hardwaresprites are so great. Any kind of blitter object or CPU soft sprite uses lots of scarce memory bandwidth. Save the background bitmap if needed, read the sprite bitmap, write the sprite bitmap, then next frame restore the background. Masses of copying and register programming.

With hardware sprites you write a few registers and that's it. You loose some memory access cycles for sprite DMA, but only a fraction as many as blitter/soft sprites.

Hardware sprites are awesome to have (for the time). Systems having hardware sprites vastly outperformed those without just about all the time. Sometimes even beating systems that where released years later (but without sprite hardware). Something like the humble C64 (1982, <1Mhz CPU) kept being relevant all the way to the early 90's, in large part due to it's sprite and scrolling hardware allowing it to do games quite well and without any of the slowdown usually seen on homecomputers.

A lot of C64 games clearly run better than their Atari ST/Amiga counterparts (mainly because those tended to be straight ST games, not using Amiga sprite/bob hardware).

The same can be seen in the PC-Engine: on paper it should be trounced by the Amiga (much slower CPU, less colours, etc). But it's hardware sprites meant it could compete or outperform the Amiga fairly easily.

Amiga hardware sprites are quite limited. Games try to make use of them anyway... For example, in Sidewinder the player's bullets are all one sprite, re-used over and over since they can't overlap vertically. A few copper instructions and 68k memory writes instead of multiple blitter operations. I don't know if it even uses sprite DMA... Since the bullets are the same for ever scan line, sprite DMA could be turned off and the buffer registers pre-loaded.
Amiga sprites do have a bit of a bad reputation. They are awesome for displaying bullets, their built-in multiplexing means that you can create a ton of bullets on screen with very little overhead. They can also be used for quite a few neat tricks, such as extra background layers, starfields, etc. And that's not looking at AGA, because AGA sprites are really quite nice.

They are also much, much quicker than the Blitter is.

Basically, when programming an Amiga game, it always pays to check if you can't use sprites instead of bobs for objects. It's basically a 'free' performance boost.
roondar is online now  
Page generated in 0.04274 seconds with 11 queries