All right, all right, so how am I going to make a game level out of color spaces? Well, first, I’ll need to display a color solid somehow.
A color solid is a 3D object that models the position of colors within a color space. It’s somewhat analogous to a desktop globe; just as you might refer to the surface of a globe for information about what’s on the Earth, you can refer to the cross sections of a color solid for information about what’s in the color space it represents.
Just like globes and atlases, not all color spaces share the same basic principles or serve the same purposes; therefore, the color solids that model them often take different forms. However, all physical color solids have three limitations in common:
- we can’t perceive an entire 3D color solid at once in our 2D visual field
- built from finite material, they can’t represent every color in their color space
- made from discrete elements, they can’t represent every color in their range, either
While a digital color solid would share these limitations, the third one is slightly relaxed. Obviously, I can adjust the discrete elements of a digital model however I wish. Furthermore, by shrinking them to the size of a pixel and relying on the massive computational power of a modern computer– even a ten year old machine would suffice– I can render a real-time, continuous slice of the interior of a color solid, responding to user input at a decent clip.
While I’m at it, it might as well be an interesting slice…
Introducing the chromatafoil
In Run the Gamut, every 3D point in space will map directly to a color in the level’s color space. If nothing is occupying a point, that color will not be visible; likewise, if the player has a clear line of sight to an object, the color they see will correspond with the object’s position.
Mostly the player will see black. (Levels about subtractive color might use white as a background.) When the countdown to a race begins, they will see a wide band in the bottom center of the screen, coming to a point representing the player’s position. Tiny specks drift nearby– and naturally, they change color as they change position. But these specks disappear when the player is in motion; they’re an assist for players who become totally lost.
Once the race starts, players can charge forward, trailing a ribbon of color behind them. As they steer left, right, up and down, the ribbon color orients them in color space; before long, the end of the ribbon will appear in the background, to serve as a further visual cue. When it reaches a maximum length, its end will begin to fray at the speed the player is moving.
Like I said, this game will use different color spaces as levels. (In fact, I hope to make the game levels from gamuts in color spaces- but I’ll explain those next time.) That means from one race to another, the locations of colors relative to one another may change, and the shortest path between two objectives may pass through different intermediate colors. To help the player remember the particulars of the space they’re in, I’m considering displaying their orientation with a sort of heading indicator in the HUD, but I hope that won’t be necessary.