07-04-2016, 04:30 PM
You can certainly get fourspriter to work - and in fact I did some optimization of it
<!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/how-to-tutorials/topic397.html">how-to-tutorials/topic397.html</a><!-- l -->
<!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/how-to-tutorials/topic400.html">how-to-tutorials/topic400.html</a><!-- l -->
<!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/how-to-tutorials/topic402.html">how-to-tutorials/topic402.html</a><!-- l -->
And don't forget to look in the library: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Library">http://www.boriel.com/wiki/en/index.php ... IC:Library</a><!-- m -->
Specifically, have a look at High Res Print, and High Res Print Fast in the library:
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:HRprint.bas">http://www.boriel.com/wiki/en/index.php ... Rprint.bas</a><!-- m -->
This has an example of moving the gentle sprite around by pixels. It's far from automated, but it's /a/ basis for a sprite routine. It's also possible to use it in OVER 1 mode, iirc, so you can protect the background by merging it and then reprinting the same thing to restore.
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:HRPrintFast.bas">http://www.boriel.com/wiki/en/index.php ... ntFast.bas</a><!-- m -->
Same as the original, but uses lookup tables to do screen addressing, rather than calculations. This makes it about 20% or so faster to print a character, but does make the code much larger as the tables take up space.
<!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/how-to-tutorials/topic397.html">how-to-tutorials/topic397.html</a><!-- l -->
<!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/how-to-tutorials/topic400.html">how-to-tutorials/topic400.html</a><!-- l -->
<!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/how-to-tutorials/topic402.html">how-to-tutorials/topic402.html</a><!-- l -->
And don't forget to look in the library: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Library">http://www.boriel.com/wiki/en/index.php ... IC:Library</a><!-- m -->
Specifically, have a look at High Res Print, and High Res Print Fast in the library:
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:HRprint.bas">http://www.boriel.com/wiki/en/index.php ... Rprint.bas</a><!-- m -->
This has an example of moving the gentle sprite around by pixels. It's far from automated, but it's /a/ basis for a sprite routine. It's also possible to use it in OVER 1 mode, iirc, so you can protect the background by merging it and then reprinting the same thing to restore.
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:HRPrintFast.bas">http://www.boriel.com/wiki/en/index.php ... ntFast.bas</a><!-- m -->
Same as the original, but uses lookup tables to do screen addressing, rather than calculations. This makes it about 20% or so faster to print a character, but does make the code much larger as the tables take up space.