Skip to content

Publish a slim plugin-feed.json with precomputed engine fit and credit lines #277

Closed

Description

@TMHSDigital

Summary

Have the build publish a slim, versioned feed made for editor plugins, so the Godot plugin (and later Unity/Unreal ones) doesn't download the 496 KB data.json or re-implement site logic in GDScript.

Where

  • site/build.mjs (writes data.json; add the new file next to it)
  • site/lib/search.mjs (worksInEngine, engineRank, nativeEngines): the engine-fit logic to precompute
  • site/public/owes.js (creditsFile, owes): the credit wording to precompute
  • docs/data.md: document the new file

Details

data.json carries site-only fields (thumbs, licenseRank, search text, guides, stacks). Two things a plugin needs are computed in JavaScript today and would have to be ported:

A slim mapping of the core fields is about 117 KB before gzip.

Suggested fix

Write site/dist/plugin-feed.json:

{ "format": 1, "version": "vYYYY.MM.DD", "siteUrl": "...",
  "entries": [ { "id", "name", "url", "page", "category", "license", "license_spdx",
    "licenseFamily", "commercial", "attribution_required", "formats", "tags", "status",
    "verified", "summary", "works_in": ["godot","unity","unreal"], "made_for": ["godot"],
    "credit_line": "..." } ] }
  • works_in and made_for come from worksInEngine and engineRank. credit_line uses the same wording the site's CREDITS export writes.
  • format is an integer that only goes up on a breaking change. Adding fields is not a breaking change.
  • Add a JSON Schema for it and check it in the build, as data.schema.json is checked today.
  • List only active and needs-review entries, as the site does.

Acceptance criteria

  • npm run build writes plugin-feed.json and checks it against its schema
  • A test in site/lib/lib.test.mjs covers works_in for a Godot addon, an Unreal-locked entry and an engine-agnostic pack, plus credit_line with and without attribution_string
  • Size stays under 150 KB uncompressed. The build warns if it grows past that.
  • docs/data.md lists the file and states the format policy

Getting started

  • Run npm run build, then look at site/dist/data.json
  • Tests: npm test; everything: npm run check

Part of #116. Effort: M. audit-key: enhancement|site/build.mjs|plugin-feed

Activity

  1. added
    help wanted
    priority: medium
    feature
    godot-plugin
    on Nov 10, 2026
  2. TMHSDigital commented on Nov 10, 2026

    @TMHSDigital
    OwnerAuthor

    Done in ce04c68 and live at https://tmhsdigital.github.io/Free-Game-Dev-Assets/plugin-feed.json: 419 entries, format 1. It is served gzipped with an ETag, so #279 can send conditional requests.

    What shipped:

    • The feed: site/lib/plugin-feed.mjs builds plugin-feed.json. works_in and made_for come from the site's own worksInEngine and engineRank. On today's data, 398 entries work in Godot and 33 are made for it.
    • Credit lines: credit_line is the recorded attribution_string, or null. I changed this from the plan here: the site's CREDITS export doesn't invent a credit line either; it prints "no canned credit line; see the entry". The feed also carries attribution_required and attributionClass, so the plugin can group credits exactly as owes.mjs does. Those groups overlap, so I didn't collapse them into one derived field.
    • Optional fields are always present, as null when unset.
    • Schema: site/plugin-feed.schema.json, checked at build time; the entry schema rejects unknown keys. It is published next to the feed and attached to monthly releases, so a plugin can pin a version.
    • Size: the plan said under 150 KB raw. It is about 300 KB raw, mostly summaries the details panel needs, but 64 KB gzipped, which is what a plugin actually downloads. So the build warns above 100 KB gzipped instead.
    • Tests: 13 new assertions in site/lib/lib.test.mjs, covering a Godot addon, an Unreal-locked entry, an engine-agnostic pack, credit lines with and without attribution_string, deprecated entries left out, and a schema check that rejects unknown keys.
    • Docs: a new "Plugin feed" section in docs/data.md.

    Verified with npm run check (all passing) and a fetch of the deployed feed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featuregodot-pluginhelp wantedpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions