notchris / noteditor

A simple multi-platform 3D editor built with threejs / webgl.
https://notchris.net/noteditor
11 stars 1 forks source link

MAP FORMAT #2

Open circuitbone opened 4 years ago

circuitbone commented 4 years ago

The structure of all maps and the inherited data with each map.

Template Starter Map

Minimum Map Requirements

Standard Assets with every course

Theme

File Folder Structure

notchris commented 4 years ago

Map Structure (JSON) - Current

{
    "id": "",
    "title": "Untitled Map",
    "spawn": "0 0 0",
    "size": 100,
    "world": {
        "sky": {
            "color": "#FFFFFF",
            "scatter": "#FFFFFF",
            "sun": "#FFFFFF"
        },
        "lights": {
            "ambient": {
                "color": "#FFFFFF",
                "intensity": 1.0
            },
            "directional": {
                "color": "#FFFFFF",
                "intensity": 1.0
            }
        },
        "physics": {
            "gravity": -0.9
        }
    },
    "objects": [{
        "id": "",
        "label": "cube",
        "active": false,
        "category": "block",
        "type": "cube",
        "position": "1 1 1",
        "rotation": "0 0 0",
        "color": "#EEEEEE",
        "texture": "",
        "physics": {}
    },{
        "id": "",
        "label": "point",
        "active": false,
        "category": "entity",
        "type": "point",
        "position": "1 1 1",
        "rotation": "0 0 0"
    },{
        "id": "",
        "label": "modelName",
        "active": false,
        "category": "model",
        "type": "modelName",
        "position": "1 1 1",
        "rotation": "0 0 0",
        "material": "materialName"
    }]
}
notchris commented 4 years ago

@circuitbone I have the ability to enable automatic updates when the application starts. We can supply models from the server so the players have them locally. For playing maps made by other players, we will need to figure out how much customization they are allowed including adding custom models etc. In any case, the models are loaded via datauri and sent as json to the editor / game state...so it’s probably good that most of these models are small in filesize anyway.

circuitbone commented 4 years ago

Think of customer contribution assets down the track, moderation problem and validation is labour intensive for now.

circuitbone commented 4 years ago
circuitbone commented 4 years ago

My goto JSON editor

https://jsoneditoronline.org/

circuitbone commented 4 years ago

Map parameter ideas

carefish commented 4 years ago

Suggestion for map format: Use TMX format, to make it interchangable with other engines and frameworks. As well at mini-golf itself, ofcourse ;)