JelloCar Level Editor - Quick Start Guide

 

INTRODUCTION

The physics in JelloCar are all based around points connected into shapes.  Each point in the shape has mass, and moved independently of the other points.  The shape is maintained by spring forces that act along the edges, optional internal springs, and also special "shape matching" forces that try to return an object to its original shape.

JelloCar Level Editor allows quick creation of levels for JelloCar, through a fairly user-friendly interface.

This guide does not try to be a full users manual, but instead explain the basics of building levels for JelloCar.

 

GETTING STARTED

 Let's make a simple level.  After starting up the level editor, choose Options -> Grid Setup.
Set the "Grid Size" to 15 x 15.  This is the number of major lines the grid will be made of, not the spacing between lines.
Now set the "major grid lines" to 1.  This is the distance between major grid lines.
Finally, set the "Grid Subdivisions" to 5.

This will create a grid that is 15 x 15 units in size, with major (white) lines every 1 unit, and minor lines (grey) every 0.2 units.

For reference, the Car in JelloCar is about 3 units long.

NOTE: You can pan the view by dragging the mouse with the middle mouse button pressed, and you can zoom the view by dragging left/right with the right mouse button pressed.

 

MAKING A STATIC BODY

First, let's make a simple, completely static platform.  Click the "New Object" button. This creates a new object in the world, with a default shape:

We will make a very simple shape for this first platform.  Don't worry too much about the overall size, we can scale it later.  We just need to get the basic proportions right.  First, click the "Object" tab in the upper-right, to go into Object mode, and edit this specific object.  Next, make sure "Snap" is checked in the Options menu.

 

OBJECT EDITING

NOTE: make sure to set a globally unique name for each new body you create, by entering the name into the "name" field in Object edit mode.

Object editing has 3 basic modes:  Point, Spring, and Polygon.  In Point mode, you can move, add, and remove the points that make up the shape of the object. 

In Point mode, left click to select a point. hold SHIFT and click to add a new point (it will be added in sequence after the currently selected point).  Hold CTRL and drag to move the currently selected point.  If "Snap" is enabled, points will snap to the nearest grid point.

Hold SHIFT and left click a few times to make a basic platform shape, and also CTRL and drag to move the original 3 points, until you have a basic shape:

To make an object static, you just need to set the "Mass Per Point" on the right to zero (0).

 

To make this object visible in the game, we need to define the polygons (triangles) that make up the shape.  Click the "Polygons" radial button to switch to Polygon mode.

To add a polygon, SHIFT + Click the first point in the polygon, and then click the 2 other points.  The polygon will be drawn on-screen in the current object color immediately:

Continue adding polys until the entire object is filled:

NOTE:  you can remove polygons by clicking on the poly while holding the ALT key on the keyboard.

 

That is all that's necessary to make a static object.  To recap, static objects must have the "Mass Per Point" set to zero, and should have polygons set to make the object visible.

Click the "Scene" tab, to go back to scene editing mode.

In scene mode, click to select an object.  Hold SHIFT and drag to move the currently selected object.  hold CTRL and drag to rotate the current object.  hold ALT and drag to scale the current object.  You can also set the position, angle, and scale directly by entering numbers into the boxes on the lower right.  Scale the object up a bit, and place it where you would like.

 

MAKING A DYNAMIC OBJECT

Next let's make a simple dynamic object.  Click the "New Object" button again, select the new object, and give it a unique name.  Add a few points to make a shape like this:

Since this is a dynamic object, make sure to set "Mass Per Point" to 1 (or any positive number) to make this object dynamic.

Now let's add some springs to help this object keep its shape.  There are 2 kinds of springs: Edge springs - spring forces that work on the edges of the shape, and Internal springs - springs you add between various points.  Click the "Springs" radio button to switch to Spring mode.

To add a spring, hold SHIFT, and drag the mouse from 1 point to another.  The spring settings will be set to the current "Spring K" and "Damping" settings in the "Spring Settings" section:

For reference, low values are around 80-100, and high values are around 9,000.  For damping, try not to exceed values above 50, or things might be unstable.

Hold SHIFT and drag to create several internal springs:

Don't forget t set the "Edge Settings" to proper spring values as well.  Then, choose a color for the object, and add polygons in the same manner as before.

NOTE: Shape matching is a system that tries to bring an object back to its base shape, no matter how deformed it gets.  These are also spring forces, so you can set the shape matching to any valid spring force.

 

Click on the "Scene" tab to go back into scene editing mode, and place the object wherever you want.

NOTE: each object in the world can be assigned a Material, which defines how it interacts with other objects, and also helps with keeping the game running fast, by ignoring impossible collision calculations.  For background objects that will not collide with other background objects, set the material to "0: Basic Ground".  For dynamic objects, set it to "1: Dynamic Object".  Material number 2 and 3 are reserved for the car, and material 4 is reserved for background objects made from Ice (very little friction).

Set the first, static object you made to Material 0, and the new dynamic object to Material 1.

 

KINEMATIC OBJECTS

Finally, let's make a kinematic object.  Kinematic objects are exactly like dynamic objects, but they are "pinned" to the world instead of moving freely.  They can also have special movement controls like Platform Motion (moves back and forth along a path), and Motor (constant rotation).  First, make a new object as before, including internal springs and polygons.

NOTE: Kinematic motion is handled by the Shape Matching springs, so stiff Shape Matching springs will keep the object pinned tightly, while small spring forces will allow the object to stray further.

To designate an object as kinematic, just check the checkbox:

To set specific motion, go back to Scene mode, and choose Special -> Object Motion Settings from the menu:

You can set any combination of Platform Motion and Motor.

NOTE: "Starting Offset" for platform motion allows you to start a platform midway through it's path.  This should be a value between [0,1].

 

SCENE SETTINGS

Some other important scene settings also need to be set.  Click Special -> Scene Settings:

Scene Name: this is the name for the level that will be shown in the main menu.

Car Name: name of the car for this level to use.  the default car name is "car_and_truck".  This is the only car currently in the game.

Spawn Position: where the car will start the level.  Shown in the editor as a yellow circle.

Finish Position: the target position that designates the end of the level.  Shown in the editor as a light blue square.

Fall Line:  the Y position that designates "out of bounds" for the level.  Shown as a purple horizontal line in the editor.

 

SAVING THE SCENE

Choosing "Save" from the File menu will just save the current scene layout, not the individual objects in it.

Choosing "Save all" from the File menu will save the current scene, as well as all objects contained in it.

 

MAKING THE SCENE WORK IN THE GAME

From the File menu, choose "Publish to JelloCar".  Find the install directory for JelloCar (defaults to C:/Program Files/JelloCar), and save your scene into the "Assets/Scenes" directory.  The editor will automatically add your level to the list, and it will be available the next time you start JelloCar.

 

NOTE: Be careful that all of the objects in your scene have unique names, so that you don't accidentally overwrite a file being used by another level accidentally!

 

 

Best times for the level will automatically be saved.

 

And now you should be able to see and play your scene in the game!

 

good luck!

 

-Walaber