66 lines
2.0 KiB
Markdown
66 lines
2.0 KiB
Markdown
# GFX Mental Model
|
|
|
|
Status: pedagogical
|
|
Companion spec: [`../specs/04-gfx-peripheral.md`](../specs/04-gfx-peripheral.md)
|
|
|
|
PROMETEU treats graphics as an explicit peripheral, not as a modern GPU.
|
|
|
|
The right mental model is a retro 2D machine with:
|
|
|
|
- framebuffer;
|
|
- tile banks;
|
|
- tile layers;
|
|
- sprites por ordem de desenho;
|
|
- deterministic composition per frame.
|
|
|
|
## Why This Exists
|
|
|
|
The goal is not to imitate historical hardware byte for byte. The goal is to capture the family of constraints and visual language of consoles such as SNES, CPS-2, and Neo Geo in a small, portable contract that can run on desktop and DIY hardware.
|
|
|
|
That produces some important consequences:
|
|
|
|
- draw order matters more than "effects";
|
|
- palettes matter as part of asset design;
|
|
- the programmer thinks in terms of rasterization, not shaders;
|
|
- visual cost becomes more observable.
|
|
|
|
## What The GFX Is Not
|
|
|
|
PROMETEU GFX is not:
|
|
|
|
- a modern GPU pipeline;
|
|
- an RGBA framebuffer with arbitrary alpha;
|
|
- a shader system;
|
|
- automatic post-processed composition.
|
|
|
|
Those absences are deliberate. They force a visual language closer to classic consoles and keep the contract executable in modest environments.
|
|
|
|
## Practical Intuition
|
|
|
|
- Tile layers exist for world and scenery.
|
|
- HUD exists for fixed information and should remain decoupled from the camera.
|
|
- Sprites exist for moving entities, and their depth depends on order and priority.
|
|
- Palettes exist to vary visual state without duplicating tile art.
|
|
- Fade exists as a discrete special effect, not as generic alpha.
|
|
|
|
## Palette Thinking
|
|
|
|
A good way to think about PROMETEU is that art and color are not the same thing.
|
|
|
|
The tile is the shape. The palette is the visual state.
|
|
|
|
That enables:
|
|
|
|
- enemy variation;
|
|
- biome changes;
|
|
- damage, ice, poison, power-up states;
|
|
- HUD themes;
|
|
- day and night cycles.
|
|
|
|
## Use Cases
|
|
|
|
- area transition with `Scene Fade`;
|
|
- HUD transition with `HUD Fade`;
|
|
- damage flash or teleport flash;
|
|
- global palette swap for weather or world state.
|