Ruby 2D

Make cross-platform 2D applications in Ruby

Interpreted

Write your app as a classic Ruby script, just like you're use to.

Native

Compile your app to native code and run on any device.

Web

Build your app for the web using JavaScript.

Get started ยป

Install the gem and read the guides

With Ruby 2D, you can create 2D applications, games, and visualizations with ease. Just a few lines of code is enough to get you started.

require 'ruby2d'

# Set the window size
set width: 300, height: 200

# Create a new shape
s = Square.new

# Give it some color
s.color = 'red'

# Show the window
show

Enjoy Ruby 2D? Join the community!