Lenia — currently turning the simulation into a sort of game where you explore a larger world built from image files loaded into a persistent layer, with things to discover and collect along the way.
const std::vector<f32>& cells,
const size_t c_w, const size_t c_h
) noexcept {
std::vector<f32> padded(m_worldW * m_worldH, 0.0f);
for (size_t y = 0; y < c_h; y++)
for (size_t x = 0; x < c_w; x++)
padded[y * m_worldW + x] = cells[y * c_w + x];
std::vector<c64> complex(m_worldW * m_worldH);
for (size_t i = 0; i < padded.size(); i++)
complex[i] = { padded[i], 0.0f };
m_layers |= LAYER_ID::WORLD;
}