Commit Graph

712 Commits

Author SHA1 Message Date
Dustin Carlino
fb3e4e5177 cancel turn requests when deleting a car forcibly 2019-09-08 15:21:15 -07:00
Dustin Carlino
19135c7461 debug feature to kill off a stuck car 2019-09-07 13:46:47 -07:00
Dustin Carlino
caaf0954ab rename the main editor crate to game -- map editing is just a tiny piece ;) 2019-09-07 13:09:09 -07:00
Dustin Carlino
68269530fe refactor intersection type checks 2019-09-07 12:34:39 -07:00
Dustin Carlino
219a6feacd rework trip start/end 2019-09-07 12:26:00 -07:00
Dustin Carlino
c5fd22ae81 refactor sim->editor metadata for unzoomed/zoomed agents 2019-09-07 12:01:45 -07:00
Dustin Carlino
8bf4711053 abort trips using parked cars if they dont work out 2019-09-05 17:37:36 -07:00
Dustin Carlino
36f4ccecb6 do the last-minute work of gluing a ped to an available car 2019-09-05 13:39:19 -07:00
Dustin Carlino
cf7d847f32 some of the plumbing to make psrc trips dynamically use a parked car, when possible. very
complicated impl. should blow up when one of these trips actually
starts.
2019-09-05 13:01:46 -07:00
Dustin Carlino
8a05e59865 shuffle spots per road, so we dont start with an eerily even line of cars 2019-09-05 10:54:19 -07:00
Dustin Carlino
048976a256 spawn a specific number of parked cars per bldg for a scenario. dont use
them yet.
2019-09-05 09:45:02 -07:00
Dustin Carlino
ccdae6e54b show total parking spots available 2019-09-04 14:56:50 -07:00
Dustin Carlino
e35709fc51 calculate number of parked cars needed for PSRC trips in a very
primitive way
2019-09-04 13:58:48 -07:00
Dustin Carlino
528010f308 render cars on driveways a little better 2019-09-02 22:34:01 -07:00
Dustin Carlino
6d7d3d4a43 warp to car parked in garage, without having to define a DrawCar for it 2019-09-02 11:42:29 -07:00
Dustin Carlino
d404d938f6 browse cars parked in garage more easily 2019-09-02 11:08:01 -07:00
Dustin Carlino
fcc3863dab proper walking connections after parking in a garage, debug support for
cars parked in a bldg
2019-09-01 21:25:31 -07:00
Dustin Carlino
814313df98 make cars start parking in garages. parking animation is wrong and trip
connections wrong, that'll come next.
2019-08-31 12:41:23 -07:00
Dustin Carlino
03b685673b remove two unused deps caught by cargo-udeps 2019-08-30 15:06:45 -07:00
Dustin Carlino
abe4d218f0 adding new type of ParkingSpot to sim layer. not glued to everything
yet.
2019-08-30 14:16:34 -07:00
Dustin Carlino
7fffb8d6e5 use modalmenu, not logscroller, for scenario and a/b test info. remove
logscroller from public ezgui api
2019-08-24 14:53:26 -07:00
Dustin Carlino
e983e754d2 cars and bikes parking werent actually freeing reserved space... doh 2019-08-23 16:26:55 -07:00
Dustin Carlino
0451f9919e make time_limited_step snappier, so we block less long when we can't run fast nuff 2019-08-23 13:52:21 -07:00
Dustin Carlino
f58519d723 dont try to start biking on a blackhole 2019-08-23 12:51:43 -07:00
Dustin Carlino
17136509cf the parking redirects dont have to be before the lane... they can also be after. just nearby is the goal. this fixes a few more aborted trips 2019-08-23 12:30:25 -07:00
Dustin Carlino
b644f1d86d dont seed parked cars in blackholes 2019-08-23 10:06:22 -07:00
Dustin Carlino
9f897ef094 removing ezgui inline color parsing. pretty much unused, isn't helping
compile time. also fixing clippy issues
2019-08-22 13:38:16 -07:00
Dustin Carlino
bb70594c65 be more clear when following an agent and similar fail due to temporary mode-change vs trip being done/aborted 2019-08-21 15:20:39 -07:00
Dustin Carlino
f012660da7 floodfill and pathfind to a free parking spot, instead of randomly picking one turn at a time 2019-08-21 00:01:28 -07:00
Dustin Carlino
f9376cddcb dont leak unfinished trips when things cant spawn 2019-08-19 15:05:10 -07:00
Dustin Carlino
f62965b5e2 small refactor: rename time param -> now. more clear and will help the Duration / Instant split later. 2019-08-19 14:56:07 -07:00
Dustin Carlino
7001139dc0 fix div by 0 bug with percent_dist_crossed for empty paths 2019-08-19 14:41:56 -07:00
Dustin Carlino
0ba3ab92ed fix very, very, very dumb block-the-box bug. >_< 2019-08-19 14:32:15 -07:00
Dustin Carlino
2fe2559f67 new colorscheme showing trip time so far 2019-08-19 14:14:19 -07:00
Dustin Carlino
f3f4f98290 also use AgentColorScheme for zoomed color 2019-08-19 14:00:12 -07:00
Dustin Carlino
be71aa42fc remove old unused get_unzoomed_agents, always return details. may be a little slower than the other, but it's worthwhile to prioritize optimizing the richer representation instead of maintaining awkward dupe code 2019-08-18 15:08:02 -07:00
Dustin Carlino
dd28afcd29 making all AgentColorScheme values work the same, with the same caching 2019-08-18 15:05:22 -07:00
Dustin Carlino
9d58ee12a4 properly merging nearby pedestrians by intervals of dist_along 2019-08-18 14:32:07 -07:00
Dustin Carlino
d0d7bb79e3 color unzoomed agents by distance remaining 2019-08-16 16:25:27 -07:00
Dustin Carlino
a9267c76c7 debug tooltip showing how far an agent has traveled and how much
remains. seems to have small perf impact on initially calculating paths.
:(
2019-08-16 15:43:20 -07:00
Dustin Carlino
bbc4492205 be able to toggle off block-the-box protection. initial findings:
sometimes the protection makes things worse!
2019-08-16 13:59:07 -07:00
Dustin Carlino
a5b73c060a make savestate_every a flag again 2019-08-16 13:34:38 -07:00
Dustin Carlino
3cebc3cc44 try using freeform policy at all intersections, to see how it affects gridlock 2019-08-16 11:17:27 -07:00
Dustin Carlino
4e83f492d8 upgrade rand, get rid of now unneeded serde1 feature, in hopes of fixing feature mismatch between deps 2019-08-15 12:14:35 -07:00
Dustin Carlino
a3cd03a5bc rephrase time_since_last_turn as time_spent_blocked, so things like pedestrians walking on long roads don't show up as spurious gridlockedness 2019-08-13 14:26:45 -07:00
Dustin Carlino
4c7c9156d0 label buses with route number! 2019-08-13 12:50:14 -07:00
Dustin Carlino
6950c22394 simplify rules for starting a turn through a stop sign. should retain priority, but be opportunistic when higher-ranked agents are actually blocked 2019-08-12 14:43:13 -07:00
Dustin Carlino
784e076aff fixes for 'dont block the box'... handle cars vanishing at borders 2019-08-12 14:14:15 -07:00
Dustin Carlino
51cfd49a43 unstick a poor pedestrian who couldn't cross a SharedSidewalkCorner in
the signal time. be reasonably loud when a turn is impossible to finish
in the cycle duration.
2019-08-12 12:37:29 -07:00
Dustin Carlino
a37b3fe58c part 1 of of 'dont block the box'. disabled, because something's broken,
but a solid start.
2019-08-11 19:24:13 -07:00