First off, thanks tons for your awesome, detailed post! Unfortunately, I'm gonna have to load off my questions...
No worries, it was my pleasure.
Increased custom tile space? I thought that FG/BG mode only made you lose the non-alphanumeric pre-built ROM cards? Aren't there only 64 custom RAM cards for both Color Stack AND FG/BG?
I'm sorry for not being clear. You are right that the FG/BG mode restricts the number of pre-built GROM cards, specifically excluding the graphical/geometric ones. Since I try to use GROM cards as much as possible, not having them available increase the need to use custom GRAM cards for standard shapes such as lines and blocks. This by extension reduces the amount of detail I can include in the scene.
I think about it like this, in FG/BG mode, I have ASCII characters in ROM and 64 custom cards; while in Color Stack mode, I have all that plus 128 built-in graphical characters.
Also, you're clearly using more than 4 color, there. I count at least 9. What gives?
There's the four in the stack:
COLOR_STK: C_GRN, C_WHT, C_CYN, C_RED
And then there's the 11 FG colours I used:
The snippet of a row I posted is the actual source drawing I used. I made a script that parses such a file and generates the background data automatically. It includes the colour definitions above so that I can just reference something like "COL:4,0" on each card which means "Use fourth FG colour in the definition (i.e., X_DGR or Dark Green), and do not advance the Color Stack."
The rest is just a technical trick: Remember, a blank card with a WHITE background looks exactly the same as a solid block painted in WHITE over a CYAN background. The WHITE pixels obscure the background so you can't see it.
Very cool! It looks very complicated for tiles, but I guess it's just very clever tiling, huh?
Yes. The way I work through it is that I draw the scene how I want it, break it into tiles, and then try to figure out what I need to do to make it work. Sometimes a particular piece of detail is not possible, so then you trim it.
I also sometimes find that the scene takes more than 64 cards, so I figure out how to change pixels here and there to re-use one card in place of two similar ones--or use a GROM card instead.
I think I follow... The image happens to have mostly green, then white, then cyan, then red, although that's only the case in this very specific scenario. I guess it takes a lot of careful, clever design to make your scene follow these patterns while still looking dynamic and good.
Yes, like I said above, it starts with the artwork. If you think in tiles, your scene will look like a bunch of tiles. Try to have a nice piece of artwork first and then figure out how it needs to be scaled down or modified to make it work, rather than the other way around. Tiling is one step in the process, and not the first one.
It takes some work, but the results are spectacular. Take a look at any of nonner64's artwork for GroovyBee's games.
So, how do you get from green to white, to green again?
From the tree to the green text, you mean?
I meant that in the first few rows, the background can be described like this:
- Green for the tree with colourful baubles sprinkled on it
- White field for red letters
However, the Color Stack has been defined as green, white, cyan, red; while the background looks like its alternating over green then white, then green and white again, seemingly skipping over the last two colours.
Ok, I think that makes sense. But what about all those tiny, multicolored details where there are balls and lights in close proximity on the tree? Also, are you able to use all foreground colors, or are you limited to only certain ones?
Color Stack mode allows you to use all 16 colours to define the stack and for the foreground colour of GRAM cards. However, for GROM cards, you can only use the first 8 colours in the palette.
The multicoloured details are made by painting circles with a foreground colour, like yellow, white, or purple. When you see two balls with different colours right next to each other, that's because they are in different cards, with different foreground colours. The card boundary may be right where the balls converge. Trick!
Really clever! Does this technique often work, or was it just by fortune that it happened to suit this particular case? But, if it's possible to skip more than 1 place in a stack, why didn't you do so for the O? And why does the stack cycle instead of popping, as I would have expected?
These techniques can be applied to any Color Stack scene. I used them in this particular case because they suit me best, but generally they offer a means to manipulate the stack in a way that you do not have to explicitly use the background colours in order every single time.
Why didn't I use it for the "O"? I would have had to draw the "O" in "reverse video" like the "L," and thus consume another GRAM card. However (and this is the clever bit), since the regular "O" was already added to GRAM for other words in the title (e.g., "Ghost" and Of"), I figured I can save one GRAM card by using that same card in a MOB! In its place, the background card for that slot uses the "solid block," which comes from GROM. Trick!
And finally, even though it's called a "stack," it actually works as a circular array. That is, every time you advance the stack pointer (i.e., by setting bit 13 on the BACKTAB record), it will point to the next colour. When you advance the stack from the last colour, it will cycle back to the first one.
Again, really clever, but why didn't you just increment to the point in the stack that you needed? Was the compromise purely to save the GRAM space without having to load in another card?
That's precisely the reason. By the way, it is not just to save GRAM space for the sake of conservation; it's to make GRAM available for other cards that provide greater detail in other areas. Because I saved one or two cards this way, I could use them to overlay the squiggly tails on the bottom of the "R"s and the "T" in "Presents" (called "serifs"), or to give more organic detail to the ribbons. It's a trade off.
In closing, let me say that, although this sounds like a lot of work and complex techniques, in practice they are actually rather straightforward. You should make your drawing with as much flair as you want, break it into tiles, and then figure out what you need to do to make it work and fit within the constraints of the platform. These techniques are just more tools in your kit to get you there.
My whole point in this discussion is that Color Stack can be very versatile (as I'm sure FG/BG can be as well); all you need is some sharp tools and a bag of tricks.