Agent skill

Glue Embedded Game Preview

by vchelaru in vchelaru/FlatRedBall

How the Game tab's live preview embeds and resizes the real running game window, and its zoom/resolution status bar.

MITAuto-check passedGame Development

Install Glue Embedded Game Preview

skills CLI
$ npx skills add vchelaru/FlatRedBall --skill glue-embedded-game-preview -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vchelaru/FlatRedBall glue-embedded-game-preview --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vchelaru/FlatRedBall.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/glue-embedded-game-preview .claude/skills/glue-embedded-game-preview && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
glue-embedded-game-preview
GitHub stars
578
Token cost
~2.2k tokens
SKILL.md length
987 words
Files
1
Skills in repo
32
Repo updated
First seen
Licence
MIT

At a glance

How the Game tab's live preview embeds and resizes the real running game window, and its zoom/resolution status bar.

  • Game Development work in your project
  • SKILL.md covers Resize flow, Landmine — "connected" does…, Zoom / resolution status bar and Landmine —…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Glue Embedded Game Preview is an agent skill from vchelaru/FlatRedBall. How the Game tab's live preview embeds and resizes the real running game window, and its zoom/resolution status bar. Triggers: GameHostView, WinformsHost, RunnerMoveWindow, BottomStatusBar, ZoomControl, CurrentDisplayInfoDto, SetParent game window.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development. The repository describes itself as: Cross-platform 2D game engine focused on ultimate productivity built in .NET. The licence is MIT.

When your agent uses it

  • Game Development work in your project

Example prompts

  • “/glue-embedded-game-preview”

What it can do on your machine

Read from SKILL.md and the folder at commit fa654ab. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Glue Embedded Game Preview loads about 2.2k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 987 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vchelaru/FlatRedBall at commit fa654ab, republished under its MIT licence (© vchelaru). 987 words, ~2,196 tokens.

Download SKILL.mdSave it as .claude/skills/glue-embedded-game-preview/SKILL.md (or your agent's skills folder).
name
glue-embedded-game-preview
description
How the Game tab's live preview embeds and resizes the real running game window, and its zoom/resolution status bar. Triggers: GameHostView, WinformsHost, Runner_MoveWindow, BottomStatusBar, ZoomControl, CurrentDisplayInfoDto, SetParent game window.
version
1.0.0

Glue Embedded Game Preview

The "Game" tab does not render the game into a WPF surface. Glue launches the game as a real, separate process and reparents its native window (SetParent, GameHostView.xaml.cs::EmbedHwnd) into a WinForms Panel hosted by a WindowsFormsHost (GameHostView.xaml → WinformsHost).

Resize flow

WinformsHost_SizeChanged/MainGrid_SizeChanged → SetGameToEmbeddedGameWindow sends a Runner_MoveWindow command — not over the DTO socket, but as a raw _eventCaller/ReactToPluginEvent string handled by CompilerPlugin.HandleEvent (case "Runner_MoveWindow"), which calls Runner.MoveWindow → the real Win32 MoveWindow API directly on gameHandle. Every resize is the real game process's actual OS window changing size/position for real, in-process — there's no visual scaling on Glue's side, and whatever the game's own AspectRatioBehavior/ResizeBehavior (see below) does with that size happens the same as it would for an end user.

WinformsHost and its underlying WinForms Panel (winformsPanel, GameHostView constructor) always stay full-size, filling MainGrid (Stretch, no explicit size/alignment) — even in fixed-size preview mode. Letterboxing is achieved by moving/sizing only the real embedded game window (via Runner_MoveWindow's X/Y/Width/Height) smaller than winformsPanel, whose own dark BackColor (FromArgb(30,30,30), set in the GameHostView constructor) shows through the margins as letterbox bars.

Landmine — do not center by resizing/repositioning WinformsHost/winformsPanel (the ANCESTOR) instead of the game window itself. An earlier version of fixed-size preview did exactly that (WinformsHost.HorizontalAlignment/VerticalAlignment = Center + explicit Width/Height, always passing X=0,Y=0 to Runner_MoveWindow). It looked correct visually but broke rectangle-select and zoom-around-cursor by exactly the centering offset: gameHandle's position relative to its own immediate parent (winformsPanel) never changed, so it never received a native move notification — only its ancestor moved. MonoGame/SDL's cached window position (used to translate the cursor's absolute screen position into client-relative mouse coordinates) went stale by that offset. The fix was to always keep winformsPanel full-size/unmoved and instead pass the letterbox offset as Runner_MoveWindow's X/Y — since that's a real position change to gameHandle relative to its own immediate parent, it generates the native move notification MonoGame/SDL needs.

Landmine — "connected" does not mean the game can handle a DTO yet

Runner_GameStarted fires as soon as the game process has a MainWindowHandle (Runner.cs), which is earlier than the game being able to act on anything. In generated Game1.Initialize, GameConnectionManager is constructed (and connects) several statements before GlueControlManager, with CameraSetup.SetupCamera between them. In that window the socket is live but GlueControlManager.Self is null, so nothing can dispatch an incoming DTO. Anything sent on game startup therefore needs a retry budget that outlasts graphics-device setup, not just the connection (BorderlessRetryPolicy). Waiting on GameCommunication_Connected does not close this — connected is precisely the state where it fails.

Retry on Succeeded, never on the reply's content. The game answers that window with GameConnectionManager.NotReadyPayload and Glue turns it into an unsuccessful GeneralResponse, so Succeeded is the readiness signal. Most HandleDto overloads return void — SetBorderlessDto included — and a healthy game answers those with an empty payload, so a "did it send anything back?" check never becomes true no matter how long the budget is.

Zoom / resolution status bar

BottomStatusBar.xaml (ZoomControl + resolution TextBlock) is fed by CurrentDisplayInfoDto, pushed from GlueControl.Editing.CameraLogic (Embedded/Editing/CameraLogic.cs, game process only — PushZoomLevelToEditor) and applied on the Glue side in CommandReceiving/CommandReceiver.cs::HandleDto(CurrentDisplayInfoDto), which writes CompilerViewModel.CurrentZoomLevelDisplay/ResolutionDisplayText. Zoom itself (ChangeZoomDto, +/-) is a separate concept from window size — it scales Camera.Main.OrthogonalHeight inside the game and is independent of what size the embedded OS window actually is. None of this zoom state is persisted to the project file; it resets every Glue launch.

Landmine — GameCommunicationPlugin.csproj has no implicit globbing

<EnableDefaultCompileItems>false</EnableDefaultCompileItems> means a new .cs file under this project (e.g. adding a class next to GameHostView.xaml.cs) silently compiles into nothing until it's added to the <Compile Include="GlueControl\Views\... <ItemGroup> by hand - no error, the type just doesn't exist for anything that references the assembly (CS0103 in a consumer, not in this project).

Show full SKILL.md (379 more words)Show less

Project's target resolution vs. live preview size

The project's configured target resolution/aspect ratio lives in DisplaySettingsViewModel/GlueCommon/SaveClasses/DisplaySettings.cs (Glue/Plugins/EmbeddedPlugins/CameraPlugin/) — edited via the Camera Settings panel (CameraSettingsControl.xaml) — and normally only takes effect through codegen (CameraSetupCodeGenerator.cs) for what a built game does at startup/on resize. By default the live preview's WinformsHost panel ignores it and always stretches to fill the tab.

The "fixed-size preview" toggle (BottomStatusBar's aspect-ratio icon, CompilerViewModel.IsFixedSizePreview, issue #2035) is the one exception: when on, GameHostView.SetGameToEmbeddedGameWindow sizes/centers the real embedded game window (not WinformsHost — see the resize-flow landmine above) to DisplaySettings.ResolutionWidth/Height scaled to fit the panel (FixedSizePreviewCalculator, unit-tested). Landmine: "100%" there is not the raw resolution — it's ResolutionWidth/Height * DisplaySettings.Scale / 100 (FixedSizePreviewCalculator.GetEffectiveTargetResolution), since Scale (Camera Settings' desktop scale, e.g. 400%) is how a real launched window is already upscaled from the project's internal resolution. Using the raw resolution previews the wrong size for any project with a non-100% Scale.

Landmine — editor zoom "100%" is not the same "100%" as a real launch

CameraLogic's own zoom (+/-, zoomLevels) is an editor-only pan/zoom convenience: its 100% means "1 world unit = 1 window pixel," computed purely from Camera.Main.DestinationRectangle.Height (UpdateCameraToZoomLevel) — it has no idea what Data.Scale is. The real generated game (CameraSetupCodeGenerator.cs ~line 696) instead sets Camera.Main.OrthogonalHeight = DestinationRectangle.Height / (Data.Scale / 100), which — at the window's natural size (ResolutionHeight * Scale / 100 pixels tall) — always works out to OrthogonalHeight == ResolutionHeight, independent of Scale. Scale is a pure pixel-multiplier (crisp upscaling), not a "show more/less world" zoom.

Fixed-size preview mode locks onto that value, not editor-zoom-100%: CameraLogic.SetFixedSizePreviewLock pins OrthogonalHeight to a constant (DisplaySettings.ResolutionHeight, sent via SetFixedSizePreviewLockDto) regardless of the embedded window's current pixel size — so when the Glue panel is too small and the window gets letterbox-shrunk (FixedSizePreviewCalculator), the whole picture optically shrinks uniformly (screenshot-thumbnail style) instead of revealing more world, which is what using editor-zoom-100% would have done. DoZoomPlus/DoZoomMinus (mouse wheel, Ctrl+/- hotkeys, and the Glue UI's ChangeZoomDto all route through these two) no-op while locked. The lock is re-sent whenever ResolutionChanged fires (MainCompilerPlugin) but not ScaleChanged — Scale only affects window pixel size (SetGameToEmbeddedGameWindow), never the locked OrthogonalHeight target.

Landmine — editor zoom % ratio does match Data.Scale; don't assign OrthogonalHeight an absolute value

DestinationRectangle.Height / OrthogonalHeight is panel-size-invariant and equals Data.Scale/100 at the matching zoom level — only an absolute OrthogonalHeight assignment (vs. the divisor formula) breaks that. See UpdateCameraToZoomLevel's forceToGameDefault (issue #2044).

© vchelaru, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/glue-embedded-game-preview of vchelaru/FlatRedBall.

Open the folder on GitHubat commit fa654ab

Compare with similar skills

Glue Embedded Game Preview next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Glue Embedded Game Preview compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Glue Embedded Game Preview this skillvchelaru/FlatRedBall578—~2.2kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k1 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.5k—~2.2kAutomated safety check: PassMIT
Game Asset Generatorhtdt/godogen7.1k—~2.8kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 1 repo~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.5k GitHub stars~2.2k tokensUpdated 13 days ago
    Game DevelopmentAuto-check passed
  • Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.

    7.1k GitHub stars~2.8k tokensUpdated 9 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Uloop Execute Dynamic Code

    CyberAgentGameEntertainment/NovaShader

    Execute C with Unity APIs when existing uloop tools cannot inspect or edit enough.

    1.6k GitHub starsUsed in 1 repo~1.9k tokens
    Game DevelopmentAuto-check passed

More from vchelaru/FlatRedBall

All 32 skills in this repo
  • Glue Live Game Testing

    vchelaru/FlatRedBall

    Testing GlueControl's embedded runtime (CommandReceiver, GlueControlManager) against a real running game process.

    578 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Glue Unit Test Bootstrap

    vchelaru/FlatRedBall

    Bootstrapping GlueUnitTests that touch GlueState.Self/GlueCommands.Self/ProjectManager.

    578 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Gluj Versions

    vchelaru/FlatRedBall

    A skill your agent uses when adding, modifying, or reasoning about Gluj/Glux file format versions, the GluxVersions enum, FileVersion checks, or anything that gates behavior on the version of a…

    578 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Gum Codegen

    vchelaru/FlatRedBall

    A skill your agent uses when working on Glue's Gum code generation — adding/removing/version-gating generated properties on Gum standard runtime types (NineSlice, Text, Container, Sprite, etc.), or…

    578 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Release

    vchelaru/FlatRedBall

    FRB1 (engine + Glue) release runbook — gh CLI sequence for Engine.yml/glue.yml, version scheme, release notes.

    578 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Release Notes

    vchelaru/FlatRedBall

    Drafts FRB1 release notes from commits/PRs since the last release.

    578 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Glue Embedded Game Preview

What does Glue Embedded Game Preview do?

How the Game tab's live preview embeds and resizes the real running game window, and its zoom/resolution status bar. Glue Embedded Game Preview is an agent skill from vchelaru/FlatRedBall. How the Game tab's live preview embeds and resizes the real running game window, and its zoom/resolution status bar.

When should I use Glue Embedded Game Preview?

Glue Embedded Game Preview fits situations like: game Development work in your project.

How do I install Glue Embedded Game Preview in Claude Code?

Run `npx skills add vchelaru/FlatRedBall --skill glue-embedded-game-preview -a claude-code`. Or copy the skill folder (.claude/skills/glue-embedded-game-preview in vchelaru/FlatRedBall) into .claude/skills/glue-embedded-game-preview in your project. Claude Code loads it when a task matches its description.

How do I install Glue Embedded Game Preview in Codex?

Run `npx skills add vchelaru/FlatRedBall --skill glue-embedded-game-preview -a codex`. Or copy the skill folder (.claude/skills/glue-embedded-game-preview in vchelaru/FlatRedBall) into .agents/skills/glue-embedded-game-preview in your project. Codex loads it when a task matches its description.

Can I use Glue Embedded Game Preview in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vchelaru/FlatRedBall --skill glue-embedded-game-preview -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/glue-embedded-game-preview, .gemini/skills/glue-embedded-game-preview, .github/skills/glue-embedded-game-preview and .opencode/skills/glue-embedded-game-preview in your project.

What does Glue Embedded Game Preview need to run?

SKILL.md names no scripts, command-line tools or credentials: Glue Embedded Game Preview is instructions for the agent only.

Does Glue Embedded Game Preview access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Glue Embedded Game Preview safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Glue Embedded Game Preview use?

Glue Embedded Game Preview is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Glue Embedded Game Preview use?

About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Glue Embedded Game Preview?

Skills that share tags, products or a category with Glue Embedded Game Preview: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.5k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Glue Embedded Game Preview?

vchelaru (a GitHub user) maintains it in vchelaru/FlatRedBall, which has 578 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on October 10, 2026.

Source: vchelaru/FlatRedBall on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.