F18 Interceptor: Building my favorite old Amiga game

Have been working on the new data import for Defender.
Here it is nearly complete.

Data export was possible previously using Custom Properties, but this was kind of annoying and also limited in use. Now there is a command set and I hope to expand to be able to add lua scripts as needed on an object, which will generate a .script file for the game object when exported.

This will make adding properties for scripts from game objects quite easy. Im also adding a feature to the object export that collapses children meshes into one gameobject with mutlitple mesh buffers. This is a good perf optimisation. However it will be per object (parent), so that if you need objects coming across as gameobjects, that is still available by default.

Will update the defender dev blog once this is all complete (prob couple of days).

2 Likes

More fun tonight. While updating the exporter last night (its prob been 4 months since last main update) I noticed that embedded_components has changed as part of the mult-materials (which was prob last year but I didnt notice).

To support some of the builtin material changes on export I needed to update this, which meant updating other things… and well… usual programming dependency chain :slight_smile:
Ive now got essentially a new version of defender. Will update on defender blog and if people need V1 still I will add an option in the panel for it (Ive added versions in the code).

Now I can add in the data changes properly. Hopefully mostly done by tonight. Then start exporting missions again :slight_smile:

Is it just me… or is software development always via the long route.

4 Likes

Jets looking a little more interesting.

5 Likes

Oh more woes. Since Defolds go and mesh structure have changed, I needed to rewrite a tun of Defender, which will essentially make a new version when its finally working (three days and still much breakage).

The other big problem is that some of the gltf and glb exports no longer import into Defold either. Some of the lightmap and such specifically dont work (I think its related to the multi-texturing). This is all obviously slowing things to a halt again. Uggh.

To get around this Im looking at building everything manually in meshbuffers, but this is slow. Will see. Its not overly important for f18, but many of the test sample scenes I previously tested with are all failing which I want to use to get defender back and properly compatible with Defold.

Lots of fun.

Not sure what you are referring to here?

Heres an example of the new embedded_components (I think this is working now :slight_smile: ).

embedded_components {
    id: "Ads_mesh"
    type: "model"
    data: "mesh: \"/demo2/meshes/Ads.gltf\"\n"
    "name: \"{{NAME}}\"\n"
    "materials {\n"
    "    name: \"Ads\"\n"
    "    material: \"/demo2/materials/pbr-simple.material\"\n"
    "textures {\n"
    "    sampler: \"albedoMap\"\n"
    "    texture: \"/demo2/materials/white.png\"\n"
    "}\n"
    "textures {\n"
    "    sampler: \"aoMetallicRoughnessMap\"\n"
    "    texture: \"/demo2/images/AdsAMRtexture.png\"\n"
    "}\n"
    "textures {\n"
    "    sampler: \"emissiveMap\"\n"
    "    texture: \"/demo2/materials/black.png\"\n"
    "}\n"
    "textures {\n"
    "    sampler: \"normalMap\"\n"
    "    texture: \"/demo2/materials/normal.png\"\n"
    "}\n"
    "textures {\n"
    "    sampler: \"reflectionMap\"\n"
    "    texture: \"/demo2/materials/grey.png\"\n"
    "}\n"
    "}\n"

    position {
        x: 0.0
        y: 0.0
        z: 0.0
    }
        rotation {
        x: 0.70710677
        y: 0.0
        z: 0.0
        w: 0.70710677
    }

}

This is what they used to look like (roughly since I dont have the exact file on hand atm):

embedded_components {
    id: "Ads_mesh"
    type: "model"
    data: "mesh: \"/demo2/meshes/Ads.gltf\"\n"
    "name: \"{{NAME}}\"\n"
    "material: \"/demo2/materials/pbr-simple.material\"\n"
    "texture: \"/demo2/materials/white.png\"\n"
    "texture: \"/demo2/images/AdsAMRtexture.png\"\n"
    "texture: \"/demo2/materials/black.png\"\n"
    "texture: \"/demo2/materials/normal.png\"\n"
    "texture: \"/demo2/materials/grey.png\"\n"

    position {
        x: 0.0
        y: 0.0
        z: 0.0
    }
        rotation {
        x: 0.70710677
        y: 0.0
        z: 0.0
        w: 0.70710677
    }

}

While its subtle this change is also elsewhere as well. And when generating was causing various problem, but more importantly I wasnt sure what it was supposed to be :slight_smile:
I ended up making some dummy files and setting them on Defold side to see what they should be.

The import crashes (gltf and glb) are more complex and Im not certain what is really the cause there. I used to import quite large scenes (the blender demo for instance) and now these have multiple exceptions popping up and all sorts. I need to first get defender updated to match the expected formats, and then I can start measuring a bit better.

Side note, and I’ll pop over to the exporter dev blog and note this, the current release will not work well at all for many exports. For more simple single texture exports it will probably be ok. But features like the lightmaps will not work.

Major change in direction. Will update here later. I dont expect future work to be done on this anytime soon now sadly. Sorry for the delays if you were keen on this.

1 Like

Sad news! You’re always doing amazing things that I could only dream of.

I do hope your next endeavour is what you are looking for! And don’t be a stranger :wink:

1 Like