Project Hub

The Project Hub is used for creating a new project or loading a previously created project.

S2D_PHLanding

Creating a New Project

In order to create a new project, you first want to press the New Project button. This will open up a new page that will allow you to name your project and set the projects path.

S2D_PHStartNewProject

By default, the editor will create a folder [ScionProjects] directly wherever the editor's executable is located for projects. This folder is just a suggestion and does not have to be used. If you would like to set a new location, press the Browse button to open the folder dialog and set the desired folder you wish to use.

S2D_PHSetProjectPath

Once the project path has been set, all you need to do now is add in the desired name of the project and then press the Create button.

S2D_PHCreateTheProject

When the project is created, there are different folders and files automatically created for you.

Generated Folders

Folder NameDescription
[Project_Name]This is the main folder that holds the project.
SCION_2DScion project separator.
SCION_2D/contentThe content folder will hold all of the games assets and scripts. Required by the editor.
SCION_2D/content/assetsThe assets folder is an easy way to organize you assets. Optional The editor does not directly look for this folder.
SCION_2D/content/assets/fontsThe fonts folder is another Optional generated folder used for organization.
SCION_2D/content/assets/musicThe music folder is another Optional generated folder used for organization.
SCION_2D/content/assets/scenesThe scenes folder is Required. When new scenes are created, all of the generated files go into the scenes folder and into a new folder [SceneName].
SCION_2D/content/assets/shadersThe shaders folder is another Optional generated folder used for organization.
SCION_2D/content/assets/soundfxThe soundfx folder is another Optional generated folder used for organization.
SCION_2D/content/assets/texturesThe textures folder is another Optional generated folder used for organization.
SCION_2D/content/scriptsThe scripts folder is Required The editor looks here to find the main.lua file. All other scripts should also be located here.

Generated Files

File NameDescription
[Project_Name].s2dprjThis is the main project file that is used for loading a saved project. This file is automatically generated and updated by the editor. Don't make changes to this file unless you know what you are doing!

The main project file or .s2dprj is just a JSON file underneath; however, the editor expects the file to contain specific content in order to work correctly. You should not have to make changes to this file because it should be created automatically upon project creation and updated every time the project is saved.

File NameDescription
main.luaThe main.lua file is the entry point for all scripts. The editor looks for specific functions located in the main.lua file in order to run the update and render functions.
--[[ Main Lua script. This is needed to run all scripts in the editor GENERATED BY THE ENGINE ON PROJECT CREATION. DON'T CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING! --]] -- The engine looks for these two functions. -- Please add your code inside of the update and render functions as needed. main = { [1] = { update = function() -- Add your code to be update here end }, [2] = { render = function() -- Add any extra rendering code here end }, }

You do not have to write all of your code inside of the main.lua file. It can all be separate scripts. For instance, if you create different game states in different files, you would only want to call the Update function of the current state inside of this update function. The rest of the code can be written in the loaded scripts. In order to load separate scripts, see Lua Functions for an example.