Scene Properties

This tutorial teaches properties and how to add them to items

Introduction to Modifying Properties

One of the advantages of the scene editor is that items placed in a scene are given properties that can be adjusted and loaded into Quorum through the Object Property window, as opposed to code. This allows easy adjustment to the scene. When a property is set, it is updated in real-time in the Scene Editor. After items are added to the scene, the Object Property window is opened by selecting the object.

For example, suppose there is a Red Mouth monster in (0, 0) in the 2D editor. Select the object with the arrow keys and ENTER, then press COMMAND + P (Mac), or CONTROL + P (Windows) to go to the property window, or click on it with the mouse. This window gives access to: 1) Name, 2) Position, 3) Scale, and 4) Rotation. In addition, there are physics properties.

The name field is relatively clear. Items are automatically given the name from the Palette, with numbers added to copies. This can be edited to make organizing similar items easier.

Position is the location of the object. Remember, while the screen shows a grid, the objects are not in coordinates according to those. The coordinates are based on the pixel size of the object. In the 2D system, most objects are 32 pixels square. The bottom left is (0, 0), but the next square to the right is (32, 0), not (1, 0).

This is an image of the properties window. The top portion titled Basic Properties has the following editable boxes: Name; Position with spaces for x, y, and z; Scale with spaces for x and y; and Rotation. 
            The bottom portion is titled Physics. Options are: a check box for Enable Physics; radial options Unmoveable, Nonresponsive, and Responsive; and editible spaces for Mass, Friction, and Restitution.

For 3D scenes, the x, y, and z coordinates follow normal conventions for cartesian coordinates, but for 2D scenes the Z coordinate is different. Notably, a z coordinate in 2D, while it does not change the visual depth of an item, is used as a flag. This z value can be compared to layers of the image, from front to back. The front would be 0, and the next 1. For example, a water tile and a red mouth monster on the same tile. To show the water behind the monster, the water would have a z of 1, and the monster a z of 0. This tells the engine, essentially, to draw the red mouth monster after drawing the water.

Scale is the next property. The two numbers available in the properties window are width and height. A value of 1 means to not scale, or keep the object its true size. A number above or below is a multiple of that item's default width or height. Numbers between 0 and 1shrink the object, while those above 1 make it larger.

The next property is rotation. The numbers available depend on whether the item is in 2D or 3D space. For 2D, rotation is the number of degrees to rotate the item in the scene. For example, a value of 180 flips the image upside down.

3D rotation is mathematically more complex. There are multiple ways to describe rotation in 3D space; this lesson uses roll, pitch, and yaw. For roll, imagine a line going through an object back to front and rotating around that line. A roll value of 90, rolls an object along that axis to the right. For pitch, imagine an airplane and a line going from the back of the plane to the front. Specifying a pitch of 90 would cause the nose of the plane to go up. Finally, for yaw, using the same airplane, imagine a line going from the bottom of the plane to the top, causing a plane to rotate around this y-axis. A yaw value of 90 then rotates that plane around that axis clockwise.

The next section of properties is related to Physics. First, not all items in the game have to have physics properties, and having physics off for an item is slightly more efficient internally in the graphics engine. Second, if the checkbox for physics is on, unmovable, unresponsive, or responsive must be assigned. Unmovable means that the object will not move once the game is loaded. This makes sense for non-moving platforms or the ground. Non-responsive is for items that will move and objects may collide with them, but that won't be moved by the physics systems. A good example of a non-responsive item might be a moving platform that does not respond to physics directly. Finally, a responsive item might be a player character or a ball, which needs to correctly respond to any physics specified. These properties are essentially flags to the system that tells it whether, and how to adjust the in-game items.

The next three Physics properties are mass, restitution, and friction. These properties have their normal meanings from physics. Mass affects the inertia and ability of the object to resist change. Restitution is effectively how bouncy an object is. Friction is the resistance an object faces when moving over another object. While it can be any number, generally goes from 0 to 1, with 0 meaning no friction.

Next Tutorial

In the next tutorial, we will discuss Navigation and Keyboard shortcuts in Quorum Studio, which describes scene navigation in Quorum Studio.