a-b-street/abstreet

Represent people inside buildings better using procedural generation

Open

#127 ouverte le 4 juil. 2020

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)Rust (256 forks)batch import
design-neededgood first issue

Métriques du dépôt

Stars
 (6 779 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

When you click a building with people inside, they currently appear, but their arrangement is a bit silly (and sometimes leaks outside the building). It'd be fun to improve this, and it's pretty self-contained. Code is at https://github.com/dabreegster/abstreet/blob/3eecdeddff70bbca2fb36f6e1bb0ef634fe01cf1/game/src/info/building.rs#L182. Some ideas:

  1. From the building outline, procedurally generate a floor plan
  2. Move people around inside the building slowly to represent activity inside. This should be a very cheap calculation, not a full-blown simulation or anything requiring storing any state. Ideally you take as input (sim time, person ID, the building) and come up with a position.
  3. Maybe allow mousing over and clicking people inside buildings. At least one person during user-testing was surprised you couldn't.

Guide contributeur