Skip to content
lukewilliamboswellPublic

About

Roc graphics and simple games platform

Topics

Resources

Contributing

Stars

78 stars

Watchers

3 watching

Forks

Repository files navigation

RocRay

Make 2D games, visual tools, and interactive apps in Roc, powered by raylib.

RocRay is for smaller graphical programs, such as games, visualizations, and interactive tools. It is not meant to compete with large, purpose-built game engines: it has no editor, scene graph, physics engine, or asset pipeline. Your app keeps its own state and makes every decision itself; RocRay provides drawing, sound, keyboard, mouse and gamepad input, the window, recording, files, and networking. It runs on macOS (Intel and Apple silicon), Linux x86-64, and Windows x86-64.

RocRay draws in 2D today. 3D models, cameras, and lighting are planned but not yet available. RocRay is not a GUI toolkit: for desktop applications built from widgets such as buttons, text fields, and layouts, see roc-gui.

Start with Hello World, Pong, and Snake. These larger examples show what else it can do:

Breakout gameplay
Breakout

Arcade gameplay, sounds made in code, recording
Painting in Pixel Workshop
Pixel Workshop

Drawing pixels and creating sounds in code
Navigating the responsive settings interface
Responsive Settings

Keyboard, mouse, resizing, display scaling
An animated postcard composition
Postcard Studio

Generative art and saving larger images
A moving fountain of particles
Particles

Thousands of moving images at once
A scripted responsive interface demonstration
Capture UI Demo

Automated controls and GIF recording
Source files appearing in Live Plot
Live Plot

Loading and drawing hundreds of thousands of lines
Spark Run gameplay
Spark Run

Designed map, characters, music, game states
Cave Climb gameplay
Cave Climb

Designed level, jumping, camera

Try it

  1. Install the latest nightly build of the Roc compiler, as Getting started describes.
  2. Open the latest release, download its roc-ray-examples-<version>.zip and unzip it.
  3. Open a terminal in the extracted roc-ray-examples-<version> directory, and run:
roc version
roc examples/hello_world/main.roc

Documentation

Follow the manual to write your first app and learn the app model, input, drawing, tasks and permissions. See the API reference for exact interfaces, Contributing to change RocRay, and GitHub Releases for version-specific changes and downloads.

Licence

RocRay is released under the Universal Permissive License v1.0; see LICENSE. That grant covers this project's own code and data. Vendored libraries and example asset packs keep their own licences and copyright holders, all indexed in THIRD-PARTY-LICENCES.md.

RocRay follows the latest nightly build of the Roc compiler, and names no compiler of its own. Because Roc is still changing, RocRay's API may also change. Bug reports, documentation improvements, and focused new capabilities are welcome.

About

Roc graphics and simple games platform

Topics

Resources

Contributing

Stars

78 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages