GithubHelp home page GithubHelp logo

dandeliondino / terrain-autotiler Goto Github PK

View Code? Open in Web Editor NEW
51.0 7.0 2.0 156 KB

An advanced terrain tile matching algorithm for Godot 4.

License: MIT License

GDScript 100.00%
godot autotile godot-4 godot-addon godot-plugin godot4

terrain-autotiler's Introduction

Terrain Autotiler

Note: As of 4/2024, this repo is no longer being actively maintained.

Terrain Autotiler is a replacement terrain tile matching algorithm for Godot 4. It was designed for accurate, deterministic results in player-facing situations such as procedural generation and tile-based games. It is fully compatible with Godot 4 TileSets without any additional setup, but also brings back optional features from Godot 3, such as ignore bits and merging autotiles.

Painting with the editor

Update Button

Toggle on Terrain Autotiler Tools

Draw mode

Features

Core

  • A more accurate and deterministic terrain tile matching algorithm. It fixes multiple open issues. (While it is not fast, it is usually a bit faster than the engine.)
  • Fully compatible with the Godot 4 terrains system. No additional setup is required.
  • Brings back compatible Godot 3 features:

Scripting

  • Create a new Autotiler object using Autotiler.new(tile_map), then use it to access terrain tile placement functions. Contains complete in-editor documentation.
    • set_cells_terrain_connect and set_cells_terrain_path work the same as their base TileMap functions, but provide more accurate, reproducible results.
    • set_cells_terrains places multiple terrains by providing dictionary of {coords (Vector2i) : terrain (int)}. This makes bulk updates in procedural generation faster and simpler.
    • update_terrain_tiles recalculates and updates all the terrain tiles in a layer.

Editor Plugin

  • TileMap editor: Toggle seamlessly between Godot 4 and Terrain Autotiler painting tools in the Terrains tab.
    • Paint in real time with a more accurate Draw mode.
    • Lock individual cells to prevent tiles from being updated (useful for preserving Path mode painting).
    • Error notifications appear in real-time while painting to assist in identifying issues such as missing tiles.
    • Open the debug panel to view detailed data for troubleshooting and bug reports.
    • Note: The editor plugin is a work in progress. Notably, it is missing the option to paint specific individual tiles as well as non-contiguous mode for bucket fill. Toggle off the Terrain Autotiler tools to access these base Godot 4 editor features instead.
  • TileSet inspector: Set up advanced features such as "Full" Corners and Sides matching mode, @ignore terrains and custom primary peering terrains.
  • Includes minor editor bug fixes and UX improvements
    • Selecting a TileMap in the scene tree always opens the bottom TileMap editor (rather than sometimes opening the TileSet editor instead)
    • Coordinates and current tool information appear when hovering over cells
    • More obvious visual feedback when painting with terrain tools
    • Bucket tool fills all adjacent tiles of the same terrain, even if the tiles are not identical.

Installation

Github

  1. Download the latest version from Releases.
  2. Unzip and move the addons/terrain_autotiler folder to the project.
  3. Go to Project Settings -> Plugins and enable Terrain Autotiler.

Uninstallation

  1. Go to Project Settings -> Plugins and disable Terrain Autotiler.
  2. Delete the addons/terrain_autotiler folder from the project.
  3. (optional) Open the TileMap and TileSet inspectors for your scenes and delete the "terrain_autotiler" metadata.

Acknowledgements

License

  • Terrain Autotiler is Copyright (c) 2023 dandeliondino (MIT license)
  • Godot Engine is Copyright (c) 2014-present Godot Engine contributors (MIT license)

terrain-autotiler's People

Contributors

dandeliondino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.