Skip to content

Instantly share code, notes, and snippets.

@sroccaserra
Last active July 4, 2020 22:08
Show Gist options
  • Save sroccaserra/6527889eb1947f8597089f5bc00613e7 to your computer and use it in GitHub Desktop.
Save sroccaserra/6527889eb1947f8597089f5bc00613e7 to your computer and use it in GitHub Desktop.
Work in a 320x180 resolution in DragonRuby
# https://dragonruby.itch.io/
BUFFER_W = 1280.div(4) # 320
BUFFER_H = 720.div(4) # 180
def tick args
args.render_target(:buffer).sprites << {
x: 0,
y: 0,
w: BUFFER_W,
h: BUFFER_H,
path: 'sprites/Sprite-320x180.png'
}
args.outputs.sprites << {
x: 0,
y: 0,
w: 1280,
h: 720,
path: :buffer,
source_x: 0,
source_y: 0,
source_w: BUFFER_W,
source_h: BUFFER_H
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment