Why media repositories
?
While sauerbraten was packaged as game, new content was provided with new releases only. Inexor will change this. New content will be available faster.
A media repository contains maps, textures, sounds and so on (media items
). Inexor can handle multiple repositories at the same time. The repositories can be local or remote and will be cached locally. Every user can provide their repositories publicly. The Inexor Team will provide a media-essential
repository with entirely free content itself.
The basics:
Every media repository has a name, a description and an URL where it is located. There are multiple types of media repositories:
- Local filesystem
- Git repository
- (future) Database
Inexor automatically scans the file system for media repositories in the usual locations depending on the operating system. For example Ubuntu Linux Inexor scans in these directories:
- /home/noob/.local/share/inexor/media
- /usr/share/ubuntu/inexor/media
- /usr/share/gnome/inexor/media
- /usr/local/share/inexor/media
- /usr/share/inexor/media
- /var/lib/snapd/desktop/inexor/media
Either a TOML or a JSON file:
{ "name": "media-essential", "title": "Essential media for Inexor", "description": "This repository contains the essential media files. It is intended as the essential package, featuring up our main dependencies plus a few maps in ~300MB. Anything else can get delivered via custom packages ingame.", "url": "https://github.com/inexorgame/media-essential.git" }
The name of the media repository (here: media-essential
) is important and defines the name of the repository in the file system.
Each media repository
contains media items
. The file system structure is clearly defined to enable automatic indexation.
/{repository_name}/{media_type}/{author_name/author_group_name}/{media_name}/v{version}/
For example the filesystem path to a texture named golden_floor from noob in the repository noob is located here:
/media-essential/texture/noob/golden_floor/v1/
The folder contains the actual texture files and a configuration file:
ls /media-essential/texture/noob/golden_floor/v1/ diffuse.jpg depth.jpg normal.jpg config.toml (or config.json)
The path also contains the version number. This way a media repository can contain multiple versions of a media item at the same time. For example the map dust6 depends on version 2 of texture golden_floor whereas map cartel depends on version 8 of the same texture.
A media item
is one these media types
:
Media Type | Description | Base folder in media repositories | Base node in the Inexor Tree |
---|---|---|---|
brush | Editing brushes | /media/{repositoryName}/brush | /media/brushes |
map | Maps | /media/{repositoryName}/map | /media/maps |
model | 3D models | /media/{repositoryName}/model | /media/models |
music | Songs | /media/{repositoryName}/music | /media/music |
particle | Particle textures | /media/{repositoryName}/particle | /media/particles |
skybox | Sky boxes | /media/{repositoryName}/skybox | /media/skyboxes |
sound | Sound effects | /media/{repositoryName}/sound | /media/sounds |
texture | Textures on cube faces | /media/{repositoryName}/texture | /media/textures |
TODO: Use a current example and use TOML
Either a TOML or a JSON file specifies the meta information of a media item
.
{ "name": "dust6", "description": "Map A", "license": "CC-BY-4.0", "authors": [ { "name": "noob", "email": "[email protected]" } ], "dependencies": { "textures": [ { "repository": "https://github.com/inexorgame/media-essential.git", "name": "golden_floor", "media_type": "texture", "version": 1 } ] } }
The dependencies contains the repository where to get the media item and the name and version of the media item. These informations are enough to resolve a media item.
(future) If a media repository is missing, Inexor suggest the user to add the media repository. Meanwhile the media-essential
repository is cloned automatically when you start Inexor Flex
for the first time.
The file names are defined (automatic indexation):
Filename | Extensions | Optional | Description | Filesystem path | Tree node path |
---|---|---|---|---|---|
config | .toml/.json | No | The configuration file for the texture | /media/{repositoryName}/texture/{author}/{mediaName}/v{version}/config.toml | /media/textures/{author}/{mediaName}/v{version}/config |
readme | .txt/.md | No | Textual description of the media. | /media/{repositoryName}/texture/{author}/{mediaName}/v{version}/readme.txt | /media/textures/{author}/{mediaName}/v{version}/readme |
diffuse | .png/.jpg | No | The diffuse texture. This is the only necessary texture file | /media/{repositoryName}/texture/{author}/{mediaName}/v{version}/diffuse.png | /media/textures/{author}/{mediaName}/v{version}/diffuse |
secondary | .png/.jpg | Yes | The secondary texture | /media/{repositoryName}/texture/{author}/{mediaName}/v{version}/secondary.png | /media/textures/{author}/{mediaName}/v{version}/secondary |
normal | .png/.jpg | Yes | The normals | /media/{repositoryName}/texture/{author}/{mediaName}/v{version}/normal.png | /media/textures/{author}/{mediaName}/v{version}/normal |
specularity | .png/.jpg | Yes | The specularity texture | /media/{repositoryName}/texture/{author}/{mediaName}/v{version}/specularity.png | /media/textures/{author}/{mediaName}/v{version}/specularity |
depth | .png/.jpg | Yes | The depth / height map. | /media/{repositoryName}/texture/{author}/{mediaName}/v{version}/depth.png | /media/textures/{author}/{mediaName}/v{version}/depth |
The file names are defined (automatic indexation):
Filename | Extensions | Optional | Description | Filesystem path | Tree node path |
---|---|---|---|---|---|
config | .toml/.json | No | The configuration file for the map | /media/{repositoryName}/map/{author}/{mediaName}/v{version}/config.toml | /media/map/{author}/{mediaName}/v{version}/config |
readme | .txt/.md | No | Textual description of the media. | /media/{repositoryName}/map/{author}/{mediaName}/v{version}/readme.txt | /media/map/{author}/{mediaName}/v{version}/readme |
octree | .ogz | No | The map geometry (octree). | /media/{repositoryName}/map/{author}/{mediaName}/v{version}/octree.ogz | /media/map/{author}/{mediaName}/v{version}/octree |
waypoints | .wpt | Yes | The waypoints for bots. | /media/{repositoryName}/map/{author}/{mediaName}/v{version}/waypoints.wpt | /media/map/{author}/{mediaName}/v{version}/waypoints |
screenshot/{number} | .png/.jpg | Yes | Screenshot | /media/{repositoryName}/map/{author}/{mediaName}/v{version}/screenshot/1.png | /media/map/{author}/{mediaName}/v{version}/screenshots/1 |