Cellular microscope UI: living cells, nutrient food, HUD and evolution cards
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (deploy) (push) Successful in 4m12s
Foundation / checks (tsan) (push) Successful in 11m26s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 17m48s
Foundation / checks (postgres) (push) Canceled after 17m48s
Foundation / checks (checks) (push) Canceled after 17m53s
Foundation / checks (client) (push) Canceled after 17m58s

From the maintainer's design review. In cellular play the world sits in a rounded
eyepiece with a vignette:
- Cells are drawn from their phenotype: the membrane wall thickens with membrane
  mass, flagella follow speed, organelles follow energy conversion, and a dead
  cell's membrane is torn.
- Food patches are granules coloured by nutrient, so a nutrient that runs out
  loses its colour.

The side panels become a HUD:
- a status pill and Field notes;
- Vitals in readable units (nJ, ng) with bars toward the next bud;
- an action dock with the last result explained;
- a "Mutation ready [E]" callout opening an evolution window of cards with
  before/after drawings and per-nutrient costs, which also handles the end of a
  life.

New ink, lavender and amber palette. Client only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-16 08:53:55 -04:00
co-authored by Claude Opus 5.5
parent ab5c29227c
commit 28629e1001
8 changed files with 883 additions and 392 deletions
+24
View File
@@ -16,15 +16,38 @@
#include <cstdint>
#include <optional>
#include <utility>
#include <vector>
namespace evo::client_app {
enum class Mode : std::uint8_t { launcher, fixture, remote };
// The cellular microscope view (2026-10-16 UI), in logical window coordinates. The client
// loop builds it from copied presentations each frame; the panels draw it with the
// toolkit, since membranes, flagella and granules are not rectangles. Appearance comes
// from the phenotype only: size from extent, flagella from movement speed, wall
// thickness from membrane mass, organelles from energy conversion.
struct SceneCell {
float x{}, y{}, radius{}, membrane{};
int flagella{}, organelles{};
bool own{}, dead{}, stale{};
std::uint64_t seed{}; // Stable per organism: orientation and organelle layout.
};
struct ScenePatch {
float x{}, y{}, half{}; // Centre and half side of the 1 mm contact footprint.
std::array<std::uint64_t, 5> stock{}; // Energy pJ, then C, N, P, other fg.
bool target{}, stale{};
std::uint64_t seed{};
};
struct CellularScene {
std::vector<ScenePatch> patches;
std::vector<SceneCell> cells;
};
// Notice layout (logical pixels); the window name is the prefix plus the notice id.
inline constexpr float notice_width = 320, notice_close_width = 22;
inline constexpr const char* notice_window_prefix = "##notice";
// Text-field storage for the connect form (bounded; never persisted).
struct FormBuffers {
bool engineering{};
bool evolution_open{}; // The mutation window (E or the callout opens it).
CellularControls cellular_controls;
std::array<char, client::max_field_bytes> endpoint{}, server_name{}, authority{}, grants{};
void load(const client::ConnectForm& form);
@@ -50,6 +73,7 @@ struct PanelView {
std::optional<RemoteStatus> remote;
const network::CellularPerception* cellular_perception{};
const CellularPlay* cellular_play{};
const CellularScene* cellular_scene{}; // Drawn under the panels when present.
std::optional<std::pair<std::uint32_t, std::uint32_t>> cellular_feed_target;
const client::OutcomeLog* outcomes{};
int visible_organisms{-1}; // -1 when unknown.