Introduction to Scene Running

So we have done it. We have created our perfect scene. It's cool. It's clever. It's got monsters. They're amazing! Let's publish it! Hold on. Scenes are cool, but static. Just because we have images in our application, does not mean our game is ready to be published on an app store. Notably, we need to tell our application what to do, which typically involves moving items, adding game logic, or taking other operations. While scenes can be used for games, they are also not limited to them. Any visual item can be placed and manipulated later in code in the general sense.

To load a scene we have already created, we can use the following template:

use Libraries.Game.Game
use Libraries.Game.Scenes.Scene
use Libraries.System.File
class Main is Game
    action Main
    action CreateGame
    action Update(number seconds)

This template looks similar to a normal game template, as described in the games tracks and tutorials. The way this works is that there is a new action, added in Quorum version 8, called LoadScene. This action knows how to read a scene file, process the information inside of it, and load that information into an application. This example is the default that is placed into the blank scene template when creating a scene. For this reason, running the default scene project automatically loads whatever scene was created and starts the game.

Next Tutorial

In the next tutorial, we will discuss Manipulating Running Scenes, which describes changing running scenes in Quorum Studio..