a-b-street/abstreet

Represent people inside buildings better using procedural generation

Open

#127 opened on 2020年7月4日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)Rust (6,779 stars) (256 forks)batch import
design-neededgood first issue

説明

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.

コントリビューターガイド