What is max # of sprites and will the sprite library work for unexpanded vic ?
This version won't work on unexpanded VIC right now, though I will strip (or conditional) out to make it into a "lite" version to run on unexpanded. I have another sprite routine already written from 24+ years ago that supports 8x8 within a 2x2 character cell matrix for unexpanded VIC -- hacked down to fit into Quikman 1984.
This works with any 8k+ RAM expansion, or just load the code into the game cartridge ROM space and use stock RAM. Conditional assembly could be setup to allow for a 3k only expansion version, i.e. adjusting for the different ACTIVE / PENDING video addresses.
There is a limit of 128 custom characters (because I choose to keep the 128 ROM characters in play). Double-buffering means up to 64 chars can be visible at once (without potential corruption on the active display). In theory, 64 missile sprites, or 16 floating 8x8 sprites, or 7 floating 16x16 sprites (7x9=63 chars) plus 1 missile, etc., combinations are possible. And Sprite definitions can be changed dynamically at run-time as needed.
Of course, you will probably want some custom chars for the playfield, so there is a MAX variable to set to put a ceiling on what the sprite routine can take from. As that number is lowered from 128, so it affects the size and number of active sprites.
the right char of the arrow flying to the left was missing
That was intentional on that version. It only displays 8x8 fixed or vertical only matrices now... and the left flying arrow is going horizontal, so it is image rotated within an 8x8 frame.
The 3 bullets (1x1 pixel, 1x2 pixel, and 2x2 pixel) demonstrate the use of missile graphics within an 8x8 frame. The left flying arrow showed me that an interesting effect can be made by using a larger image, i.e., it looks like its "tail" is a flickering flame and it never loses its "point".
Same with the vertical arrow, although I toggle its "vertical" attribute every other column to demonstrate with and without the overflow character beneath it. So, its tail flickers on one column, but is solid on the next.
I replaced the entire rendering and display routine last night, so it will work with all display modes:
8x8 fixed, horizontal only, vertical only, both
8x16 fixed, horizontal only, vertical only, both
16x8 fixed, horizontal only, vertical only, both
16x16 fixed, horizontal only, vertical only, both
The rendering and display is smart enough to work only within the sized frame required, reducing machine cycles and potential color clash. So the a sprite matrix can occupy as little as 1 character cell or as many as 9 (3x3).