World O' Wonders Editor - Documentation
Welcome to the official documentation for the World O' Wonders (WoW) Editor. This page breaks down the architecture, file systems, and toolset provided in the editor to help you create custom levels.
Introduction
The WoW Editor is built natively in Godot Engine (4.x) and is designed to allow players to construct intricate platforming stages, place interactive items (like Carrots, Coins, and Enemies), and export them in a highly compressed binary format that the main game can parse.
File System & Formats
The editor creates localized directories on your computer to manage configurations and your raw project data.
Directories
- Project Data:
user://Project Data- This is where your active and saved level projects live before being exported. - Editor Settings:
user://Editor Data/Configs/- Stores theconfig.inifile, which remembers settings like your 10 most recently opened projects.
File Types
Raw Project Files (Editor Only):
.dat: The main level project file holding logic, spawn data, node arrays, and configurations..tlst: The custom tileset saving format. A project utilizes two of these (tileset_main.tlstandtileset_bg.tlst).
Exported Levels (Game Ready):
.wowlv: The official World O' Wonders custom level format. This is what you generate via the Export function and load into the main game. It is HIGHLY compressed and therefore, HIGHLY UNREADABLE.
Editor Tools
The editor operates via a state-machine tool selector. Depending on the active tool, interactions with the SubViewport canvas will change.
- Select Tool (0): Select specific placed items to edit their properties via the side panel.
- Player Move Tool (1): Sets the
player_spawnVector2 position in the level data. - Tilemap Placement Tool (2): Allows drawing and erasing on either the Main Layer or the Background layer.
- Carrot Placement Tool (3): Places carrot collectables (saved to
carrot_locationsarray). - Collision Placement Tool (4): Defines deathzones and winzones.
- Coin Placement Tool (5): Adds coin collectables to the level.
- Enemy Placement Tool (6): Instantiates enemies at designated positions.
Environments
The editor supports injecting custom WorldEnvironments directly into the level. This alters lighting, backgrounds, and ambiance. This data is saved as an integer in which World of Wonders & this editor can refer to the correct environment using. The available options built into the resource loader are:
0- None / Default1- Lava2- Lava Dark3- Desert4- Ice5- Grass
Code Architecture
For contributors or advanced users, here is a brief overview of how the Editor's backend manages data, based on the internal GDScript files.
Global Systems (Autoloads)
- GlobalEditor (
Global - Editor.gd): Handles configuration loading/saving (config.ini), recent project arrays, and tracks cross-scene data likeloading_scene_next_scene. - GlobalProject (
Global - Projects.gd): Handles most project variables, along with saving & loading them. It stores arrays of custom types (e.g.,CarrotUpgradeData,WinzoneData) and handles the intricate compression formulas.
Tilemap Compression Protocol
To keep the `.wowlv` export files small, Godot object arrays are mapped into a PackedInt32Array. Every single tile takes up exactly 6 integers:
local_x: X coordinate in the grid.local_y: Y coordinate in the grid.source_id: The ID of the texture atlas.atlas_x: X coordinate on the sprite sheet.atlas_y: Y coordinate on the sprite sheet.alternative_tile: Flipping/Rotation data.
Editor - Loading Scene.gd. It purposely freezes the thread to securely load the .dat and .tlst files into the Global memory before allowing the viewport to initialize. Be careful when editing the sequence.