Code Monkey home page Code Monkey logo

osrs_map_tiles's Introduction

osrs_map_tiles

The OSRS map split into tiles for use with map viewers.

Generating tiles

  1. Install docker: https://docs.docker.com/get-docker/
  2. Update your docker settings to set the maximum memory to 8GB
  3. You may also need to turn on osxfs(Legacy) in Docker > Settings > General
  4. Open powershell in windows, or the terminal in other OS'
  5. From the root directory of this repo run

Windows

$Env:DOCKER_BUILDKIT=0
docker build ./tile_generator -t "map-tile-generator"
docker run -it -v "${pwd}:/repo" map-tile-generator

Mac / Unix

export DOCKER_BUILDKIT=0
docker build ./tile_generator -t "map-tile-generator"
docker run -it -v $(pwd):/repo map-tile-generator

osrs_map_tiles's People

Contributors

adamk33n3r avatar bonfire avatar explv avatar lostvirt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

osrs_map_tiles's Issues

tile_generator.py encounters IndexError on docker run

Following instructions on https://github.com/Explv/osrs_map_tiles, I ran docker build, which appeared to build correctly. I then pasted the docker run command and encountered the following error:

...\CrackTheClue3\osrs_map_tiles-master> docker run -it -v "${pwd}:/repo" map-tile-generator
2022-10-01 00:00:52 INFO Downloading cache & XTEAs
2022-10-01 00:00:56 INFO Cache version: https://archive.openrs2.org/caches/runescape/1117
2022-10-01 00:00:56 INFO Cache upload date: 2022-09-28 10:45:04
2022-10-01 00:00:56 INFO Cache build: ['208']
2022-10-01 00:01:18 INFO Building map base images
Traceback (most recent call last):
  File "./src/tile_generator.py", line 458, in <module>
    main()
  File "./src/tile_generator.py", line 67, in main
    build_full_map_images(cache_dir, xtea_file)
  File "./src/tile_generator.py", line 196, in build_full_map_images
    jar_file = glob.glob("target/*jar-with-dependencies.jar")[0]
IndexError: list index out of range
ERROR conda.cli.main_run:execute(41): `conda run python ./src/tile_generator.py` failed. (See above for error)

Tile Generator - Pyvips Error: Unable To Call Crop (Bad Extract Area)

Receiving the following error after running the latest docker image:

~ > docker run -it -v "${pwd}:/repo" map-tile-generator
2023-07-27 14:57:15 INFO Downloading cache & XTEAs
2023-07-27 14:57:19 INFO Cache version: https://archive.openrs2.org/caches/runescape/1447
2023-07-27 14:57:19 INFO Cache upload date: 2023-07-26 10:15:06
2023-07-27 14:57:19 INFO Cache build: ['215']
Cache directory already exists, skipping download
2023-07-27 14:57:19 INFO Building map base images
[main] INFO net.runelite.cache.util.XteaKeyManager - Loaded 1720 keys
[main] INFO net.runelite.cache.MapImageDumper - Map image dimensions: 13056px x 45568px, 4px per map square (1702 MB). Max memory: 8192mb
[main] INFO net.runelite.cache.MapImageDumper - Wrote image /repo/output/generated_images/img-0.png
[main] INFO net.runelite.cache.MapImageDumper - Map image dimensions: 13056px x 45568px, 4px per map square (1702 MB). Max memory: 8192mb
[main] INFO net.runelite.cache.MapImageDumper - Wrote image /repo/output/generated_images/img-1.png
[main] INFO net.runelite.cache.MapImageDumper - Map image dimensions: 13056px x 45568px, 4px per map square (1702 MB). Max memory: 8192mb
[main] INFO net.runelite.cache.MapImageDumper - Wrote image /repo/output/generated_images/img-2.png
[main] INFO net.runelite.cache.MapImageDumper - Map image dimensions: 13056px x 45568px, 4px per map square (1702 MB). Max memory: 8192mb
[main] INFO net.runelite.cache.MapImageDumper - Wrote image /repo/output/generated_images/img-3.png
2023-07-27 15:02:11 INFO Generating tiles
2023-07-27 15:02:11 INFO [Plane: 0]: Generating plane 0
2023-07-27 15:02:11 INFO [Plane: 0]: Loading images into memory
2023-07-27 15:02:11 INFO [Plane: 0]: Calculating changed tiles
Traceback (most recent call last):
  File "./src/tile_generator.py", line 458, in <module>
    main()
  File "./src/tile_generator.py", line 71, in main
    generate_tiles_for_plane(plane)
  File "./src/tile_generator.py", line 232, in generate_tiles_for_plane
    changed_tiles = get_changed_tiles(old_image, new_image, starting_zoom)
  File "./src/tile_generator.py", line 266, in get_changed_tiles
    old_image_tile = old_image.crop(tile_x, tile_y, TILE_SIZE_PX, TILE_SIZE_PX)
  File "/usr/local/bin/miniconda3/envs/vips/lib/python3.7/site-packages/pyvips/vimage.py", line 919, in call_function
    return pyvips.Operation.call(name, self, *args, **kwargs)
  File "/usr/local/bin/miniconda3/envs/vips/lib/python3.7/site-packages/pyvips/voperation.py", line 282, in call
    raise Error('unable to call {0}'.format(operation_name))
pyvips.error.Error: unable to call crop
  extract_area: bad extract area

ERROR conda.cli.main_run:execute(47): `conda run python ./src/tile_generator.py` failed. (See above for error)

Some users suggested that we try performing a .rotate() prior to the crop, but this did not yield any successful results in my testing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.