Map Packages: Difference between revisions

From SBWiki
Jump to navigation Jump to search
mNo edit summary
Line 26: Line 26:


== Map Package Storage ==
== Map Package Storage ==
All Map Packages are stored in a single folder in the file system. 'Base Maps' are stored directly in the folder while their delta maps (if any) are stored in the base map's 'deltas' folder. The folder names do not matter, as each Map Package is uniquely identified anyway; however the convention is to use the map's name as the name of its folder (which is also the reason that - at this point - map names can only contain a very limited set of characters).
The folder where map packages are stored can be changed using the Steel Beasts user interface. It is stored in the Windows Registry (which however is an implementation detail and subject to change!)


== Map Package Distribution ==
== Map Package Distribution ==

Revision as of 19:22, 24 July 2019

Overview and Motivation

THIS PAGE IS WORK IN PROGRESS

(you can safely skip this chapter)

Steel Beasts maps are actually made up of a number of components

  • a 'height map', defining the height values certain, regularly-spaced points of the map. Historically (up to version 4.1), these points were spaced about 12 meters apart; points inbetween were linearly interpolated
  • a 'terrain map', defining the 'type' of ground for a given area (about 12 by 12 meters in size), as well as the 'features' of the map (ie the various buildings, fences, trees etc)
  • a 'theme', describing the properties of the ground types defined in the 'terrain map', as well as the 'environment' (woodland/desert/winter/autumn) of the map

Typically (in Pro PE) the 'terrain map' embedded both the 'height map' and the 'theme'; and even so, it was small enough to be embedded into scenario files. Hence, when the desire was to simply play a scenario it was sufficient to be in posession of the scenario file (for example by download it in the Assembly Hall).

All of this changed with Steel Beasts version 4.1, as its introduction of 'high resolution terrain' (with a regular height data spacing of less than a meter) meant that the size of the 'height map' ballooned (easily taking up multiple GB or harddrive space), making it infeasible to embed the terrain directly into the terrain or scenario file. This means that scenario now need to link to their required maps, or they are now called to their 'Map Package'.

Map Packages

A 'Map Package' can be regarded as a container holding all required data (the height map, the terrain map, the theme and (optionally) models and textures) in a single location. Succesfully loading a Map Package means that all its required data is present (the program would otherwise reject the package), and each package can be uniquely identified.

Map Packages utilize a hierarchical approach, where a 'base map' can be extended by (a theoretically unlimited number of) 'delta maps'. The idea is that a 'base map' will hold the (usually large) 'height' data but only basic (or no) 'terrain data' (which is then provided by the 'delta map'). Of course, for a 'delta map' to actually work, its base map must not change after the 'delta' map has been created, which is achieved by enforcing a life cycle to the package creation process. Basically, each Map Package can either be in a 'published' or 'unpublished' state, where the latter is the initial state. A Map Package can only be edited while in the 'unpublished' state, and only once it has been 'published' (by its designer) will the program allow for 'delta' maps to be created. A Map Package may only be used in the mission editor once it is in the 'Published' state.

Conversion

Of course there are ways to migrate existing Steel Beasts maps into the new format. There are a number of possible use cases:

  • conversion of a height map into a new Map Package
  • conversion of a terrain map (including its height map) into a new Map Package
  • extraction of an embedded terrain map from a scenario file into a new Map Package

Map Package Storage

All Map Packages are stored in a single folder in the file system. 'Base Maps' are stored directly in the folder while their delta maps (if any) are stored in the base map's 'deltas' folder. The folder names do not matter, as each Map Package is uniquely identified anyway; however the convention is to use the map's name as the name of its folder (which is also the reason that - at this point - map names can only contain a very limited set of characters).

The folder where map packages are stored can be changed using the Steel Beasts user interface. It is stored in the Windows Registry (which however is an implementation detail and subject to change!)

Map Package Distribution