Learning Objectives

We should now have a map, characters on our map, and a rogue output statement we added to learn about errors. The next step is to go back to the scene editor to start changing properties, then use those to our advantage in our game. By the end of this session, we will be able to set properties on our items in the map, get back that information in our game as it runs live, and output that information to the console.

You will:

  1. Learn about properties and how to obtain them at runtime
  2. Practice with Types and Output
  3. Practice using the Scene Editor

Warm up (5 minutes)

The scene editor allows us to manipulate objects, with the keyboard or the mouse, by moving them around and setting what we often call properties. Properties are essentially pieces of data that Quorum stores behind the scenes about an item in the scene editor. Normally, when we are programming, we write computer code to set these properties and this idea is very general. For example, we might set the position of a 2D item (e.g. x, y coodinates) or 3D item (e.g. x, y, z coordinates), turn physics on or off for an object or anything else. Quorum Studio currently supports many common properties, but not all of them, and we imagine this will change over time. For this warm up, at least change the 1) the name of our characters, and set 2) physics properties of several items.

Output Properties in a Running Program (40 minutes)

Scenes created in the scene editor are static, meaning they do not animate and are not interactive. They are useful for placing items and getting maps setup for editing. However, in order to make our scene turn into a running application, we need to write code that tells our program what our scene should do once the program starts. As a first step, what we are going to do in this activity is:

  1. Get items from our static scene in code so that we can give them some behaviors
  2. Find 3 properties in computer code and output their values to the console. For example, we can output the mass, the name, or friction.

We will need the tutorial on manipulating a running scene to complete these activities. The purpose of this activity is to get some practice programming while showing that there is a direct link between properties in the scene editor and the information we get back inside of a programming language.

Wrap-up (10 minutes)

In the first five minutes, we will go into breakout rooms and share the properties we output to the screen and discuss any challenges or successes we had. During this time, as a group, come up with one question you have about coding or properties.

Next Tutorial

In the next tutorial, we will discuss Learning about Input, which describes learning about user input..