Game Scenes is where the action takes place in your game. It is a resource so crucial your game can not compile without at least one scene.
Scenes are composed of two key components.
Let’s list them for your pleasure as well as their sub-components:
- Width & Height – The width and height of a scene in pixels.
- Name – The name of the scene to be referenced as a constant
- Captions & Hints – Meta data about the scene
- Tile Width & Height – Used for placing tiles onto layers
- Start Audio – The audio resource that plays as soon as the scene starts.
- End Audio – The audio resource that plays as soon as the scene ends and goes to another scene.
- Background Music – The music played continuously throughout the scene.
- Continuous scene – True or false if the scene data remains constant until the game restarts or shuts down.
- Background Color – The RGB/HEX color to be rendered each frame before its layers.
- Layers(Up to 32 per scene)
- Backgrounds based layers
- Tile based layers
- Objects based layers
Managing layers in the GPE scene editor is quite easy with an optimal supply of buttons and sub-menus. To add a layer simply click the “+” plus button in the layers tab of the scene editor. Pictured above you can see a context-menu will popup with 3 main options of which sort of layer to add. Then from there you simply choose 1 of the 32 available layers available in your project layer matrix. Then presto-pasta a new layer summoned to your game scene ready to be edited.
Each button in this button-bar can do cool things, but for those who do not experimenting we will give you a give overview of what each one does.
- Settings Cogs – Pulls up a popup menu to either change the layer’s id from the layer-matrix of the selected layer or allow the option to rename the layer entirely throughout the entire project.
- Plus Icon – If the current scene has less than 32 layers it will allow you to add a new layer of one of the three allowed types.
- X Icon – When selected will ask the user if they will like to delete the current selected layer from the scene.
- Move Up Arrow – Places the selected layer’s position up in the depth to be rendered behind by 1 layer(in editor and engine).
- Move Down Arrow – Places the selected layer’s position down in the depth to be rendered in front by 1 layer(in editor and engine).
- Hide/Unhide – Hides or unhides all other layers but the selected one(in editor alone).
With there being three core layer-types there are separate menus for each type. So please familiarize yourself with each submenu.