Creating Levels

Creating a level for Hallways is simple. A level is just a collection of files hosted on the internet, tied together by a central manifest.

Manifest

Here is an example manifest:

{
    "_version": "coco",
    "model": "model.glb",
    "collider": "collision.glb",
    "material": {
        "MyMaterial": {
            "frames": ["texture1.png", "texture2.png"],
            "animation_speed": 1.0,
            "color": [255, 255, 255, 255],
            "texture_addressing": "Linear"
        }
    },
    "portal": {
        "portal_a": {
            "collider": "portal_a.glb",
            "target": { "href": "other_level.json", "name": "portal_b" }
        }
    }
}

Manifest Fields

FieldStatusUse
_versionrequiredManifest version. Must be "coco".
modelrequiredLevel render model (.glb).
collideroptionalSeparate collision model (.glb). If omitted, model is used for collision.
spawnoptionalPlayer spawn position [x, y, z]. Defaults to origin.
trackoptionalBackground music file. Must be an Ogg container with Vorbis audio.
materialrequiredMaterial map keyed by glTF material name.
portalrequiredPortal map. May be empty, but cannot contain more than 4 entries.
portal.<name>.colliderrequiredPortal collider (.glb).
portal.<name>.targetoptionalDestination object with href and name.

Materials

Each material entry is keyed by a glTF material name from the level model. Every material referenced by the model should have a matching entry.

{
    "frames": ["frame1.png", "frame2.png"],
    "animation_speed": 1.0,
    "color": [255, 255, 255, 255],
    "texture_addressing": "Linear"
}

Texture Limits

Texture dimensions must match one of these sizes. The max column is the maximum number of textures at that size per level.

SizeMax
2048x20481
1024x10244
512x5128
256x25632
128x12864
64x64256

Portals

Tips