{"id":21473613,"url":"https://github.com/lucasepe/tiles","last_synced_at":"2025-07-15T08:32:27.074Z","repository":{"id":57550555,"uuid":"290787201","full_name":"lucasepe/tiles","owner":"lucasepe","description":"Commandline tool that makes building tilesets and rendering static tilemaps super easy!","archived":false,"fork":false,"pushed_at":"2020-08-27T13:55:23.000Z","size":997,"stargazers_count":52,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T09:17:30.005Z","etag":null,"topics":["architecture-visualization","commandline","golang","tilemap","tilesets"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucasepe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-27T13:46:33.000Z","updated_at":"2024-01-16T22:50:17.000Z","dependencies_parsed_at":"2022-08-29T22:31:03.891Z","dependency_job_id":null,"html_url":"https://github.com/lucasepe/tiles","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Ftiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Ftiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Ftiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Ftiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasepe","download_url":"https://codeload.github.com/lucasepe/tiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226027899,"owners_count":17562156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture-visualization","commandline","golang","tilemap","tilesets"],"created_at":"2024-11-23T10:18:00.912Z","updated_at":"2024-11-23T10:18:01.624Z","avatar_url":"https://github.com/lucasepe.png","language":"Go","readme":"\n# **Tiles**\n\n\u003e Commandline tool that makes building tilesets and rendering static tilemaps super easy!\n\n**Features**\n\n- create your own tilesets _\"libraries\"_ (ready to reuse)\n- inspect, list and extract tiles from tilesets\n- define a tilemap using one or more tileset\n- render a tilemap as PNG images\n- eventually add a watermark to the tilemap\n\n![](./banner.png)\n\n### Overview\n\nTilemaps are a very popular technique in 2D game development, consisting of building the game world or level map out of small, regular-shaped images called tiles.\n\nThe most efficient way to store the tile images is in an atlas or tileset \n\n- all of the required tiles grouped together in a single image file\n\nWhen it's time to draw a tile, only a small section of this bigger image is rendered on the grid.\n\n#### Static square tilemaps\n\nSquare-based tilemaps are the most simple implementation for two perspectives:\n\n- top-down (like many RPG's or strategy games)\n- side-view (like platformers such as Super Mario Bros)\n- architecture diagrams...why not!? 😏\n\n# How to use **tiles**\n\n## All available commands\n\n```bash\ntiles --help\n```\n\n## Generate a tileset\n\nLet's say you have all your PNG images (square in size, 96x96 for example) in one folder and you want to create a new tileset:\n\n```bash\ntiles compose /path/to/png/images/\n```\n\nBy default the generated tileset (it's a YAML) is printed on the terminal. If you want to save the result to a file you can redirect `\u003e` the output:\n\n```bash\ntiles compose /path/to/png/images/ \u003e my_tileset.yml\n```\n\n### Ready-To-Use tilesets\n\n| Set                    | URL                                                      |\n|:-----------------------|:---------------------------------------------------------|\n| AWS Icons              | [./examples/aws_tileset.yml](./examples/aws_tileset.yml) |\n| Arrows and Connectors  | [./examples/links_tileset.yml](./examples/links_tileset.yml) |\n\n\n## Lists all tiles identifiers contained in the specified tilset\n\n```bash\ntiles list /path/to/my_tileset.yml\n```\n\n## Extracts the tile PNG with the specified identifier from the tileset\n\n```bash\ntiles  pull --id aws_waf ../examples/aws_tileset.yml\n```\n\nBy default the PNG data is dumped on the terminal. If you want to save the result to a file you can redirect `\u003e` the output:\n\n```bash\ntiles  pull --id aws_waf ../examples/aws_tileset.yml \u003e aws_waf.png\n```\n\n## Rendering a static tilemap\n\nThe first step is to create the static tilemap using the following YAML syntax:\n\n```yml\n# Nr. of Columns\ncols: 4\n# Nr. of Rows\nrows: 7\n# Tile size (Grid cell size)\ntile_size: 64\n# Canvas margin  (optional)\nmargin: 16\n# Canvas watermark (optional)\nwatermark: Draft\n# Canvas background color  (optional)\nbg_color: \"#ffffff\"\n# List of used tileset\natlas_list:\n  - ../examples/aws_tileset.yml\n  - ../examples/links_tileset.yml\n# Tiles mapping (associate an index to each tile)\nmapping:\n  1: aws_lambda\n  2: aws_elastic_container_service\n  3: aws_api_gateway\n  4: aws_rds_mysql_instance\n  5: aws_simple_storage_service_s3\n  6: aws_elasticache_for_redis\n  10: link_vertical\n  11: link_vertical_arrow_up\n  20: link_cross_arrow_left_up_down\n  30: link_horizontal\n  40: link_tee_right_arrow_up_down\n# Static map layout\nlayout: \u003e\n  0,5,0,0\n  4,20,30,2\n  0,6,0,11\n  0,0,0,10\n  0,1,0,10\n  0,40,30,3\n  0,1,0,0,0\n```\n\n👉 [examples/tilemap_demo_1.yml](./examples/tilemap_demo_1.yml).\n\nThen execute the _'render'_ command:\n\n```sh\ntiles render ./examples/tilemap_demo_1.yml \u003e ./examples/tilemap_demo_1.png\n```\n\noutput:\n\n![](./examples/tilemap_demo_1.png)\n\n# Installation Steps\n\nTo build the binaries by yourself, assuming that you have Go installed, you need [GoReleaser](https://goreleaser.com/intro/).\n\nHere the steps:\n\n### Grab the source code\n\n```bash\ngit clone https://github.com/lucasepe/tiles.git\n```\n\n### Change dir to the tool folder\n\n```bash\ncd tiles/cli\n```\n\n### Run GoReleaser\n\n```bash\ngoreleaser --rm-dist --snapshot --skip-publish\n```\n\nyou will found the binaries for:\n\n- MacOS into the folder _dist/tiles_darwin_amd64/_\n- Linux into the folder _dist/tiles_linux_amd64/_\n- Windows into the folder _dist/tiles_windows_amd64/_\n\n## Ready-To-Use Releases \n\nIf you don't want to compile the sourcecode yourself, [Here you can find the tool already compiled](https://github.com/lucasepe/tiles/releases/latest) for:\n\n- MacOS\n- Linux\n- Windows\n\n---\n\n# CHANGE LOG\n\n👉 [Record of all notable changes made to a project](./CHANGELOG.md)\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasepe%2Ftiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasepe%2Ftiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasepe%2Ftiles/lists"}