dragonruby-rendering

Installation
SKILL.md

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 }
Related skills
Installs
5
GitHub Stars
2
First Seen
Mar 9, 2026