Tiled and AGS

Started by eri0o, Tue 03/12/2019 22:13:35

Previous topic - Next topic

eri0o

Hey, just curious if someone ever looked into this.

Tiled is a map editor that is free and open source, and available here: thorbjorn.itch.io/tiled

The only hack I know is using a tileset like this.
mask_blocks.tsx
Code: xml

<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.2" tiledversion="1.2.1" name="mask_blocks" tilewidth="16" tileheight="16" tilecount="5" columns="5">
 <image source="mask_tileset.png" width="80" height="16"/>
</tileset>


mask_tileset.png


And then loading it on Tiled and using it to draw the walkable areas in your map (click to expand image)



And later exporting the layers as images and importing the masks drawn there (in the example, walkable areas)

Tiled though has some other useful stuff, like drawing polygons and creating points that can have special means - these are particularly useful.

Anyway curious if someone has ever looked into using Tiled and AGS and maybe even done some stuff with it.

Khris

I wrote something that is able to import Tiled iso maps: https://drive.google.com/file/d/1BA0jVNBVBwliroJHBtrJeAXeKxOLHUMd/view?usp=sharing
(source for 3.4.0, WASD to move the character)

It includes a basic XML parser. The iso graphics required depth tiles because I wanted the character to be able to freely walk about. It's a mess though, and I abandoned it :)

[imgzoom]https://i.imgur.com/eQErwIW.png[/imgzoom]

eri0o

Wait , you wrote a xml parser in AGS Script? :O

(The script is not packed in the rar)

abstauber

I also experimented with importing files from external tile editors, but I learned that loading a complex map took up to 20 seconds with 100% CPU utilisation. So I wrote an exporter for Mappy to create binary files. Reading binaries just look a fraction of a second.

In the long run I ended up creating my own map editor in AGS script. And of course I ran out of time with my platformer project ;)

Khris

It's in there, just not as separate module. It's XMLParse.ash/c in the main folder (and part of the game).

I never made any speed tests but my map isn't that complex, it has only 6kb.

SMF spam blocked by CleanTalk