Run that Scene!
Think it up. Code it. Run it.Make it Real
It's complete. The perfect scene. It's cool. It's clever. It's got monsters. They're amazing! Publish it! Hold on. Scenes are cool, but static. Just because there are images in the application, does not mean the game is ready to be published on an app store. The application needs movement, game logic, and many other operations. Any visual item can be placed and manipulated later in code in the general sense.
To load a scene, use the following template:
use Libraries.Game.Game
use Libraries.Game.Scenes.Scene
use Libraries.System.File
class Main is Game
action Main
StartGame()
end
action CreateGame
LoadScene("Scenes/Scene.qs")
end
action Update(number seconds)
end
end
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.
To run the scene, click the Green RUN arrow, or use COMMAND+R or CONTROL+R. The scene will run and open a game window with the scene loaded.
Next Tutorial
In the next tutorial, we will discuss Introduction to Manipulating Scenes in the scene editor., which describes scene manipulation in Quorum Studio..