,,。
User manual
Explore constructs hex-grid terrain maps from a textual specification and produces a graphical display of the result (Error: Reference source not found.) Version 2 adds a new shortest path capability.
Explore v.2 can draw any size rectangular map your computer hardware can accommodate. The display engine will automatically supply scroll bars for maps which are too big for your display.
Explore v.2 maps are composed of terrain cells and cell to cell “connectors” which describe traffic way and water ways. Connectors are “weighted” by their traffic capacity. Version 2 also includes provision for marking start and end cells and for computing the shortest path between those cells. The viewer includes new support for displaying the shortest path. (See Error: Reference source not found.)
Explore Terrain Features
Terrain maps are composed of up to four different terrain types, four different connector types, barriers, and some special markers. Each cell’s “background” graphic corresponds to the terrain type in that cell. details the different terrain types. Traffic can cross from cell to cell, even without a connector. When there is no connector at a cell edge, the traffic capacity is that of the lower capacity cell.
Connectors cross cell boundaries, going from center to center on adjacent cells. Each Connector has a traffic capacity independent of the underlying terrain. Error: Reference source not found gives connector details. Traffic capacity goes up as edge weight (cost of travel) goes down.
Explore automatically computes the effective capacity of each cell wall, using the following policy:
- if the has a barrier, the weight for that edge is 900.
- if the there is no connector between two cells, the weight is the maximum of the terrain weight in the two cells. For example, an edge between forest and default would have an effective weight of 195.
- if there is a connector between two cells the edge weight will be the connecter weight. (It is possible for the edge weight to be less than the connector weight, but only if the capacity of the underlying terrain exceeded the capacity of the connector.
Table 1 - Terrain details
| Name |
Represents |
Weight |
| default |
Relatively flat, easily traversed open land. |
165 |
| brush |
Like default, but with low obstacles. |
180 |
| forest |
Dense trees. Difficult for vehicular traffic. |
195 |
| water |
Open, relatively still water, such as a lake or pond. Not necessarily suitable for high speed craft. |
190 |
| flag1 |
The start cell. |
0 |
| flag2 |
The finish point. |
0 |
Table 2 - Connector Details
| Names |
Represents |
Weight |
| dividedhwy, Hw4 |
An interstate or turnpike quality high speed trafficway. |
110 |
| hwy, Hw2 |
A two-lane, two-way (e.g., state or county) highway. |
130 |
| unpaved, dirt |
An unpaved, dirt or gravel road or path |
143 |
| river |
Moving water, but may be navigable only by certain craft. |
185 |
| barrierwall, wall |
A barrier. |
900 |
Installation
Explore is supplied only as source code. Thus, there is no installer. Explore is distributed as a single zip archive file. The name of this file may differ between providers and versions. If you cannot determine the appropriate file to download, please contact your provider.
If you are a developer, you may prefer to follow the installation advice in the Developer Documentation and add the source to a project in your IDE.
To install the application as a user:
- Download the zip file into a folder (directory) of your choice.
- Use your local system zip utility to unpack the file. Depending on your operating, this utility may be named unzip, gunzip, zip, 7-zip, or something similar. On many systems you can simply right click on the file in your file browser and select “unzip” or “extract here”.
- Once you have unpacked the archive, you should browse into the new file hierarchy. In the first two or three levels you should find a folder named “src”.
- When you have found this “src” directory, open a command line shell and cd into the src directory. (If this operation is unfamiliar, ask a developer friend for help.
- You now need to compile the code.
- If the compile operation completes without any messages indicating an error, then you should now have an executable version of Explore.
Creating Your Own Terrain Files
Explore terrain descriptions are simple text files. Thus you can create your own mazes in any simple text editor. (Explore graph descriptions must be .txt files. Explore does not understand word processer or document files, such as .doc or .pdf.)
Locations
Locations in the terrain file are specified with Hex coordinates, corresponding to a vertical column number and a diagonal row number, as highlighted in Error: Reference source not found. Note that cell(0,0) is at the upper left corner, and rows and columns indexes grow larger as you move right and down. The left number in cell(x,y) corresponds to the cell’s column; the right number to its diagonal row. The red star in Error: Reference source not found is in cell(1,2).
(Tip: You can make a screen capture of a terrain map with no features, and print it to create a nicely labeled design layout grid. Creating the text file is much easier if you draw your terrain design on the grid and then transcribe the cell appropriate cell numbers.)
Directions
Cell walls are named by their direction from the center of the cell. In terrain files, these wall names (in clockwise order from the top of the cell) are abbreviated “up”, “ur”, “dr”, “dn” &lⁱ…⁵䍯ⁱ†⁰⁷㱲⽥㹣ൡੳ㱥㍩㵯≭䥥ⵡ䠠≩㹳䤠⁰䡣㱯⼠㍳㹥ഠ੯㱮㹹䌠†‼‽⁴ⰾ⁆‼⁴䤠♯㭥†⁷Ⱐ⁰†⁴㱲⽲㹩൮ਬ㰠㹯䥮ⱗ††
⁰㰠⽯㹬൹ਠ㱯㉣㵡≮䑤ⴠ∠㹩䑮㰠⽴㉥㸠൦੬㱡㌠㵴≩䐠⵰䄠≮㸠Ⱐ䑡Ᵽ䅯㱭⽡㌠㹢ਠ㱬㹳䙴†ㅡ⁷⁴䔠⁴⁹‾‾⁵†⁷⁸⁰Ɱ†††♥㭵㱳⼮㸯൰ਾ㰍㌼⁰㵩≴䙣≴㹨⁴䙲㱩⽥㍷㹡൬੬㰠㹥
†㱴⽥㹲ൡ੩㱮㹳㱣㹩㬠㭮㩳㨠⁴㭥㬠㭷㬠⬦൬㭯㭱㩵㩯※㭲㬻㽲㭲㭦⩯㭷㭴⨠㭥㭡⩴ੳ㬯㬠㩩㩤‽㭥㭯㭤㬾ൔ㭡㭮㩴㩥⠼⥩㭥㬠ਠ㭳㭮㩡㩴⡥⥳†㬠㭭ਠ㭲㭔㩵㩳㭨⁴㬠㭥†㭯⩲㭮㭥൹ਠ㭮㭧㩵㩯⁵㭲㭥⭲ൡ੬㭬㭩㩮㩥㭦㭵㭵㭥ഠ㱡⽣㹵㱳⽴㹯൦ਠ㱬㹫䅥㱮⽴㹳㱴㹮മਠ⁅⁸⁰㱯㸠ⁱ†‼ ⱐ⁴䍯⁴⁰†㱵⽳㹭⁴†㱮㹲䝡⁴†⁵䝯†⸠†⁴†䥴⁴ⱡ⁰†⁴†⁷
㰬⼠㹲ഠ⁸⁰㱬㸠⁴⁵⁴䠠†⁴†⁴ ‾† ⁔†⁷††⁴†♮㬠♤㬠
㱬⽡㸼യੰ‾ ‼㱨㹩䕤 ⡥⁹⁸⥬†䕴†⁰⁴※†ⱨⰠ⁷⁴⁵•†‾‾⡥⥥††††⁰⁵㱮⽡㸩ഠੴ㱨⽡㹡൲㰠㍬㵥≤䤠䑡≥㸬䤠⁷䐠㱭⽥㍴㸠㱳㹩ൢ†⁴⁷㱯㹵䍬䑲⸠㱩⽮㹲൲੯›†⁒㱥㹲㱵⽮㸼യੰ‾ ‼㱰㸾䐼†㰯⽰㸾ਊ‼⁰‾⁅㱡㸠ⴠⰠⰠ⁴⸠㱡⼠㹳൴ਠ†㱥㸠䥷䨠⁰†㱲⽷㹬ഠ੫⁹⁷㱲㹣䱡㰠⽢㹡൳ਠ⁹㰠㹲䅤㱣⽲㹴൩੯†㱳㹯䝭䕩䝫⸠⡥⥯㱦⼠㹲൲੩†㱮㸠⁴䍲㱳⽥㹩൯੮‼ ⁰㰾㸼⁄⁔䙮㱡⽹㹧ഠੁ†⁔㱲㹮‼⁰†㱣⽵㹲ഠੴ㱩㹭†††⁵††⁰㱲⽥㹤൱ੵ㱯⼻㹩൴੨㰠㍨㵡≴ⵥⴠ䡦ⵦ≭㹯⁴䡯⁷㱧⼠㍩㹲㱴㹲䵥Ɒ†㉴づ⁵䕳†⁴⁴Ⱪ⁴†⁰⁹䘠Ⱪ⁰⁹♥㬠♧㭣䅭 ※⁴ ⁰⁙†⸠㱲⽥㹡൴੩㱶㸠䡰Ⱐ†䱭⁹†⁸⁴ⱹ††⁹⁵⁸䝥⁹⁴⁰⁰‾†⁸‼㰾⽉㸠൮㱩㉨㵯≦䌠ⴠ䱩≯㹲䌠⁴䱳㱴⽩㉮㸠ൡ੮㱤㹦䅡†⁴⁙⁷†ⱳⰠ⁴Ⰺ‼•䱃⹃⁴䰊Ᵽ††⡮†⁵††⤬†䅡ⱥ†⁴†䍶⽤䝢㱡⽴㹯൮ਠ㱩㸠⁵䱡††ⱴⱤ†ⁱ⁹⡴⁈ ⁰⥳⸠⁃㱴⽥㹲ੰ㱲㹳䥥⁴⁵…⼻⼠䐠㩨†⁴††⡨⥯䝩⁴䵩⁶⁵‼☯㭰♃㭮†⡯⁵⁴††⥰⸍ 䔼†⁴
††⁴♥㭵♮㭮 ‾†⁸⁹䝡ⱦ㩲㱤⽩㹡൴㰠㹩൲ਮ‼ 㰾㸠ഠਠ†‼㰾㹯䙩⠨䌠ㄠⱢ䍯
㉲⥴† ‾ⱥⱴ⁶†䅵⁴†
⁴⁔㱳⼠㸠†㱢⽪㹴ഠ㰠㹣൬ੵ†㱡㸠䍥⡬※ⱱ⁵䍯⁵⥲ⁱ䱵†⁵※††Ⱐ㱡⽲㸠ന੨⁸
㰠⽒㹴ൡ੮⁵㱲㹯൲ਠ⁓㱥㸠⠠䱳Ⰽ ⥢䵣⁴
†⁰‾†ⱴ†Ⱳ††‼‾⁵‾⸾㱃⽯㹲੩⁴㰠⽯㹥ൣੴ†㱳㹳൵ੰ⁰⁴㰠㹡䉵䕬⡡䱮Ɐ䍶⤠⁵ ⁵ ‾
†††ⱐ⁄⁴⁴⁴†⁸†⁷⁴⸍ ⰼ
†
⁴†㱥⼠㹯ൡੲ†㱩⽧㹯൲ਠ⁴†㱩㹣൴੩†㱩㸮⠾⤾⹓Ɱ†⁴ ‼†⁸⁈″♲㭧†††⁹†⁴⁵⁴⁰Ⱐ
⁵⁰†⁰䙩Ⱳ†⁴⁰Ɐ⁴⁹⁶⁴䄠䍥⁴⁴⁷†䔠㱥⽴㹥੮†⁴⁷㰠⽃㹲੩㱮⽡㹳ഩਠ㱩㹴⁹☠㭤☮㭡⁰ 䰠‾†䝲⸠㱤⽥㹲㱳㉦㴠≴䑨䥩∠㸼䑬†䥦㱩⽮㈠㹤ഩਠ㱲㍴⁵㵳∠䑴ⵄⵣ䅯∠㹴䑨䅲㱴⼠㍩㹲㱴㹯䱢⁴†⁸䱩Ⰽ ‼•″⁰†Ⱪ⁺†††⁷⁊⁴†ⵡ††⁂ⱥ†⁵†⁹†⁰⁴㱥⽮㹳ഠ੬㱩㍥†㵩≳䐮ⴾ⵰䐾ⵡ䅭≷㹯䑲⁴䑨䄠㱤⽥㍓㹥൧੭㱥㹴⁴ ‼⁓♣㬠⁷♮㭴†⁰‼″‽•♯㭬″ ⁆††††㱦⽥㹤൳ਠ㱷㹴䍨ⱡ䍡ⱴ†ⱴ䉩ⱹ䍵Ɐ††㱮⽥㸮ഠ੍㱯㹥††⁴⁶Ⱶ†⁵⁰ⱴ† while it certainly helps readability, can greatly complicate parsing. The NoiseFilterReader makes it all go away.
To process a string (e.g., to make test construction more convenient), the setup would be.
A similar sequence, but chaining File and FileReader in place of StringReader can be used to strip punctuation from your terrain descriptions.
The NoiseFilterReader is an example of specialization through delegation (instead of through inheritance). If you look at the definition, you will see a lot of code, but with the exception of three or four methods, all of that code was generated using the eclipse sourcegt;generategt;delegate.
Diagnostic Aids
The toString() override on Graph (inherited by both HexGraph and TerrainGraph) will print the following style dump of the graph with edge weights. If called after TerrainLoader has finished constructing TerrainGraph, you will get a dump like the following, which includes the effective weight associated with each vertex. Currently this is the most convenient way to check that edge weights are being computed properly.