dragonruby-rendering
This skill covers advanced rendering patterns in DragonRuby GTK. For basic sprite/label/solid output see the main dragonruby skill.
Render Targets (Off-screen Buffers)
Render targets let you draw into a named virtual canvas, then use it as a sprite. They are very powerful for caching, effects, and UI composition.
# Draw into target each tick (transient! clears it each frame):
args.outputs[:hud].transient!
args.outputs[:hud].width = 400
args.outputs[:hud].height = 200
args.outputs[:hud].background_color = [0, 0, 0, 0] # transparent bg
args.outputs[:hud].sprites << { x: 0, y: 0, w: 32, h: 32, path: 'sprites/icon.png' }
args.outputs[:hud].labels << { x: 200, y: 100, text: "HP: 3", alignment_enum: 1 }
# Composite into the main scene:
args.outputs.sprites << { x: 0, y: 520, w: 400, h: 200, path: :hud }
More from nitemaeric/dragonruby-skills
dragonruby
Build games and prototypes with DragonRuby GTK (DRGTK). Use this skill when the user asks to write DragonRuby game code, implement game mechanics, work with the DRGTK API, or debug DragonRuby projects.
9dragonruby-ui
UI controls in DragonRuby GTK — buttons, checkboxes, toggles, scroll views, menus, input remapping, tooltips, progress bars, accessibility. Use when building game menus, HUDs, settings screens, or in-game UI widgets.
6dragonruby-audio
Advanced audio in DragonRuby GTK — spatial audio, procedural synthesis, beat synchronisation, crossfading, audio queues. Use when the user asks about DragonRuby music, sound effects beyond basic playback, rhythm games, or generated audio.
5dragonruby-yard
Set up YARD documentation and Solargraph LSP autocomplete for DragonRuby GTK projects. Use when the user asks about IDE autocomplete, type support, Solargraph, or editor integration for DragonRuby.
5dragonruby-3d
3D graphics techniques in DragonRuby GTK — raycasting, Mode7 floor projection, matrix transformations, wireframe rendering, sprite-based 3D, VR patterns. Use when the user asks about 3D visuals or pseudo-3D effects.
2dragonruby-pathfinding
Pathfinding algorithms in DragonRuby GTK — A*, BFS, flood fill, priority queues, spatial hashing, quad trees, line-of-sight. Use when the user asks about enemy AI navigation, movement grids, or reachability.
2