SP1 Scrolling: Updated Performance Review

I have reconfigured all tests to use a 16x24-cell scrolling zone, which is a more realistic size for a scrolling game on the ZX. The results are proportionally similar to the previous ones, but with bigger differences between the baseline measurements and the optimized ones in Test 3 and Test 4.

Here is the table with the old and new results in an additional column for comparison:

Test #DirectoryDescriptionFPS-16x16FPS-16x24
Test 0sp1-baselinePoC to test raw performance of SP1 updating whole scroll area2215
Test 1sp1-randomtilesWhole scroll/top-row-update loop, full column scroll and invalidation17-1812
Test 2sp1-spritesTest 1, with added moving sprites1310
Test 3sp1-partial-inv-1Test 2, with added partial column invalidation, method #117-2513-22
Test 4sp1-partial-inv-2Test 2, with added partial column invalidation, method #220-2517-23
Test 5-Not implemented--
Test 6sp1-parallaxTest 3, with 2 added parallax zones scrolling at different speeds11-179-16

In this new test it can clearly be seen that the baselines (the ones that manage and invalidate the full area) suffer a big performance penalty when enlarging the scrolling area, while the optimized ones are not quite that affected. Indeed the algorithm in Test 4 seems a real candidate for a good ZX scrolling game, using all SP1 power.

I’d like to thank everyone for the feedback on this series of articles. As I said, I’ll continue on my personal learning path, exploring and documenting some other scrolling techniques, but not SP1 based. I’m really satisfied with all the knowledge gathered here and I hope this can be a reference work for future game developers who want to make a scrolling game.

Have fun

J.