Skip to content
MadrasMCPublic

About

High Performance Vintage Story Map Renderer ⚡️

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

395 Commits

Folders and files

Repository files navigation

STORYMAP, or, A TRUE AND EXACT DESCRIPTION of the Worlds of Vintage Story, Wherein their Seas, Lakes, Hills & Coasts are faithfully set down from the Records themselves; Together with a Grid of Coordinates and divers Scales for the Reader's Ease. Wrought with great Speed upon every Core. MMXXVI

Storymap's viewer showing a Vintage Story world as a sepia relief map: lakes inked in blue-grey, hills shaded, a coordinate grid labelled in the margins and a title cartouche in the corner

🗺️ Storymap: High Performance Vintage Story Map Renderer ⚡️

  • Fast. Close to 100,000 chunks a second, using every core.
  • Made to explore. Pan and zoom in your browser, from one page that opens straight from the folder: no server, nothing to install.
  • Drawn like a printed map. Sepia relief with hill shading, inked coastlines, a grid in the game's own coordinates and a title cartouche.
  • Gentle with your saves. Storymap opens them read-only and never writes next to them.

Getting started

  1. Install Zig 0.17.0.

  2. Build Storymap:

    git clone https://github.com/MadrasMC/storymap
    cd storymap
    zig build -Doptimize=ReleaseFast
  3. Render a save:

    zig-out/bin/storymap path/to/save.vcdbs out

    Saves are in the game's data folder, under Saves/ (%APPDATA%\VintagestoryData\Saves on Windows).

  4. Open out/index.html in your browser.

Add --theme plain for a simpler page, with the map drawn as the game draws its own, or make your own.

Tested with saves from Vintage Story 1.19 and 1.22.7.

Documentation

  • Usage: the command line: views, appearance, tile formats and drawing only part of a world.
  • Save format: the .vcdbs format as far as Storymap has worked it out, from the SQLite schema to block palettes and block entities. Every claim is marked with its source: verified against a real save, read in the game's open-source code, from the wiki, or unverified.
  • Rendering: how the map is drawn, how it's split into tiles for the viewer, and where the time goes.
  • Blocks: how a block is read from the game's assets and drawn: its codes, its colours, its textures and tint, its cube faces and shapes, and the prepared blocks file a render reads.
  • Prepared blocks file: the .storyblk format that holds a game's blocks and their sprites.
  • Themes: choosing the page drawn around the map, or writing your own.
  • What's next: block colours, an isometric render and more.

Performance

A render of a 1.22.7 world (29,192 chunks, 2.79 km² drawn as 34 tiles in 5 levels) by Storymap 0.3.3, ReleaseFast on a 4-core, 8-thread machine, the median of 7 runs:

Stage Time
Opening the save 0.009 s
Drawing every tile: reading the surface, shading, building the zoomed-out levels, encoding the PNGs and writing them 0.21 s
End to end 0.24 s (11.7 km²/s, 122,500 chunks/s)

Each version's numbers are in docs/performance.md.

Storymap reads only the chunks that hold the surface: 6,618 of this world's 29,192.

Every render prints how long it took. To measure your own save, the median of several renders of each version:

zig run scripts/benchmark.zig -- path/to/save.vcdbs --current

docs/performance.md has its options, such as --isometric. A render's --json prints its times and counts as one line, for scripts, and --no-write draws and encodes every tile without writing anything.

More numbers and what they mean: docs/rendering.md.

License

MIT, see LICENSE.

About

High Performance Vintage Story Map Renderer ⚡️

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages