Moondust Editor

The PGE Editor is the main development system which allows the creation and editing of levels, worlds, and custom game configurations. It can currently create levels compatible with the classic SMBX64 standard, as well as the new PGE format. Editor fully supports all old SMBX formats which giving able to use them as more advanced and full alternate of default SMBX Editor.

History
The Editor project started as part of Wohlstand's SMBX Research Works which have purposes to create a new SMBX engine which will be compatible with old SMBX and will be more flexible and universal which will continue progress of SMBX and will give more potential for making of other games. PGE Editor conceived as more flexible and more advanced editor than original SMBX Default editor which should solve lots of exists issues and inconveniences of default SMBX Editor. The main things are a Multi-Document Interface which giving able to open multiple files at one time. Development of Editor started in March 24, 2014 where Wohlstand presented first sketch of editor which was a beginning of PGE Project. This dummy application was only parse and validate LVL file format only. Later Wohlstand was implemented displaying of level contents but without graphics. Begins from 0.0.5-alpha, Editor got able to export whole sections into images. Because NPC displaying was not implemented, all NPC's was displayed as ghost dummy image. April 28, 2014 Kevsoft was joined into PGE Project and first version which was out after is 0.0.7-Alpha. This version can correctly render backgrounds, blocks and BGOs. The first full featured version with reading/writing ability, with history manager, with full support of NPC render is 0.0.8-Alpha which was out in July 13, 2014.

After long time of development, October 20 2014 was released the FIRST stable and full featured build of Editor with read/write of levels, worlds, interactive npc editor, etc. This version got a multi-configuration system which giving able use difference content packages without overwriting.

Interface
Editor have a multi-document interface with dock widgets and toolbar with additional icons. Here is two modes of MDI:
 * tab-view, modern and flexible MDI interface. All opened files available by special tabs which you can use to quickly switch between opened files.
 * sub-windows, classic and more like to original SMBX Editor interface. You have a space with included sub-windows inside them.

Supported files
List of supported file formats by Editor:
 * LVLX - Extended Level File, uses PGE-X data format
 * WLDX - Extended World map File, uses PGE-X data format
 * LVL - SMBX 1.0...1.3 Level File Format, internal format of SMBX game engine
 * WLD - SMBX 1.0...1.3 World Map File Format, internal format of SMBX game engine
 * SAV - SMBX 1.0...1.3 Game Save Format, internal format of SMBX game engine

Level editor
Part which giving able to view, create and edit levels.

Sections
On the tool-bar available section switch buttons which giving able quickly jump between sections. Also compass icon giving able to return back into left-bottom of current section if you was lost on a huge space. When you switching between sections. All properties of current section available in the special Section Properties toolbox which you can open via tool-bar icon or in the View menu.

In the section properties toolbox you can change special flags, change music, choice custom music file in the interactive mode, change background of section and resize the section. When you press "Resize" button you will see big green rectangle which an interactive resizer: you can move them, you can drag it's sides, you can crop parts with using of context menu. When you done resizing you can press Enter key to accept changes or Esc to cancel resizing. You also can see special icons on the tool-bar which you can use to apply/cancel resizing too.

Items
Items editing is in the multi-selection dragging with using of context menu to change settings of them.

Editor giving able to place new items with difference modes:
 * Brush placement - Default regular mode. You will place items by clicking and moving of mouse. Placement mode of player start points, warp points, default Blocks, BGO's and NPC's.
 * Rectangle draw - placing mode of sizable blocks, physical environment (waters, quicksands) ranges. You also can use them to place group of items more faster than brush placement. Available also for Blocks and for BGO.
 * Lune draw - Additional placing mode which giving able to draw lines of items. Much useful for drawing of slopes. Available for Blocks, BGO's and NPC's.
 * Flood fill - Additional placing mode which giving able to fill closed ranges of random shape. If range is accidentally opened, don't worry, filling process will be aborted after 3 seconds timeout to prevent freezing of editor and memory overflow. Also you can enable special flag which will enable limit of flood fill process with section boundaries.
 * Overwrite mode - Additional placing mode which will enable removing of all collided items with item which you placing now.

When you working in the selection mode, you have able select multiple items which you can move into another place, copy, paste, remove.

Available a context menu which giving access to properties of each item. If you was opened properties dialog with selected item group you also have able to overwrite properties of all selected items.

Level editor have a history manager which remember all your actions from initial state which begins from opening or creating of new file.

Warps
Warps placing, editing available via special toolbox - Warps and Doors which available by toolbar icon or in the View menu. Warps presented as list of available warp entries with placed on the level a special points - entranced and exits. To place new warp you should add new warp entry and when you need place necessary warp points to the map by pressing to the "Set Entrance" and "Set Exit". If point already placed (grayed check-box about is checked) and when you will press this button, you will be scrolled to location where this warp point is placed. With context menu you can jump between entrance and exit locations and change some properties.

Layers and events
Layers giving able to create group pointer to items which membered to them. Layers can be hidden/shown by events - special sub-scripts which giving able modify level and game-play things inside level runtime. Events can change music and sound of target section or multiple sections, events can show/hide membered to defined layers items, etc.

Editing of layers available in the special layers toolbox which available in the view menu or by toolbar icon. Layers editing dialog have a list of layers with check boxes which you can enable/disable to show or hide layers. You can drag and drop layers in list to make order of them. To rename layer you can use context menu or double click to them. Unlike SMBX, renaming of layers is safe and all connections will be saved with this layer (will be updated automatically after renaming of layer).

Editing of events available in the special events toolbox which available in the view menu or by toolbar icon. Events dialog have a list of available events and toolbox which preferences of events. You can rename events in list by double clicking to them. You can move them inside list to order them like in the layers dialog. Renaming of events are safe too.

World map editor
Part which giving able to view, create and edit world maps and episode settings.

Episode settings
In the world settings toolbox you can change special flags, edit titles, credits list of episode, etc. Toolbox available

Items
Items editing is in the multi-selection dragging with using of context menu to change settings of them.

Editor giving able to place new items with difference modes:
 * Brush placement - Default regular mode. You will place items by clicking and moving of mouse. Default for all items.
 * Rectangle draw - Additional placing mode which can use them to place group of items more faster than brush placement. Available for Tiles, Sceneries, Paths and Levels.
 * Lune draw - Additional placing mode which giving able to draw lines of items. Available for Tiles, Sceneries, Paths and Levels.
 * Flood fill - Additional placing mode which giving able to fill closed ranges of random shape. If range is accidentally opened, don't worry, filling process will be aborted after 3 seconds timeout to prevent freezing of editor and memory overflow. Also you can enable special flag which will enable limit of flood fill process with section boundaries.
 * Overwrite mode - Additional placing mode which will enable removing of all collided items with item which you placing now.

When you working in the selection mode, you have able select multiple items which you can move into another place, copy, paste, remove.

Available a context menu which giving access to properties of each item. If you was opened properties dialog with selected item group you also have able to overwrite properties of all selected items.

World map editor have a history manager which remember all your actions from initial state which begins from opening or creating of new file.

Middle mouse-button commands
Editor have able to get usage of middle mouse button: you can enable those feature in the Tools/Application settings and in the Editing tab.
 * Duplicate selected - all selected items will be duplicated to current mouse position relative to left-top corner
 * Pick-up to place from map - you know SMBX's feature which giving able take one of items from map to place copies of them. You can do it in the Editor with middle mouse button!
 * Switching into drag-scroll mode - when you pressing middle button without selected items, you will be switched into drag scrolling mode where you can scroll with dragging of screen.

Debugger
Debugger - is a special toolbox which show additional information and counters of items.

Main features:
 * Displaying of current mouse position/coordinates on the level map and world map
 * Going to the position by typing its X and Y coordinates in a level and world map
 * Counters of Player Start Points, Blocks, BGOs, NPCs, Warps and Physical Environment Zones (Water & Quicksand) are placed in the level; see how many Tiles, Sceneries, Paths, Level Points and Music Boxes are placed in the world map.
 * Custom counters which allows to define own counters of items/elements which placed in the level or in the world map (only version 0.2.1.8-dev and higher).

Tileset item box
Tileset Item Box - is a special flexible and customizable item box which giving able create your own tilesets of items which more convenient to use if you have necessary to make combinations of difference items on the map. This item box can be opened via View menu where you can found Tileset Item Box menu item.

Tileset Editor
Tileset editor is a drag&drop dialog box where you need drag necessary items from common list and put them into one of cells of tileset. You can change size of it. Limit of size is from 1x1 to 20x20 cells per tileset.

Global tilesets
Global tilesets - are a special tilesets which listed in the own tabs, which are "categories". These tilesets saving into folder of configuration package instead of level or world. These tilesets don't using custom graphics, but you can make own tilesets and tileset groups. For global tilesets available a special tileset group editor which can build common tabs of tilesets.

Search toolbox
Search toolbox giving able to find specific items on the level or on the world map.

Position bookmarks
Position bookmarks - is a special useful tool which will remember your last position on the level or world map and will give able return back by alone click to them!

Important notes

 * When you will exact limits of SMBX64 standard, you will lose able to save SMBX file format with warning message, but when you will remove junk items, you will get able to save SMBX file again.
 * PGE Editor using the SDL2_mixer audio library to play musics and sounds. If you have music more than 44100 Hz sample rate, you will hear noisy playback. To fix it you should re-sample your music file into 44100 Hz to get correct playback.
 * If you see wrong images (semi-transparent, invisible sprites, dirty images), this is a result of lazily-made masks. To fix this bug you can open menu "View" and set flag "Enable GFX Fix" and when restart your level file. Alternate method is Tools menu where you will found "Custom Data" sub-menu and "Fix all wrong masks". Will be started a special wizard which will automatically fix all your wrong masks. When feature done it's work you can reload level file to see fixed result.

Easter eggs

 * if you will add via notepad into LVLX/WLDX/META file this piece of code, you will see message box with than text when you will try to open edited file:

Links

 * PGE Editor manual
 * Veudekato's Playlist/Videos