From 25ab691946b317f2c3d0a5369bb47d8ca68f1a38 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Tue, 22 Oct 2019 12:27:47 -0700 Subject: [PATCH] add basic usage instructions --- docs/INSTRUCTIONS.md | 42 ++++++++++++++++++++++++++------------- game/src/splash_screen.rs | 10 +++++----- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/docs/INSTRUCTIONS.md b/docs/INSTRUCTIONS.md index 0b91eb7336..b1d6db0173 100644 --- a/docs/INSTRUCTIONS.md +++ b/docs/INSTRUCTIONS.md @@ -17,7 +17,34 @@ I'll try to keep these links up-to-date: - Mac (seems to have a HiDPI bug, text is offset): https://github.com/dabreegster/abstreet/releases/download/v0.1.10/abstreet_mac.zip -### Compiling from source +## Running the game + +Start the game by running `play_abstreet.sh` or `play_abstreet.bat`. On Windows, +you'll probably get a warning about running software from an unknown publisher. + +General controls: + +- Click and drag to move +- Scroll wheel or touchpad to zoom +- Menus should work as expected. Most actions have a keybinding. +- You can hover over an object and right-click to see more actions. + +Things to try: + +- In sandbox mode, hover over an intersection, right click, and spawn agents. + Then you can start the simulation by pressing **space** to "resume". +- To run a realistic, full day's worth of traffic, go to sandbox mode and "reset + sim" if needed. Then "start a scenario" and choose the "psrc" entry (this + needs a better name). Time (shown in the top-right corner) starts at midnight. + Things tend to get interesting around 6am. Try zooming in for details, and + zooming out to see an overview. +- Go to edit mode (note this will reset the simulation). Pick a lane, right + click, and change it to another type. You can also change which roads see a + stop sign by right clicking the intersection, choosing to edit, hovering over + a stop sign, and pressing **space** to toggle it. You can do the same for + intersections with traffic signals. + +## For developers: Compiling from source To build, you need a Linux-like environment with `bash`, `wget`, `unzip`, etc. You also `osmosis` for the import script. At runtime if you want to use the @@ -42,19 +69,6 @@ cd game cargo run --release ``` -## Running the game - -Start the game by running `play_abstreet.sh` or `play_abstreet.bat`. On Windows, -you'll probably get a warning about running software from an unknown publisher. - -General controls: - -- Click and drag to move -- Scroll wheel or touchpad to zoom -- Follow on-screen controls otherwise. You can also try hovering over an object - and right-clicking to see more actions. (These controls will show up more - clearly soon.) - ## Data source licensing A/B Street binary releases contain pre-built maps that combine data from: diff --git a/game/src/splash_screen.rs b/game/src/splash_screen.rs index 70b8d80753..37031e8350 100644 --- a/game/src/splash_screen.rs +++ b/game/src/splash_screen.rs @@ -125,10 +125,10 @@ fn splash_screen( let sandbox = "Sandbox mode"; let load_map = "Load another map"; let edit = "Edit map"; - let tutorial = "Tutorial"; - let debug = "Debug mode"; - let mission = "Mission Edit Mode"; let abtest = "A/B Test Mode"; + let tutorial = "Tutorial (unfinished)"; + let debug = "Debug mode"; + let mission = "Internal developer tools"; let about = "About"; let quit = "Quit"; @@ -144,10 +144,10 @@ fn splash_screen( Choice::new(sandbox, ()).key(Key::S), Choice::new(load_map, ()).key(Key::L), Choice::new(edit, ()).key(Key::E), + Choice::new(abtest, ()).key(Key::A), Choice::new(tutorial, ()).key(Key::T), Choice::new(debug, ()).key(Key::D), Choice::new(mission, ()).key(Key::M), - Choice::new(abtest, ()).key(Key::A), Choice::new(about, ()), Choice::new(quit, ()), ] @@ -184,10 +184,10 @@ fn splash_screen( } } x if x == edit => Some(Transition::Push(Box::new(EditMode::new(ctx, ui)))), + x if x == abtest => Some(Transition::Push(PickABTest::new())), x if x == tutorial => Some(Transition::Push(Box::new(TutorialMode::new(ctx, ui)))), x if x == debug => Some(Transition::Push(Box::new(DebugMode::new(ctx, ui)))), x if x == mission => Some(Transition::Push(Box::new(MissionEditMode::new(ctx, ui)))), - x if x == abtest => Some(Transition::Push(PickABTest::new())), x if x == about => { if wizard.acknowledge( "About A/B Street",