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 direct manipulation, as opposed to code. This allows us to make adjustments to a scene more easily. When a property is set, it is updated in real-time in the scene editor. To use the property window, we first create a scene and add items to it. Next, we use the cursor and select one of them.

For example, suppose we have a Red Mouth monster in 0,0 in the 2D editor. If we select it with the cursor, we can press COMMAND + P (Mac), or CONTROL + P (Windows) to go to the property window. We can also use the mouse or visually look at it. Inside of this window, we have the following properties available: 1) Name, 2) Position, 3) Scale, 4) Rotation. In addition, we have physics properties.

For the first, while setting the name is relatively clear, the position, scale, and rotation require more explanation. Notably, position is indicated to the system in raw pixels, not grid coordinates. As such, a position of 32, 32, if the grid size is 32 in the 2D grid editor, would actually be located at grid position 1, 1. This is because the grid size can be adjusted by the user, and the tileset, and so the properties are set according to how Quorum's graphics engine understands it.

This is an image of the properties window. It contains a series of checkboxes, radio buttons, and fields for manipulating the properties described in the text.

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. For example, imagine we have a water tile and a red mouth monster on the same tile. In such a case, if we want the water tile to be visibly behind the red mouth and to not clip it out of the scene, the water tile should be given a z coordinate of 1 and the red mouth monster a z coordinate of 0. This tells the engine, essentially, to draw the red mouth monster after drawing the water.

Scale and Rotation are also available as properties of items. For scale, the two numbers available in the properties window are width and height. A value of 1 means to not scale, whereas a number above or below is a multiple of that item's default width or height. For rotation, the numbers available depend on whether the item is in 2D or 3D space. For 2D, rotation is the raw number of degrees to rotate the item in the scene. Thus, a value of 180 flips the image upside down.

For 3D, rotation is mathematically more complex. There are multiple ways to describe rotation in 3D space and we chose to use roll, pitch, and yaw. For roll, we can imagine a line going through an object back to front and rotating around that line. A roll value of 90 thus 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.

In addition to properties related to position, scale, and rotation, we can also modify physics properties. 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, we need to specify whether our item is unmovable, unresponsive, or responsive. Unmovable means that we will never move the item after our game is loaded. This makes sense for non-moving platforms or the ground. If we select non-responsive, this 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.

Finally, we can set the mass, restitution, and friction for any object. These properties have their normal meanings from physics. Notably, restitution, while a somewhat strange word, is effectively how bouncy an object is. Friction, 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..