Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

arcaneenergy/tilemap-level-editor

Repository files navigation

Tilemap Level Editor (Archived)

Banner

Simple level editor for Godot with JSON export functionality. Made with Godot.

ko-fi


Download

Download the exported program on itch.io.

itch.io download link

Video

Use case

This is currently used in a personal project. It's used to load in JSON files into Godot to recreate the levels at runtime. The exported JSON file contains all levels and individual cells. This makes it easy to recreate the level in Godot.

Alternatively, you can use this program to easily create levels in the editor.

Controls

Placement:

  • Left click: Place tile (if selected)
  • Right click: Delete tile

Other:

  • TAB: Toggle GUI
  • SHIFT + Scroll up: Increase brush size
  • SHIFT + Scroll down: Decrease brush size

Camera:

  • Middle mouse drag: Drag camera around
  • W / ↑: Move camera up
  • S / ↓: Move camera down
  • A / ←: Move camera left
  • D / →: Move camera right
  • Mouse scroll up: Zoom in
  • Mouse scroll down: Zoom out

UI Overview

Create new layers with the + New Layer button. This brings up a dialog box for selecting an image file. After selecting a file, the new layer appears in the list.

Switch between layers by pressing the arrow to the left of the layer. This will open the tileset on the left. Use the up and down arrow keys to move layers.

Screenshot 1

Select a tile and start drawing.

Screenshot 2

Change the size and shape of the cursor using the buttons in the lower right corner.

Screenshot 3

Exported JSON file

The exported JSON file might look like this:

{
    "layers": [
        {
            "texture_path": "C:/tilemap-level-editor/test/tileset.png",
            "cells": [
                [
                    4,
                    -5,
                    -3
                ],
            ]
        }
    ],
    "objects": [
        {
            "key": "player",
            "position": [
                2,
                4
            ]
        }
    ]
}

Each cell contains an ID, an x and a y position. The ID is used to identify which cell in the tileset it refers to.

Problems

  • Currently the program only supports tiles of 16x16 size. The spritesheet needs to be divisible by 16 (16, 32, 48, 64 etc.)
  • Exported texture paths are absolute.

Godot_v3.5-rc2

About

A simple tilemap level editor with export capability. Made for the Godot game engine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published