Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Tilekit

A tilemap editor centered around pattern-based auto tiling 路 By rxi

Export

A topic by nealc created Jun 27, 2020 Views: 1,161 Replies: 5
Viewing posts 1 to 4
(+2)

Like the concept of the tool. Could save some time.

Still needs some polish and Export needs to be able to automatically export to popular game engines (ie. Gamemaker2, Unity etc)

(+3)

if native exporting to game engines is added I would like to see Godot as an option

(1 edit) (+2)

I second that and would appreciate it if it could support export to Godot Engine out of the box. 

Thumbs up for what looks to be a great tool 馃憤

(1 edit)

So i know this is not a new topic but im working on a game in Godot too and want to use your editor to create the tilemap. Even tho there are ways to port your maps to godot by exporting it to tiled format and than using different options ( tiled importer plugin in godot or godot tscn export plugin for tiled) none of them works in a usefull way. While the godot importer plugin just creates editor crashing bugs (if you try to open the tileset to add light occluders it just crashes the editor) and when using the tiled export plugin you get random errors too. Even tho coding a converter myself would be an option i basicly choose your tool to reduce the work not to start new projects myself. I think your tool is a great thing, but without proper exports for Godot/etc its sadly not really usefull for productive work.

Since there was no further response by the creator i coded my own basic export/transform script for Tilekit to Godot scene in PHP. You need php 7.4+ cli installed to use it. The script can be found at
https://github.com/voodooEntity/tilekit2godot
If you need specific changes please just fork it and adjust it there. I'll not provide big updates or specific feature wishes. Only posting this to help others in the same situation as me to maybe have a starting point or inspiration.

I was using App Game Kit (Studio) and it does support JSON. To import the exported tilemaps it took not very long. If your engine supports basic Sprite- and Image- handling and does understand JSON type structures it could be done in minutes or some hours, but less than half a day. Depends what your needs are.

Basic: Source code in App Game Kit for loading the map:

Type TileKit_JSON_Type

    map as TileKit_Map_Type

EndType

Type TileKit_Map_Type

    tile_w as integer

    tile_h as integer

    tile_spacing as integer

    image_filename as string // name of the texture-atlas

    animations as TileKit_Animation_Type[]

    tags as string[]

    w as integer

    h as integer

    data as integer[] // most important contains ids of the tiles from the texture-atlas

    objects as TileKit_Object_Type[]

EndType

Type TileKit_Object_Type

       name as string

      id as string

      x as integer

      y as integer

      w as integer

      h as integer

      color as string            

EndType

Type TileKit_Animation_Type

    idx as integer

    rate as integer

    frames as integer[] // array of index-ids of the tile-texture-atlas
EndType

// ------------------------- Function to load that Type into your engine itself -----

Function xb_LoadTileKit_JSON(name$)

    tk_map as TileKit_JSON_Type

    file = OpenToRead(name$)

    json$ = ReadLine(file)

    CloseFile(file)

    tk_map.FromJSON(json$)      

EndFunction tk_map