159
edits
scape_>Ralpha |
m (26 revisions imported) |
||
(15 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
{{external|rs}} | |||
{{otheruses|the cartography project|documentation and help creating maps|RuneScape:Create Map}} | |||
This page contains documentation for the cartographer project. This project is still in development and is prone to changes. This project uses the codename ''Doogle'' or ''Doogle Maps'' sometimes. | This page contains documentation for the cartographer project. This project is still in development and is prone to changes. This project uses the codename ''Doogle'' or ''Doogle Maps'' sometimes. | ||
{| class="wikitable" | |||
|- | |||
! View/Create Maps !! Issues !! Development | |||
|- | |||
| | |||
Open the map: <maplink mapid=0 plane=0 zoom=2 x=3293 y=3139 text="click here"/> | |||
* OSRS production version: https://maps.runescape.wiki/osrs/ | * OSRS production version: https://maps.runescape.wiki/osrs/ | ||
* RS3 production version: https://maps.runescape.wiki/rs (not online) | * RS3 production version: https://maps.runescape.wiki/rs (not online) | ||
[[RuneScape:Create Map|Create a map]] | |||
[[RuneScape:Map/mapIDs|Map IDs (for non-surface maps)]] | |||
|| | |||
* | Report the problems you have here (follow link of item): | ||
* | * [https://gitlab.com/weirdgloop/map-tile-generator/issues Tiles, map background], | ||
* | * [https://gitlab.com/weirdgloop/doogle-maps/issues Interface on maps.runescape.wiki], | ||
* [https://gitlab.com/weirdgloop/extensions/kartographer/issues wiki interface, wiki integration], | |||
* [https://gitlab.com/weirdgloop/extensions/kartographer/issues other issues, if not sure], or join us on [[meta:Discord|Discord]] #cartographers) | |||
[[RuneScape:Map Tests|Test if maps are displayed correctly]] | |||
|| | |||
* Design documents: https://docs.google.com/document/d/1xv7iVBkG6eWDrXFhIYi77AVodJc0D-4Aqn0ncZXKJfw | |||
* Muckups (UI): https://sketch.cloud/s/Eq5O2 | |||
* [[meta:Discord|Discord]]: #cartographers | |||
Code repo's: | Code repo's: | ||
* Map tile generator: https://gitlab.com/weirdgloop/map-tile-generator | * Map tile generator: https://gitlab.com/weirdgloop/map-tile-generator | ||
* Stand alone map: https://gitlab.com/weirdgloop/doogle-maps | * Stand alone map: https://gitlab.com/weirdgloop/doogle-maps | ||
* Kartographer extension for wiki: https://gitlab.com/weirdgloop/extensions/kartographer | * Kartographer extension for wiki: https://gitlab.com/weirdgloop/extensions/kartographer | ||
Want to help with the development? You are more then welcome! Join the Discord channel above and let us know.<br> | |||
(You don't have to know programming, we also have a need for other skills.) | |||
|} | |||
Example for a (quest) map: | |||
<mapframe text="Quest: Cooks Assistant" width=450 height=450 zoom=1 x=3188 y=3260 frameless align="center" > | |||
{ | |||
"type": "FeatureCollection", | |||
"features": [ | |||
{ | |||
"type": "Feature", | |||
"properties": { | |||
"info": "Start Quest", | |||
"title": "Talk to the cook", | |||
"providerID": 2, | |||
"icon": "quest_start", | |||
"mapID": 0 | |||
}, | |||
"geometry": { | |||
"type": "Point", | |||
"coordinates": [ | |||
3208, | |||
3213, | |||
0 | |||
] | |||
} | |||
},{ | |||
"type": "Feature", | |||
"properties": { | |||
"title": "Buy a bucket and a pot", | |||
"providerID": 2, | |||
"icon": "general_store", | |||
"mapID": 0 | |||
}, | |||
"geometry": { | |||
"type": "Point", | |||
"coordinates": [ | |||
3211, | |||
3246, | |||
0 | |||
] | |||
} | |||
},{ | |||
"type": "Feature", | |||
"properties": { | |||
"title": "Milk Cow", | |||
"providerID": 2, | |||
"icon": "dairy_cow", | |||
"mapID": 0 | |||
}, | |||
"geometry": { | |||
"type": "Point", | |||
"coordinates": [ | |||
3174, | |||
3317, | |||
0 | |||
] | |||
} | |||
},{ | |||
"type": "Feature", | |||
"properties": { | |||
"title": "Mill flower", | |||
"providerID": 2, | |||
"icon": "windmill", | |||
"mapID": 0 | |||
}, | |||
"geometry": { | |||
"type": "Point", | |||
"coordinates": [ | |||
3166, | |||
3306, | |||
0 | |||
] | |||
} | |||
},{ | |||
"type": "Feature", | |||
"properties": { | |||
"title": "Pick-up an egg", | |||
"iconWikiLink": "Egg.png", | |||
"iconSize": [15,20], | |||
"mapID": 0 | |||
}, | |||
"geometry": { | |||
"type": "Point", | |||
"coordinates": [ | |||
3177, | |||
3306, | |||
0 | |||
] | |||
} | |||
}, | |||
{ | |||
"type": "Feature", | |||
"properties": { | |||
"navigation": false, | |||
"mapID": 0 | |||
}, | |||
"geometry": { | |||
"type": "LineString", | |||
"coordinates": [ | |||
[ | |||
3208, | |||
3213, | |||
0 | |||
], | |||
[ | |||
3211, | |||
3246, | |||
0 | |||
], | |||
[ | |||
3174, | |||
3317, | |||
0 | |||
], | |||
[ | |||
3166, | |||
3306, | |||
0 | |||
], | |||
[ | |||
3177, | |||
3306, | |||
0 | |||
], | |||
[ | |||
3208, | |||
3213, | |||
0 | |||
] | |||
] | |||
} | |||
} | |||
] | |||
} | |||
</mapframe> | |||
== Map Creation == | == Map Creation == | ||
=== Old School RuneScape === | === Old School RuneScape === | ||
The map for OSRS are created using modified version of the [https://github.com/runelite/runelite RuneLite] [https://github.com/runelite/runelite/blob/master/cache/src/main/java/net/runelite/cache/MapImageDumper.java MapImageDumper] script. It uses the game cache as the source for the maps. This provides easily updatable maps. | The map for OSRS are created using modified version of the [https://github.com/runelite/runelite RuneLite] [https://github.com/runelite/runelite/blob/master/cache/src/main/java/net/runelite/cache/MapImageDumper.java MapImageDumper] script. It uses the game cache as the source for the maps. This provides easily updatable maps. | ||
The code for this can be found at: https://gitlab.com/weirdgloop/map-tile-generator | The code for this can be found at: https://gitlab.com/weirdgloop/map-tile-generator | ||
This script creates map regions at different resolution levels: | This script creates map regions at different resolution levels: | ||
Line 35: | Line 185: | ||
File:Map region_Zoom_3.png|Zoom level 3, 512x512px, 16px per game square | File:Map region_Zoom_3.png|Zoom level 3, 512x512px, 16px per game square | ||
</gallery> | </gallery> | ||
These map regions include ground | These map regions include ground colour, roads, buildings, doors, walls, trees and other objects. Icons are not included in these renders. | ||
There map regions are then processed into maptiles that can be used for viewing the map. These tiles are all 256x256px but created using different map regions. This process uses [https://www.imagemagick.org/ ImageMagick] ([https://www.imagemagick.org/script/montage.php montage] and [https://www.imagemagick.org/script/convert.php convert]) to combine and split image to create the desired result. This process is automated using a [[wikipedia:en:Shell_script|Bash shell script]]: | There map regions are then processed into maptiles that can be used for viewing the map. These tiles are all 256x256px but created using different map regions. This process uses [https://www.imagemagick.org/ ImageMagick] ([https://www.imagemagick.org/script/montage.php montage] and [https://www.imagemagick.org/script/convert.php convert]) to combine and split image to create the desired result. This process is automated using a [[wikipedia:en:Shell_script|Bash shell script]]: | ||
Line 46: | Line 196: | ||
</gallery> | </gallery> | ||
These tiles are directly used by Leaflet to display the map. | These tiles are directly used by Leaflet to display the map. | ||
==== Layering Creation ==== | |||
[[File:OSRS_Layers_of_Map_creation_example.png|thumb|400px|Combining of tiles to create zoom layer 2 and 3 tiles and names]] | |||
Combining and splitting images for use in Leaflet we have different zoom levels: 3,2,1,0,-1,-2,-3 | |||
The map scales exponential (2^x) for each zoom level. This is the same as most [https://wiki.openstreetmap.org/wiki/Slippy_Map slippy map] systems / GIS systems. | |||
It comes down to, if you zoom in each tile splits into 4 pieces, if you zoom out each tile is a combination of 4 pieces. | |||
So zoom level 4 (400%) is created by splitting the image into (2^2)*(2^2)=16 images of 256x256 like this (but this is not used on our OSRS maps): | |||
<pre> | |||
0 1 2 3 | |||
4 5 6 7 | |||
8 9 10 11 | |||
12 13 14 15 | |||
</pre> | |||
At zoom level 3 (200%) is created by splitting the image into (2^1)*(2^1)=4 images of 256x256 like this: | |||
<pre> | |||
0 1 | |||
2 3 | |||
</pre> | |||
Zoom level 2 (100%) just the same image (2^0)*(2^0)=1 image. (that is why in the script zoom level 2 just copies all the images (that are in the range we are working on). This is the same size as a region in OSRS.<br> | |||
Zoom level 1 (50%) is created by combining 4 images (128x128) to create a 256x256 image.<br> | |||
Zoom level 0 (25%) is created by combining 16 images (64x64) to create a 256x256 image.<br> | |||
...etc... | |||
=== RuneScape 3 === | === RuneScape 3 === | ||
Line 90: | Line 263: | ||
The map tiles are available under the path: <code>tiles/{mapID}_{cacheVersion}/{z}/{p}_{x}_{-y}.png</code> | The map tiles are available under the path: <code>tiles/{mapID}_{cacheVersion}/{z}/{p}_{x}_{-y}.png</code> | ||
; Definition lists | ; Definition lists | ||
; mapID : the map bounds (0=RuneScape Surface, 1=Acient Cavern), mapID's smaller then 10000 are exported from game cache, mapID's larger then 10000 are user defined | ; mapID : the map bounds (0=RuneScape Surface, 1=Acient Cavern), mapID's smaller then 10000 are exported from game cache, mapID's larger then 10000 are user defined. Map ids can be found at [[RuneScape:Map/mapIDs]] | ||
; cacheVersion: version numbering for when a map has been updated. (in format: YYYY-MM-DD_{1-9}, with the last digit being the update of that day, usualy 1 ) | ; cacheVersion: version numbering for when a map has been updated. (in format: YYYY-MM-DD_{1-9}, with the last digit being the update of that day, usualy 1 ) | ||
; z: zoom level, supported zoom level from -3 (zoomed out) to 3 (zoomed in), map can zoom to level 5 but this just scales the zoom level 3 images. | ; z: zoom level, supported zoom level from -3 (zoomed out) to 3 (zoomed in), map can zoom to level 5 but this just scales the zoom level 3 images. | ||
Line 115: | Line 288: | ||
# overlayMaps displayed when ready | # overlayMaps displayed when ready | ||
=== Config files === | |||
The file below gives more info about this format, as json does not support comments we added '//' before a line comment. (Note: This is not a valid json file) | The file below gives more info about this format, as json does not support comments we added '//' before a line comment. (Note: This is not a valid json file) | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
Line 241: | Line 415: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Map Overlay (icons, markers, shapes) ==== | |||
Example of overlayMaps.dataSource file: | Example of overlayMaps.dataSource file: | ||
'MainMapIconLoc.json' | 'MainMapIconLoc.json' | ||
Line 273: | Line 448: | ||
"type": "Feature", | "type": "Feature", | ||
"properties": { // This point uses an image from the wiki as its icon | "properties": { // This point uses an image from the wiki as its icon | ||
"iconWikiLink": " | "iconWikiLink": "Egg.png", // Link to image, not this value is case sensitive | ||
"iconSize": [15,20], // The size of the icon on the map [width,height], if image is a different size is will be scaled | "iconSize": [15,20], // The size of the icon on the map [width,height], if image is a different size is will be scaled | ||
// if both (iconWikiLink and iconSize) properties are not given it will fall back to a grey marker | // if both (iconWikiLink and iconSize) properties are not given it will fall back to a grey marker | ||
Line 320: | Line 495: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== The future == | |||
There are many features we still have in mind and/or are working on. Here you find a short list of some of them and there status. | |||
Questions about these features can always be asked in the Discord channel. | |||
{| class="wikitable" | |||
|- | |||
! Project !! Description !! Status !! Who to ask | |||
|- | |||
| Path finding | |||
|| How to get from point A to point be as fast as possible? Navigation with teleports, items, [[sailing]] ;) or just running.<br> Tailored to the transportations you have unlocked. | |||
|| Working prototype, need more data | |||
|| [[User:Cook_Me_Plox]] | |||
|- | |||
| Search | |||
|| Type in a location and find it on the map. | |||
|| Concept worked out, inactive | |||
|| / | |||
|- | |||
| Maps for RS3 | |||
|| Maps for RS3 | |||
|| Active | |||
|| [[User:Cook_Me_Plox]] | |||
|- | |||
| Labels | |||
|| Labels for various locations on the map. Like cities and towns. | |||
|| Inactive, but work is partly done | |||
|| [[User:Ralpha]] | |||
|- | |||
| GeoJSON.io for RS | |||
|| Create maps using a variant of http://geojson.io for RS | |||
|| [https://mejrs.github.io/ Working prototype] | |||
|| [https://runescape.wiki/w/User:Mejrs User:Mejrs] | |||
|- | |||
| ... | |||
|| Have an other idea, let us know! | |||
|| Always open for suggestions | |||
|| | |||
|} |