I've wondered if the your character ship's graphic is all loaded on GRAM. You could redefine the GRAM card instead of using about 16 cards for a ship. Should be enough time to redefine after a 'wait' command is called. If you move your ship and the graphic has to change it can use a flag to activate the redefine function to occur after a wait statement. You could swap in new alien graphic when they are going to be used in that section of the game. Or just use specific GRAM card to redefine the alien's graphics. You could even go 16 pixel high sprites.
I usually do 32 cards for sprites, and then 32 cards for BGgraphic.
The main ship needs 32 frames (it has more frames but on the circle only 32 are shown) so it is already in ROM and update on fly.
Now all enemy animations are in GRAM, each animation has 8 frames (8 scales), so now I use 5*8=40 cards for enemies, 2*8=16 cards for the two frame explosion (reused also for enemy bullets), two tiles for main ship, one for its bullets, 4 for the BG (diagonal rays \ and / non present in GROM).
40+16+2+1+4 = 63
The trick to free space is to remove duplicated frames in the animations (seen by far all enemies are almost a point or a couple of points).
I could gain about 10 frames and fit one or two other enemies.
Another option, as you say, is to load on fly definitions for enemies when they are supposed to appear.
This is possible as without sprite multiplexing, I cannot have more than 4 enemies on the screen at the same time.
If we admit that the active enemies are all of different kinds, I have room for a 5th enemy in GRAM.
This allows to load the 8*8 = 64 bytes of the next enemy kind over multiple frames, while you are fighting againt the last 4 enemy kinds.
Actually what is almost missing now is the logic to control swarms and enemy waves, that should be connected to the way GRAM is updated to allow new enemy graphics.
Probably focusing on this latter strategy leads to better results than packing the current enemy definitions, as in the end I should in any case add logic for enemy waves that keeps track of the game progression
Kiwi I implemented a homing enemy ( try this rom where the blue homing enemy loops) is it close to what you was meaning ?
Edited by artrag, Sun Sep 27, 2015 1:06 PM.