Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sprites like MJ's Trabajo Basura (not unregr. Fourspriter)
#5
We use Alcoholics Anonymous' splib2 library, a precursor to SP1. The library divides the screen in a 32x24 characters grid. Each cell can be printed with a background tile (256 in total). On top, you can define some sprites. In each update, sprites invalidate those cells they touch, making them "dirty". The libary just redraws such cells from bottom to top, starting with the background tile, then each corresponding 8x8 section of each sprite on top (which the library pre-rotates in a buffer).

There's not a full screen, 6912 bytes buffer. It's just a tile buffer. When an 8x8 cell needs to be redrawn, it is redrawn in a small buffer off-screen then blit to screen.

It works like hardware tile and sprite based displays such as those in the C64 or the MSX, but it's, of course, software driven.

splib2 is not so integrated into z88dk when compared to SP1, so porting it to a ZX Basic library would be posible, albeit painstakingly laborious, as the assembly syntaxes are not compatible and lots of things should be made by hand.

Besides, ZX Basic binaries aren't as fast as z88dk binaries (for obvious reasons: C is much lower level than BASIC).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)