OpenSpace logo

Overview » Map editing

OpenSpace features a great tool for map designers, the OpenSpace Editor, to create the isometric environments and all the assets they contain. Additionally, starting from OpenSpace v2, players can customize maps at runtime by dragging items from an inventory to the map directly.

The OpenSpace Editor

The OpenSpace Editor is a desktop application designed to build the virtual environments that OpenSpace will render and make interactive at runtime.

The main features of the Editor are:

  • multiple projects management: create, save and open different projects;
  • virtual world global configuration: set the tile size, the tile aspect ratio and other parameters common to all the maps belonging to the same project;
  • multiple skin and background libraries management, with skins auto-generation from SWF files;
  • tiles and supertiles editing to build a library of reusable assets for maps construction;
  • backgrounds and foregrounds editing;
  • maps editing, with tiles and supertiles drag&drop, smart base grid-filling and more;
  • skin and tile events triggers definition, to make the map "react" to user interaction;
  • full management of maps and assets libraries;
  • inventory items creation, with custom properties definition;
  • optimized maps, library and inventory files exporting using JSON, to keep a reduced size and still have a fully human-readable protocol.

Read the OpenSpace Editor manual for more informations.

Runtime map editing

Starting from OpenSpace v2, players can edit maps at runtime by dragging and dropping items from an external inventory, allowing the creation of customizable user homes*. Drag operations are handled by OpenSpace directly, without requesting additional coding to the developers.

An high degree of customization is offered in the map editing interaction and inventory items handling:

  • fully customizable map item selection highlighter; when a map item is selected, its data is passed to the selection highlighter class, allowing showing additional custom informations;
  • tiles can be flagged inside the Editor so that they do not accept a drop action, in order to avoid incongruent stacking of items (for example a table above a lamp);
  • during drap&drop operations, tiles give a visual feedback highlighting areas where drop is allowed or not; highlight color and alpha values can be customized according to the application style.

Runtime map editing is tightly integrated with the OpenSpace inventory system described next.

The inventory system

In order to allow runtime map editing, OpenSpace implements an internal inventory system. A specific section of the OpenSpace Editor is available to create the inventory of items that players will be able to place on the maps at runtime. Also, dedicated APIs allow developers to retrieve the inventory at runtime in order to display it in the preferred way**.

The inventory is managed by the OpenSpace server-side extension which sends it to the client when requested through the OpenSpace APIs. The main features of the inventory system are:

  • up to eight tiles (or supertiles) can be combined in one single inventory item in order to allow items rotation during runtime map editing***;
  • additional custom properties can be defined inside the Editor, to be associated with the items (for example the item category, name, price, etc) to categoryze them and later filter them (for example to show the player the items he/she purchased only);
  • custom parameters can be passed to the server-side extension when requesting the inventory, so that a user-specific filtering can be applied before the extension sends back the inventory to the client;
  • additional custom properties can be associated with the inventory items in the server-side extension at runtime, before the inventory is sent to the client;
  • the inventory can be loaded independently of the currently loaded map, to be used in different scenarios not strictly related to map editing (for example an in-game shop where items can be purchased).

* Realtime map editing (each single map change immediately shows up on the other clients, without the need to reload) is not supported. Users have to enter EDIT MODE to make changes to the current map. When entering EDIT MODE, standard user interaction is disabled and avatars are removed from the scene. When EDIT MODE is left, map changes (if any) are submitted to the OpenSpace server-side extension which takes care of saving them and sending a notifications to the clients connected to the SmartFoxServer room linked to that map. These clients allow normal map interaction until the map update notification is received, in which case the map must be reloaded to get the latest version.

** An inventory is strictly related to the maps belonging to the same OpenSpace Editor project, because they share the same skin/tiles/supertiles assets library. This means that maps editable at runtime and the inventory of items that can be placed on those maps must be defined inside the same Editor project.

*** Rotation is not available for items already placed on the map; the required rotation angle must be selected before dragging the item on the map.