First of all hello, and congratulations on the fantastic work you did with this editor! I am new and so far took a brief look, to get an idea on what features it has and what it can do. But onto my question:
I’ve been looking for an easy way to create open-source 2D games (such as an RPG or side-scroller or point-and-click), preferably in HTML5 or a standalone script language like Python. I found several such engines which support Tiled maps. However they all require you to script most logics for your game manually: You must call your own functions to load the scene, manually define all enemies and items, etc. I know a bit of programming and a bit more scripting, so writing a few functions is doable… but also a time consuming and tiring process, which means less time to make games or detail them. I prefer SDK’s where you can do everything from a window and by using menus, and scripting is optional or only needed for extra functionality… such as RPG Maker, Blender Game Engine, Unity, or OHRRPGCE. So I was wondering whether there is a way to use Tiled as not just a map editor, but a full game SDK.
Yes: I know that Tiled is intended to be a map editor only, and not a complete game maker! It doesn’t even have menus for setting up advanced actions and triggers, nor can it run any games by itself. It does however have a powerful ability which would allow it to define entire games: You can create and place objects on your map, and these objects may contain custom properties. These could be used to indicate what each object’s role is, contain modifiable values, or even address script functions from the engine of choice. An engine intended for this purpose could simply read the map and determine what everything is supposed to do.
Example: You add an object with the player sprite to your map. Then you give this object a custom property called ‘function’ with the value ‘set_player()’. You then add another property called ‘movement_speed’ with the value ‘4’. Next you export your map to a tmx file and run it through the game engine. The engine sees the ‘function’ property and executes the builtin function ‘set_player’ on the object, which configures it to act like a player (move with the arrow keys, have the camera centered on it, etc). It next looks for the value of the ‘movement_speed’ property to determine how fast the player walks, and in this case finds ‘4’. Congratulations, you can now walk around the map as a character! Needless to say this is a very simplistic example, and there would be a LOT more to have in these functions to setup a functional game… not to mention defining enemies, items (weapons and armor and health), triggers to change the map, etc.
So are there any game engines that can do this, and allow values or functions to be directly specified in Tiled without having to create any custom script to write the game? It would be very convenient if entire games could be exported as just a series of tmx files this way (accompanied by their graphics and sounds), and to play them you only execute the first tmx.