nippur72 wrote:is multicolor really supported?
if (Really == bit-masking) return FALSE;
If you keep the sprites isolated, as I do in the Quikman and Omega Fury title screens, you can use a multi-color value in SPRITECOL to paint the sprite with. I do not manipulate nibbles, only bits.
I don't understand how a 3x3 chars sprite is 16x16 pixels large (as in SPRITEDEF = %00001111). This is a bit confusing, is maximum size 2x2 or 3x3 ?
You define/store your sprite image in 2x2 format, and point to it with SSSANIM. If the SPRITEDEF bits are on (in your example) to allow for floating X/Y, then the storage for the rendering and display matrices (SPRITEBUF, SPRITEC1, SPRITEC2) are 3x3, to allow for the pixels to be shifted whole inside. If any of those bits are off, the image is truncated.
How to detect sprite collisions? is there a bit returned somewhere, or collision must be implied from coordinates? Looking at quickman it seems to me that collision is coordinates-based, is that correct?
That is correct. I do not do any sprite masking; it's extra operations within the rendering loop I thought best to avoid. Yes, I simply do coordinate collision (aka, box boundary checking) to determine the degree of the "hit". Quikman allows for 5-pixel overlap with a monster. Omega Fury's bolts calculate from its center dot to within the SPRITEX/SPRITEY + 8. Not entirely accurate, but they are lightweight calculations and effective.
SSSPEEK and SSSPEEKS allow to look at background and foreground character cell for sprite checking (dots, power pills, fruit, and Thargoid mines come to mind).
What is color sprite priority, that is, if many sprites overlap, whose sprite color is actually displayed in the overalapping cell?
Active / visible sprites get rendered from lowest numbered (0) to highest numbered (SPRITEMAX-1), whereas the higher numbered sprites are "stacked" if they should overlap. So that's your color priority.
a suggestion: is it possible to render sprites in XOR style (a la Shamus)? perhaps it could be done with self-modifying code (EOR in place of OR istruction)?
I don't see why not, but then again, I do not see why you would want to. I am a fan of Shamus and I understand why the author implemented that rendering style. If a VIC game has the potential for a lot of sprite overlap, you have to consider making all those images monochrome. I am not a fan of VIC multi-color -- beyond static images or isolated animations. VIC-II addressed all those weaknesses VIC has, plus you get 8 hardware sprites with all the features you have listed here.
When I move on to TED (C16 and Plus/4) next for some fun retro-gaming programming, I was planning on tinkering with some of what you mention here. Those machines are a little faster and offer much better video, which makes animated multi-color features desirable. And that work will port nicely to C128, although it will suffer a significant drop in palette choices -- but it will run great alongside hardware sprites. You can see why real arcade action games are possible with VIC-II -- and less challenging to program, too.
You make a great example with Shamus (and Omega Race) style of rendering. The monochrome look works (and plays nicely on B&W TV screens of the day) and can be technically more accurate for collision (and sometimes too accurate as horizontal laser shots squeeze between Shamus head and hat) -- and monochrome comes without the extra chunky-sized pixels over what already exists. But I have found that VIC "hires" graphics with the color clashing/bleeding that occurs between overlapped character cells manageable. In fact, explosions in Omega Fury make for great coloring as you easily change red-to-yellow-to-red per explosion image frame -- and that color overlap translates on the portion of the ships or shields' character cell it touches, making for a nice effect. You can do the same for multi-color rendering, but the images are fatter looking and slower.
When you look at what you have to work with here in VIC and it sometimes translates to that little "why bother?" feeling, I keep reminding myself that the VIC fullscreen resolution is about the size of a nice SVG icon on my desktop. That's my challenge, and that's why it is fun (for me).
I see my Quikman running on Mega-Cart, and it excites me to see a fair representation of the real arcade game running on such modest hardware -- 8-colors, less resolution, no multi-color, but its handling is smooth and there are no quarters required -- something I always dreamed it could do, but I couldn't quite get there given the stated reasons. And that effort is now pushing me to see if I can squeeze out a little bit more in Omega Fury. I rather do this puzzle on my train commutes than Sudoku -- you should see the curious looks I get from other passengers spying my laptop screen!
