GSoC project: Tiled compatibility support Enigma

Reporter: KartikShrivastava  |  Status: open  |  Last Modified: September 08, 2022, 10:14:35 am
### In A Nutshell - This project implements two importers: .tmx/.tsx file importers in RadialGM and .egm file importer in Tiled

My GSoC project spans into three PRs in three different projects of two separate organizations. The two organizations involved are Enigma-dev and Tiled. fundies and Josh are my mentors from Enigma-dev and bjorn is my mentor from Tiled.

Requirement: You have to use Arch linux OS specifically, as Enigma-dev's RadialGM only compiles in Arch linux at the time of writing these steps. Compiling RadialGM can be tough, so feel free to ping in enigma-dev discord server.

Steps to test the project:

  1. Compile Enigma-dev's RadialGM project and Tiled projects. (Note that Enigma-dev's enigma-dev project is a submodule of RadialGM so it gets included with RadialGM)
  2. Open terminal and change directory to RadialGM, checkout to PR #228
  3. Change directory to RadialGM/Submodules/enigma-dev, checkout to PR #2302
  4. Setup a system environment variable named ENIGMA_PATH and set its value to RadialGM/Submodules/enigma-dev. This path will be used by Tiled editor's "enigma" plugin.
  5. Change directory to Tiled, checkout to PR #3435
  6. Compile RadialGM and Tiled projects separately
  7. Run RadialGM project to open RadialGM editor, test the TMX importer by importing some .tmx file
  8. Run Tiled project to open Tiled editor, enable "enigma" plugin by checking it in Edit-Preferences-Plugins tab and finally test the EGM importer by importing some .egm file

Short demo video of the final outcome:
Weekly project work logs:

Completed list of tasks in GSoC coding period:

Tiled TMX and TSX importer support status in RadialGM and enigma-dev:

  • Import individual TSX files
  • Replicate TSX Tileset to EGM Background
  • Import TMX file with external tileset
  • Replicate TMX Map to EGM Room
  • Replicate TMX object to EGM Room.tiles
  • Rotation, tint, horizontal/vertical flip and background color support
  • Import TMX file with internal tileset
  • Import TMX file with base64 zlib compressed tile data
  • Replicate TMX layer data to EGM Room.tiles
  • Import TMX file with base64 gzip compressed tile data
  • Import TMX file with base64 zstd compressed tile data
  • Import TMX file with CSV tile data
  • Add hexagonal map support
  • Add isometric map support
  • Add staggered isometric map support
  • Separate existing Room.proto into GameMaker based GMRoom.proto and EGM+Tiled based EGMRoom.proto
  • Add Tiled specific ObjectGroup, TileLayer and Tilesets in EGMRoom.proto
  • Update RoomView to support newly added fields of ObjectGroup, TileLayer
  • Add "merge" tmx project into egm project functionality
  • Add gtest for testing ObjectGroups correctness for importer .tmx file

Enigma's EGM importer support status in Tiled:

  • Add enigma plugin in Tiled
  • Update enigma plugin to depend on libEGM using qbs module
  • Add functionality to parse .egm file into protocol buffer
  • Add functionality to create a Tiled map using .egm based protocol buffer

Follow-up list of subtasks after GSoC:

  • Replicate Tiled animated tiles in RadialGM editor renderer and engine
  • Add parallax effect
  • Add more gtests
  • Add proper separation of GameMaker resources between EGMRoom.proto and GMRoom.proto
  • Add translation routine to convert GMRoom to EGMRoom, after loading GameMaker based formats in GMRoom
  • Add support to wangsets in TMX importer
  • Add support to missing features of internal tileset in EGMRoom
  • Add support to rest of missing TMX features in EGMRoom (needs updates in RadialGM renderer and enigma enigne)
  • Fix Tiled ci which is breaking due to missing libEGM headers

Codecov Report

Merging #2302 (82cc729) into master (2ddad07) will increase coverage by 0.26%.
The diff coverage is n/a.

Current head 82cc729 differs from pull request most recent head d7f0d50. Consider uploading reports for the commit d7f0d50 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2302      +/-   ##
+ Coverage   35.27%   35.54%   +0.26%     
  Files         213      215       +2     
  Lines       20474    20498      +24     
+ Hits         7223     7286      +63     
+ Misses      13251    13212      -39     
Impacted Files Coverage Δ
.../Universal_System/Instances/instance_system_base.h 100.00% <0.00%> (ø)
...ELL/Universal_System/Instances/instance_iterator.h 100.00% <0.00%> (ø)
ENIGMAsystem/SHELL/Universal_System/var4.h 88.31% <0.00%> (+0.52%) ⬆️
ENIGMAsystem/SHELL/Platforms/General/PFmain.cpp 82.14% <0.00%> (+0.89%) ⬆️
...MAsystem/SHELL/Graphics_Systems/General/GSfont.cpp 3.27% <0.00%> (+3.15%) ⬆️
...em/SHELL/Universal_System/Resources/fontstruct.cpp 3.28% <0.00%> (+3.28%) ⬆️
...ELL/Universal_System/Instances/instance_system.cpp 67.95% <0.00%> (+6.62%) ⬆️
ENIGMAsystem/SHELL/Universal_System/actions.h 20.00% <0.00%> (+8.23%) ⬆️
...GMAsystem/SHELL/Graphics_Systems/General/actions.h 10.00% <0.00%> (+10.00%) ⬆️
.../SHELL/Universal_System/Resources/fonts_internal.h 30.00% <0.00%> (+10.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ddad07...d7f0d50. Read the comment docs.

Please sign in to post comments, or you can view this issue on GitHub.