OrbEdit
From OrbEdit Wiki
Contents |
OrbEdit
OrbEdit is the level editor for the Orb engine. OrbEdit makes it easy to build levels for your game and write scripts for all your game Elements. If you're familiar with other Windows development environments, you should feel very much at home with OrbEdit. Read on to see what OrbEdit can do!
Terminology
First, some terminology to get us started.
- Project - A collection of Levels, scripts, sounds, images, and other resources that make up your game. Each Project you create should be thought of as its own game. OrbEdit allows you to create new Projects and manage all the files within them.
- Level - A single level of your game. A Level is simply a stack of one or more Layers, which could be anything from a single Layer for your simple puzzle game, to 12 different Layers for a complicated scrolling mountain range in the background of your awesome platformer. Levels are also referred to as maps, boards, or stages.
- Layer - A wrapper for a WorldSpace within a Level. Layers can either be local or shared; local Layers are saved in the Level file, whereas shared Layers are saved in a separate file and referenced by the Level file. See Layers for more info.
File Types
The following is a list of file types which Orb uses, and the icons with which OrbEdit displays them. Many of these files can be executed directly within OrbEdit, either from the Project Explorer or QuickScript views. However, in general, they will be referenced by the Elements in your World as textures, event scripts, or sound effects.
.oprj: An Orb Project file, contains the name and version of the Project, as well as parameters used to deploy your project. Project files are in XML format. Each Project has exactly 1 .oprj file.
.olvl: An Orb Level file, contains all definitions for all Elements of all Layers which make up a Level. For shared Layers, a reference is made to the shared Layer file. Level files are in XML format. Each Level has exactly 1 .olvl file.
.olay: An Orb Layer file, contains all definitions for all Elements of a single Layer, which is referenced from one or more .olvl files. Layer files are in XML format.
.lua: A LUA script file, contains LUA commands which control Orb. Every game made with Orb is entirely driven by LUA scripts, see Scripting for more information.
.oimp: An Orb Import file, contains the definitions for a collection of Elements which can be imported into a Layer. You can export your selection of Elements at any time into an .oimp file for later importing. Import files are in XML format.
.bmp, .jpg, .tga, .gif, .png: Image files, used to texture Sprites. Certain Shaders may use image files as well.
.midi, .wav, .ogg, .mp3: Sound files, used for sound effects and music within your game.
.xml: Plain XML files are used for a variety of purposes, including storing your QuickScripts, defining Registries, and describing what files to copy when you deploy your project.
.txt, .cfg: Miscellaneous files used for configuration purposes, or anything else not directly used by your game.
Selections

When you add a new Element to the World through the Add Menu, the new Element will be added as a child of the selected Elements. For example, if you select 3 Bodies and then select the Add Circle command, a Circle will be added to each of the 3 selected Bodies. Likewise, importing an Import File will attempt to import the new Elements to the current selection.
You can add and remove items from your current selection by holding down Ctrl as you click. In addition, there are various ways to alter your selection from the Select menu, such as inverting or clearing your selection. Likewise, you can control which Elements can be selected by dragging a selection box around them via the
button in the status bar. Being familiar with the all the selection techniques can save you a lot of time.
Anatomy of OrbEdit
OrbEdit is made up of a number of views which help your organize and build your game. Each view is its own window and can be docked onto any other view, or detached and placed anywhere you like. Whenever you start OrbEdit, your views will be automatically positioned the same way they were the last time you used them. Views can be opened from the View menu and closed with the
button. To move a view around, click and drag its title bar just like with any other window. You will be given cues as to where it can dock, or you can simply leave it floating.
Below are detailed explanations of each OrbEdit view.
Drawing Area
| The Drawing Area represents the World, where your game happens and is the main window of OrbEdit. Here, you can select sets of Elements, drag them around, scale them, change their properties, and zoom in and out. All Layers in your project are displayed here at once, although new Elements can only be added to the Active Layer. The Drawing Area appears exactly as your final game will appear so it's easy to compose your level.
Right-clicking will bring up a context menu from which you can add new Elements, cut and paste, or delete. Several Element types have special features that can only be reached from this context menu, such as mirroring Shapes or resizing a Sprite to match its texture size. The Drawing Area has several convenience shortcuts:
Additionally, the Drawing Area accepts keyboard input the same way your actual game will. Any keys you press while the Drawing Area has focus are routed through the Input Handler. When designing your input system, it is recommended you select keys that OrbEdit doesn't already use, otherwise you will be performing 2 actions with one keystroke - the OrbEdit action and the action for your game. |
File Editor View
| The File Editor View is OrbEdit's built in text editor. It has built-in syntax highlighting and bookmarking functionality for all supported Orb file types, as well as autocomplete and calltips for Lua scripts. You can execute scripts directly from the File Editor by clicking the Execute The File Editor offers a handy way to insert code snippets, from Insert Snippet
To open a file in the File Editor, you can:
AutocompleteAs you type, the File Editor will occasionally pop up a list of items, known as an autocomplete list. This list is filled with known fields for the symbol you have just typed. For example, if you type Autocomplete lists can only currently be displayed for items defined at the global scope. CalltipsSimilar to autocomplete, when the File Editor recognizes that you are about to call a function, it will search through its list of known functions for documentation on that function. If found, it will pop up a small window with that documentation, including the function's signature, return values, and parameter descriptions. For example, if you type |
|
Project Explorer View
| The Project Explorer View offers you a tree-like view of all the files and directories in your game. You can freely move these files around by dragging and dropping them, as well as rename
Certain types of files can also be executed from this view, using the Execute Many types of files can be directly edited with the Edit You can also drag and drop any files or directories from the Project Explorer View onto the QuickScripts View. This makes it very easy to get your favorite scripts into the QuickScripts View so you can always find them when you need them. The last important functionality the Project Explorer View offers is to let you change the startup script for your project. This can be achieved by right-clicking on a script file and selecting "Set as Startup Script". See the Deployment section for more information on startup scripts. |
Layers View
This is the view through which you manage the Layers of your Level. At the minimum, you must always have a single Layer, but no more than 32 Layers. New Layers can be added via the New Layer
Layers can be re-ordered by using the Move Layer Up The eye icon |
|
Properties View
| The Properties View allows you to view and change the properties of the currently selected Elements. Properties are listed in a categorized alphabetical order and are accompanied by a small description of what they do. If your Element selection contains more than one type of Element, only properties common between all types are displayed. This allows for the properties of multiple Elements to be changed at once. If no Elements are currently selected, the Properties View displays the properties for the WorldSpace of the Active Layer.
The Properties View does a moderate amount of validation on the values you enter. Invalid values for a certain property will write an error message to the Console and reset the property to its previous value. If a value is set to something other than its default, it will be displayed in bold. Once you have changed a property, that change will take effect as soon as you press Enter or click anywhere else in the application.
|
Console View
All messages from OrbEdit and from the Orb engine are directed to the Console View. Here you will be able to see color-coded output from your scripts as well as detailed startup information about Orb. The output from all print(), info(), warn(), and error() calls from your scripts will appear here.
The Console View automatically parses URLs and filenames and makes them into clickable links. When a URL is clicked, your web browser will open and take you to the specified page. Clicking on a filename will load that file in the File Editor View and alternatively jump to a specified line number. For example: -- Print to the console print("Scripts/Startup.lua:15"); will print a clickable filename, that when clicked, will automatically take you to line 15 of Scripts/Startup.lua. Command LineBelow the output area is a command line from which you can execute Lua commands directly. A command is any string that can be executed as Lua, or the name of a Lua file to be loaded and executed. All entered commands are saved to the CommandHistory.txt file and can be retrieved by pressing the up/down arrows on the command line. Additionally, all commands are stored in the QuickScripts View as described below. To enter a command, simply type the command on the command line and press Enter. To quickly clear the command line of all text, use the shortcut Ctrl + U. |
|
QuickScripts View
| The QuickScripts View is a flexible container that gives you quick access to your most often-used files. You can add files and groups to the QuickScripts View by using the Add Files and groups can be arranged in any order by dragging and dropping, or you can sort them alphabetically with the Sort The files and groups in the QuickScripts View do not necessarily reflect the organization of those files on your hard drive, thus, renaming or removing them does not alter the file on disk in any way. The QuickScripts View is meant as a convenient, secondary way to organize your data, so choose descriptive names for your QuickScripts that will remind you what they do.
Any commands that you execute from the command line will be added to the QuickScripts View under the Commands group, provided that a Commands group exists. This gives you an alternate way to quickly browse your command history and execute those commands again. Some common uses of the QuickScripts View are:
|
