Logging in...
Oops, try again... Email: Password: Submit
Really Useful Box2D Editor iforce2d

Intro


R.U.B.E stands for Really Useful Box2D Editor. This editor allows you to graphically manipulate a Box2D world and save it to a file. You can then load the saved file in your game/app and run the world. R.U.B.E can create any physics scene that Box2D itself can, with the exception that some joint types are currently not supported.

The main advantage of an editor like this is the speed and ease of development gained by being able to place items visually. Being able to tweak values and quickly see the results improves turnaround time when fine tuning physical behaviors. When the editing of scenes is quick and easy, more time and incentive exists for exploring different ideas, making more interesting content (or simply more of it), and creating a quality game/app that doesn't cut corners.

See the video below for an overview, and the 'Features' section for a detailed list of features.


Necktie fighter image courtesy of Erik Montoya: http://erikmontoya.com/

Box2D editor R.U.B.E
Hand-drawn game level background used with permission from Peter McClory. http://curveagency.com/




Features


Here is a breakdown of the current features in R.U.B.E and those that are planned. You can find more information about some of these on the development log page.
  • Editable items
    • Bodies
      • Translate, rotate, scale
      • Copy, paste, duplicate
      • Copy joints along with bodies
      • Negative scale (flip bodies across x/y axis)
    • Fixtures
      • Translate, rotate, scale
      • Copy, paste (onto body), duplicate
      • Negative scale (flip fixtures across x/y axis)
      • Automatic polygon decomposition for concave polygons
      • Reverse vertex winding
      • Fat shapes
    • Vertices
      • Translate, rotate, scale
      • Insert along existing edge (split)
      • Append/insert to chain (draw a sequence of points)
    • Joints
      • Types
        • Revolute
        • Prismatic
        • Distance
        • Rope
        • Wheel
      • Change bodyA/bodyB
      • Set local anchor positions
      • Set limits (revolute, prismatic)
      • Set length (distance, rope)
      • Rotate local axis (prismatic, wheel)
      • Set damping and frequency (distance, wheel)
      • Joints will be copied along with bodies so entire structures can be easily duplicated
    • Images
      • Position images as background props or use them as guides when creating physics objects
      • Attach images to bodies
      • Translate, rotate, scale
      • Duplicate
      • Set file, opacity, linear filter, flip
    • World
      • Set gravity
  • General
    • Reference grid to help judge dimensions
    • All items can be multiple-selected
    • Selection supports undo/redo
    • Context menu to disambiguate items in the same location
    • Translations can be restricted to x/y axes
    • Rotation and scale can be about selection center or cursor position
    • Switch between degree or radian display for angles
    • Items can be named for access from your program
  • Editor views
  • Integrated scene player
    • Interactive view to test the scene
    • Multiple player views per document
    • Pause, single step, modify speed
    • Render joints, body CoM etc
  • Item browser
    • Shows items in the scene in a textual list
    • Allows selection and name changing of items
    • Items expand to show their relation in a tree format (eg. a joint will expand to show two bodies)
    • List can be filtered to quickly find items
    • Hovering the mouse over an item in the list highlights it in the scene view
      (if the item is offscreen an arrow will be shown pointing to it)
  • Scripting
    • Angelscript engine
    • Any operation possible on the scene via the GUI can be scripted
    • Integrated script editor with code highlighting, auto-compile and error line-marking
    • Scripts can access current state (eg. getSelectedBodies) to implement contextual tasks
    • Customizable menu for calling your scripts
    • Script can access all information necessary to write custom exporters
    • All actions are logged to script as autosave data
    • Scripts can query the user for numbers and strings during execution
    • Click here to see the full script API.
  • Exporting
    • Dump C++ code (Box2D's standard feature)
    • Save scene to .json
  • Available JSON loaders/sample projects
    • C++ (b2dJson). Samples here.
    • Javascript (box2dweb). Sample here).
    • Java (b2dJson based on JBox2D). Sample here.
  • Help
    • Integrated help browser for script API and general help
    • Context help panel (content changes depending on current editor state)
    • Integrated feedback feature with screenshot capability
    • General log output to report warnings, errors and tips.
  • Other
    • Check for updates and view release notes dialog
    • Integrated feedback dialog with screenshot feature
    • Custom-built executable file requires no further DRM

Click here to see ideas for future updates.
    *** Please note these features are not confirmed! ***
  • Update 1
    • Weld joint
    • Motor joint
    • Allow changing joint types
    • Set mass of body (adjust all fixture densities)
    • Move body origin without moving attached fixtures/images
    • XML export
    • Delete old backup files?
    • Measure action
  • Update 2
    • Custom property addition
    • Integrated dialog for editing custom menu
    • Circle select?
    • Lasso select?
  • Update 3
    • Freehand draw vertices (automatically add vertices at given distance while dragging mouse)
    • Vertex list manipulations
    •     Smooth vertices
    •     Remove redundant vertices
    •     Blunt corners
    • Spline based fixtures
  • Update 4
    • Mouse over items in player view to see current stats
    • Scriptable display text for items
    • Change attributes in run view
    • Copy changed attributes back to editor view
  • Update 5
    • Scriptable events in player view, eg.
    •     do something before step
    •     do something on key press



Trial version


A trial version is available to evaluate the software before purchasing. The trial version includes all the functionality of the full version with no time limit or data size restrictions, but without the ability to save documents or extract the created scene (you can use 'script logs' to avoid losing your work - see details below).


Download trial version


R.U.B.E trial version - Windows (32 bit) 44.2 MB, January 26 2014
R.U.B.E trial version - MacOS (32 bit) 46.4 MB, January 26 2014
R.U.B.E trial version - Linux (32 bit) 43.5 MB, January 26 2014
R.U.B.E trial version - Linux (64 bit) 43.4 MB, January 26 2014
Notes on Linux usage...

Running on Linux


Some points to note when running on Linux:
  • On some distributions the default graphical archiver program does not restore the necessary symbolic links from the zip archive. After unzipping you should find a file 'rube.bin' which is the actual executable file, and another file (symbolic link) 'rube' which is the one you should use to start the program. If you cannot see the 'rube' file then the archive program has broken the symbolic links. You can avoid this by opening a terminal and using the standard 'unzip' utility to unzip the archive (just type 'unzip rube-trial-x.x.x.zip')
  • The program has been tested on the following distros:

    Fedora 14 Fedora 15 Fedora 16 Fedora 17 Ubuntu 11.04 Ubuntu 12.04 Ubuntu 12.10
    32 bit OK OK OK OK OK OK
    64 bit NG OK OK NG OK

    The distros marked "NG" do not have a recent enough version of GLIBC by default. You can check if your installation will have this problem by opening a terminal and running:

      strings /lib64/libc.so.6 | grep GLIBC

    If you see 'GLIBC_2.14' in the output, your setup should be ok. The libc.so.6 may be in another location depending on your distro - if so you can locate it with:

      locate libc.so


The trial version has the following features disabled:
  • Exporting scene to .json or .cpp
  • Saving scene as .rube
  • Printing strings in script
  • Plain-text copy/paste
Script logs can be used to avoid losing work created while evaluating. A script log is a record of every editing action, translated into 'rubescript' and written to a file. The script can be run when the scene is loaded again to replay the editing actions as if the user had manually performed them, and restores the scene to the former state. This means that any scenes edited with the trial version can subsequently be used with the full version.

More about script logs...

Script logs


While you are editing a scene file, every change you make will be logged to a file with the suffix '-scriptLog.rs', in a subfolder next to the scene file you are editing. For example if you are editing a scene file called 'tank.json', a file called 'tank.json-scriptLog.rs' will be saved in a folder called 'tank.json-backups' next to the scene file.

Box2D editor R.U.B.E

Editing changes are written to this file as soon as they are applied to the scene, so you could (as an extreme example) shut off your computer at any time without losing any work. Each time the scene file is newly opened, the old script logs are backed up using their file time to create a unique label, so you will not lose any previous script logs.

Box2D editor R.U.B.E

To restore the information contained in a script log, open the scenefile, drag the script log file onto the script panel, and run the script.

Box2D editor R.U.B.E

Note: the script log expects to be run from a clean open file state, so if you open the scene file and make some changes, the script log may not work correctly. Make sure to run it immediately after opening the scene.



Release notes


Choose two versions below to see the changes between them.

From to Show release notes

Getting release notes...




Supported platforms


R.U.B.E will be released and supported for:
  • Windows (XP or later) More...
    Tested and confirmed versions:
    • Windows XP
    • Windows Vista
    • Windows 7
  • MacOS (10.4.4 or later, Intel CPU) More...
    Tested and confirmed versions:
    • 10.4.11 Tiger
    • 10.6.8 Snow Leopard
    • 10.7.4 Lion
    • 10.8.2 Mountain Lion
  • Linux (Fedora 14 / Ubuntu 10.04 or later) More...
    The program has been tested on the following distros:

    Fedora 14 Fedora 15 Fedora 16 Fedora 17 Ubuntu 11.04 Ubuntu 12.04 Ubuntu 12.10
    32 bit OK OK OK OK OK OK
    64 bit NG OK OK NG OK

    The distros marked "NG" do not have a recent enough version of GLIBC by default. You can check if your installation will have this problem by opening a terminal and running:

      strings /lib64/libc.so.6 | grep GLIBC

    If you see 'GLIBC_2.14' in the output, your setup should be ok. The libc.so.6 may be in another location depending on your distro - if so you can locate it with:

      locate libc.so
You can download the trial version to check how the program runs on your system.


Recommended hardware


CPU: Obviously the faster the better, but a 1.4Ghz or so processor should be fine for most common usage.

Memory: Editing a typical scene (200 bodies, 300 fixtures, 180 joints) consumes around 20Mb of memory. Large scenes (10,000 bodies, 15,000 fixtures, 8500 joints) can use around 150Mb.

Input: A mouse capable of both left and right click inputs is necessary. A scroll-wheel mouse is highly recommended.

Video: A sturdy graphics card is recommended, preferably with hardware support for OpenGL. Rendering problems have been observed on netbooks with low-spec video hardware, eg. Intel GMA 945/950/3150

Network: The 'Check for updates' and 'Send feedback' dialogs require an internet connection.

Purchase R.U.B.E


The full version of R.U.B.E is available for JPY ¥3000 (around USD $30) through PayPal.
(Click these links to see live conversions for common currencies:
EUR, USD, GBP, INR, AUD, CAD, CNY, NZD, RUB)

Please try the trial version first to check how the program runs on your system and become familiar with the available features.

Yes, I've evaluated the trial. I want the full version.
Please tick the checkbox below to continue.


  1. This software is provided 'as-is', without any express or implied warranty. In no event will
     the author be held liable for any damages arising from the use of this software.
  2. Permission is granted to the purchaser to use this software for any purpose, including
     commercial applications.
  3. All future updates and additions to the software will be made available to the purchaser at no
     extra cost, but there is no guarantee that any updates will actually be made. Any planned
     future features mentioned on this website are to be treated as speculation only.
  4. Permission is granted for the purchaser to supply the software to a maximum of two other
     persons for the purpose of collaboration on projects. The other persons do not have permission
     to further supply the software.
  5. The software is individually compiled for each user and contains reliable watermarks to trace
     the origin of the purchaser. If the software is made publicly available in any form the
     purchaser will become ineligible for further updates and the promise of (3) is made void.
  6. The purchaser's email address will be recorded and used as the login username on this website
     to access the software, and for occasional notifications about software updates.
  7. If the purchaser is not completely satisfied with the software the purchase price will be
     refunded in full, until 30 days from the purchase date.

See also the PayPal Acceptable Use Policy.




Supported languages


R.U.B.E exports scenes to plain-text JSON, so any language that can read JSON can make use of the output. The full file format can be seen here.

Some reference implementations to do this in various languages are listed below, along with samples that you can try out. The source code for all these is included in the files accompanying the R.U.B.E download.

There is also a sticky post in the forums where you can find links to loader implementations for other languages and frameworks contributed by users: http://www.iforce2d.net/forums/viewtopic.php?f=6&t=240 Currently there are loaders for AndEngine, libGDX, Farseer, NAPE, PyBox2D, Cocos2d-HTML5, Flash (partial only), Gideros, Cocos2d-x v3, Isogenic engine, App Game Kit.



C++


The b2dJson utility is used to read and write scenes to JSON. This can easily be added to most C++ or ObjC projects. Here are two demos using this.
  • Box2D testbed sample
    This adds a 'test' to load a tank with images into the Box2D testbed.

    Here is a compiled binary you can download and run (Windows, Mac, Linux):
    rube-C++-sample-box2d-testbed.zip

  • iOS sample project
    This project is built by starting with the OpenGL ES XCode template and adding R.U.B.E scene loading functionality.

    Unfortunately Apple does not let one distribute compiled binaries freely. To run this on your iOS device you will need to pay $99 to join the developer program, and compile the source code yourself:
    rube-iOS-sample-project-src.zip

  • Cocos2d-iPhone sample project
    This project uses R.U.B.E to load a scene into a CCLayer and render the images with CCSprites. It demonstrates touch dragging, pinch zooming, and destroying bodies. A pinball table demo and a simple simple platform game demonstrate how to find and control items in the scene, react to collisions and use custom properties.

    Unfortunately Apple does not let one distribute compiled binaries freely. To run this on your iOS device you will need to pay $99 to join the developer program, and compile the source code yourself:
    rube-cocos2d-sample-project-src.zip

  • Cocos2d-X sample project
    As above, but for Cocos2d-X using C++
    rube-cocos2d-x-sample-project-src.zip

  • SFML sample
    This sample uses R.U.B.E to load some scenes and render the images with sf::Sprites. It demonstrates panning and zooming the view, dragging and destroying bodies. A pinball table demo and a simple simple platform game demonstrate how to find and control items in the scene, react to collisions and use custom properties.

    This zipfile contains both source code and pre-built binaries (Windows, Mac, Linux64, Linux32):
    rube-C++-sample-SFML.zip

  • Chipmunk demos sample
    A partial implementation of a R.U.B.E scene loader for the Chipmunk physics engine.
    This was mainly just an exercise in learning Chipmunk, rather than a proper loader implementation.

    Here is a compiled binary you can download and run (Windows, Mac, Linux):
    rube-C++-sample-chipmunk-demos.zip





Javascript


Javascript source code is available to read scenes from JSON and create a world in box2dweb.

You can try this in your browser right now: Javascript demo.
The demo loads various scenes, some with images, and seems to perform best in Chrome or Firefox. Wheel joints have been replaced with a line/distance joint combo.





Java


A Java version of the b2dJson utility is available to read and write scenes to JSON, based on JBox2D.

Here is a compiled version of the JBox2D testbed which loads some scenes from JSON:
rube-java-sample-jbox2d-testbed.zip
*** Image loading is not implemented.



Tutorials


You can find video tutorials about using R.U.B.E on YouTube. Choose from the pull-down list below to view them here on this page.


User section


Welcome to the user pages! Please choose a link from the menu above.

You can request builds of the editor in the 'Download' section.

You can change your password in the 'Account' section.

You can vote for future features in the 'Voting' section.


Download R.U.B.E


Instead of downloading the program and then applying a license key, R.U.B.E is individually compiled for each user. These customized 'builds' contain your user identification details so no further action is required to enable the program.

Before downloading you'll need to request builds for the platforms you will be using.


Request a build


Choose the platform(s) you require.

Requesting new build...
Request That build has already been requested. Request received ok.

The program will be compiled after requesting a build. This usually takes around 5 minutes, but builds are processed sequentially so it can take longer if there are other people in the queue. Your position in the queue will be shown in the table below, so you can estimate about 5 minutes for each place in the queue.


Current builds


Refresh table

Getting latest build info...

Builds will be stored on the server for two days.


Sample loaders


To keep file sizes down, the sample loaders and associated files are not included in the build downloads. If you downloaded the trial version you will already have these anyway, but if necessary you can get them separately here: rube-sampleLoaders.zip


Release notes


Choose two versions below to see the changes between them.

From to Show release notes

Getting release notes...




User account



Change password

Please enter the new password. Cancel
New password:
Confirm:


Your password was changed successfully.

Feature voting


Here you can vote for which features should be given priority in future updates to the program.

Features What's this?

Enter values in the text boxes below to give priority to the features you would like to see implemented. You can change these at any time.

Only the ratio between the values is important, so for example entering 1,2,3 is the same as entering 100,200,300 (note that entering the same value for all features has the same effect as not voting at all).

Your changes will be automatically sent to the server every couple of seconds - you can tell that your vote has been received when the green bars are updated.

The orange bars show the total results for all users.

Getting features list...
Getting feature details...

Click on each feature to view a description.