Wow! I love the game and how well optimized it is for CGA-era PCs! I tested it at 278 DOSBox cycles and it runs smoothly at 60 Hz, though it starts struggling with three enemies on screen. At 336 cycles it handles three enemies fine, but stutters a bit when I shoot. From 400 cycles onward it runs practically flawlessly! The optimization is really impressive and the game is a lot of fun. I'd love to see a video of it running on period-correct hardware, that would be awesome to watch!
Thanks!
So far I was targeting my Pocket8086 at 10mhz where even in the later stages with 8 enemies max it still keeps at 70fps. But I've tried it on a 8088 motherboard at 4.77mhz and know it will struggle after 3-4 sprites. I was planning to rewrite the sprite rendering in x86 assembly compiled sprites in the hopes of catching up the speed there but jam ended and had no time than. I am still thinking I want to try this and will release a next version here if I get the motivation to try this.
The sprite rendering is optimized enough for C (having pre-generated 4 pixel shifted versions of sprites, bliting 16bits at once and 8bit at the sides, not using mask (black background), not using framebuffer but sorting top to bottom to avoid flickering (rarely it will happen on top)) but I know the assembly rewrite can be even better, just needs some work and new code generators from my side. Your post motivates me to go back to it and try that too. Thanks!