Skip to content

rendering

The pygame view layer. Source: src/laife/rendering/. Rendering observes the world; it never mutates it, so the simulation runs the same with or without a window.

Renderer

world_renderer.py defines WorldRenderer. It reads the WorldRunner state each frame and draws terrain, buildings, and players. Terrain regions are filled with a color per terrain type. The renderer initializes pygame, so it must be created before any sprite is loaded.

Sprites

Positions and sizes use the pygame-compatible aliases from the config package.