a-b-street/abstreet

Represent people inside buildings better using procedural generation

Open

#127 geöffnet am 4. Juli 2020

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (256 Forks)batch import
design-neededgood first issue

Repository-Metriken

Stars
 (6.779 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide