Skip to content

utils/games: scaffold native tooling for Aseprite, Godot/Redot, Unity, Unreal - #1

Open
PhaedrusFlow wants to merge 2 commits into
mainfrom
games-native-tooling-scaffold
Open

utils/games: scaffold native tooling for Aseprite, Godot/Redot, Unity, Unreal#1
PhaedrusFlow wants to merge 2 commits into
mainfrom
games-native-tooling-scaffold

Conversation

@PhaedrusFlow

Copy link
Copy Markdown
Member

Summary

Adds lua/utils/games/ -- native, plugin-free tooling for Aseprite, Godot, Redot, Unity, and Unreal, matching the shape of utils/dev/android and utils/dev/sf (each engine exposes config/util/actions/commands with a show_menu() and run_action_by_id(id), driven straight through the engine's own CLI via vim.system/vim.fn.jobstart).

Layout

  • shared/util.lua, shared/output.lua, shared/ui.lua -- executable/root discovery, a per-engine build/output window + progress spinner factory, and a grouped vim.ui.select menu
  • shared/godot_engine.lua -- one native-tooling factory reused by both godot/ and redot/, since Redot is a Godot 4-compatible fork (same project.godot/.tscn/.gd files); each still gets isolated cache/output state and its own keymap group
  • aseprite/ -- editor launch, batch export (sprite sheet + JSON, PNG sequence, GIF), headless Lua script runs via -b/--script
  • unity/ -- resolves the Hub-installed Editor version from ProjectSettings/ProjectVersion.txt, batchmode build via -executeMethod, run tests, reimport assets, open Editor.log
  • unreal/ -- UnrealBuildTool build, GenerateProjectFiles, RunUAT BuildCookRun packaging; reuses the same NVIM_UNREAL_ENGINE_ROOT/UNREAL_ENGINE_ROOT/UE_ENGINE_ROOT/UE_ROOT env vars as the existing lua/dap/unreal.lua, so it doesn't duplicate the native lldb-dap/GDB DAP debug-adapter wiring already there
  • init.lua -- wires every engine's setup() plus a combined :Games menu across all five
  • Wires M.games into utils/init.lua next to the other safe_required subsystems

Keymaps

All under the previously-free <leader>g ("games") group:

Prefix Engine
<leader>ga* Aseprite
<leader>gg* Godot
<leader>gr* Redot
<leader>gu* Unity
<leader>ge* Unreal

Commands

:Aseprite / :Godot / :Redot / :Unity / :Unreal open each engine's menu; :<Engine>Action <id> runs by id with tab-completion; :<Engine><PascalId> per action; :Games opens a combined picker.

Notes

  • This is a scaffold: binary/root discovery and the core action set are real and functional, but see the TODO list in lua/utils/games/README.md for open extension points (multi-target Unity builds, Unreal cook-only/plugin packaging, Godot/Redot DAP wiring, etc.).
  • Every new file is Apache-2.0 licensed to match the rest of the tree, and every .lua file was checked for syntax validity (via LuaJIT/lupa) before opening this PR.
  • No existing files were changed other than the two-line safe_require('utils.games') + setup() hookup in lua/utils/init.lua.

…, Unreal

Adds lua/utils/games/ following the same shape as utils/dev/android and
utils/dev/sf: each engine module exposes config/util/actions/commands
with a show_menu()/run_action_by_id(id), driven directly through its
own CLI via vim.system/jobstart -- no third-party plugin dependency.

- shared/: executable+root discovery, a per-engine build/output window
  + progress spinner factory, and a grouped vim.ui.select menu
- shared/godot_engine.lua: one native-tooling factory reused by both
  godot/ and redot/, since Redot is a Godot 4-compatible fork
- aseprite/: editor launch, batch export (sprite sheet/PNG seq/GIF),
  headless Lua script runs via -b/--script
- unity/: Hub-editor-version resolution from ProjectVersion.txt,
  batchmode build/-executeMethod, run tests, reimport, Editor.log
- unreal/: UnrealBuildTool build, GenerateProjectFiles, RunUAT
  BuildCookRun packaging -- reuses the same engine-root env vars as
  the existing lua/dap/unreal.lua so it never duplicates the debug
  adapter wiring
- init.lua: wires every engine's setup() plus a combined :Games menu
- wires M.games into utils/init.lua next to the other subsystems

Keymaps live under the previously-unused <leader>g group:
  <leader>ga* Aseprite, <leader>gg* Godot, <leader>gr* Redot,
  <leader>gu* Unity, <leader>ge* Unreal.

See lua/utils/games/README.md for full layout, env-var overrides,
and the extension-point TODO list.
…orkers primer

- Aseprite: palette export/sync, sheet-type export preset.
- Godot/Redot: export dry-run diff, remote-debug launch (honest
  no-general-DAP explanation); wire shared/events.lua's
  GamesTaskCompleted/GamesTaskFailed into export() on_success/on_failure.
- Unity: sequential multi-target build matrix (-buildTarget), Package
  Manager manifest.json/packages-lock.json list + add actions.
- Unreal: cook-only action, Setup.sh + GenerateProjectFiles.sh
  bootstrap for a freshly cloned engine checkout (sequential
  vim.async awaits, generous bounded timeout), editor plugin
  packaging via RunUAT BuildPlugin.
- Shared: health.lua + :GamesDoctor (:checkhealth utils.games),
  probing all five engines concurrently via a new
  shared/async_util.lua (vim.async wrapper with fixed bounds).
- New docs/LUA-FOR-NETWORK-LINUX-FOLKS.md: maps core Lua concepts
  (tables, nil vs false, pcall/assert, coroutines, vim.async,
  closures-as-factories) onto networking/Linux analogies, with
  pointers into this scaffold's real code for every concept.
- README: check off all TODOs, document which Neovim 0.13 features
  are used and why (plus honest call-outs for the ones skipped),
  Tiger Style section, docs link, :GamesDoctor in the commands table.

All 25 files pass a full lupa syntax validation pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant