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


Compile your app to native code on any platform.


Convert your app to JavaScript and run in your favorite browser.

Get Started ยป

Install the gem and read the guides

Creating your first app

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 =

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

# Show the window


Ruby 2D is open source. View the project on GitHub and learn how to get involved.