{"id":18660123,"url":"https://github.com/lafriks/go-tiled","last_synced_at":"2025-05-16T01:07:42.402Z","repository":{"id":41070618,"uuid":"80017307","full_name":"lafriks/go-tiled","owner":"lafriks","description":"Go library to parse Tiled map editor file format (TMX) and render map to image","archived":false,"fork":false,"pushed_at":"2025-01-07T10:25:31.000Z","size":951,"stargazers_count":215,"open_issues_count":14,"forks_count":46,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-08T12:07:45.940Z","etag":null,"topics":["go","golang","hacktoberfest","rendering-2d-graphics","tmx"],"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/lafriks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["lafriks"]}},"created_at":"2017-01-25T13:33:28.000Z","updated_at":"2025-03-26T07:56:36.000Z","dependencies_parsed_at":"2023-01-24T11:01:32.800Z","dependency_job_id":"dfb20c9a-189b-4dd4-b937-6da8b63958dc","html_url":"https://github.com/lafriks/go-tiled","commit_stats":{"total_commits":68,"total_committers":23,"mean_commits":"2.9565217391304346","dds":0.6029411764705883,"last_synced_commit":"76082c2c0de54c69bbf1816cffd6e5a3f98c919c"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lafriks%2Fgo-tiled","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lafriks%2Fgo-tiled/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lafriks%2Fgo-tiled/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lafriks%2Fgo-tiled/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lafriks","download_url":"https://codeload.github.com/lafriks/go-tiled/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448579,"owners_count":22072764,"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":["go","golang","hacktoberfest","rendering-2d-graphics","tmx"],"created_at":"2024-11-07T07:39:14.132Z","updated_at":"2025-05-16T01:07:37.393Z","avatar_url":"https://github.com/lafriks.png","language":"Go","funding_links":["https://github.com/sponsors/lafriks"],"categories":["Go"],"sub_categories":[],"readme":"# go-tiled\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/lafriks/go-tiled)](https://pkg.go.dev/github.com/lafriks/go-tiled)\n[![Build Status](https://cloud.drone.io/api/badges/lafriks/go-tiled/status.svg?ref=refs/heads/master)](https://cloud.drone.io/lafriks/go-tiled)\n\nGo library to parse Tiled map editor file format (TMX) and render map to image. Currently supports only orthogonal finite maps rendering out-of-the-box.\n\n## Installing\n\n```sh\ngo get github.com/lafriks/go-tiled\n```\n\nYou can use `go get -u` to update the package. You can also just import and start using the package directly if you're using Go modules, and Go will then download the package on first compilation.\n\n## Basic Usage\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"os\"\n\n    \"github.com/lafriks/go-tiled\"\n    \"github.com/lafriks/go-tiled/render\"\n)\n\nconst mapPath = \"maps/map.tmx\" // Path to your Tiled Map.\n\nfunc main() {\n    // Parse .tmx file.\n    gameMap, err := tiled.LoadFile(mapPath)\n    if err != nil {\n        fmt.Printf(\"error parsing map: %s\", err.Error())\n        os.Exit(2)\n    }\n\n    fmt.Println(gameMap)\n\n    // You can also render the map to an in-memory image for direct\n    // use with the default Renderer, or by making your own.\n    renderer, err := render.NewRenderer(gameMap)\n    if err != nil {\n        fmt.Printf(\"map unsupported for rendering: %s\", err.Error())\n        os.Exit(2)\n    }\n\n    // Render just layer 0 to the Renderer.\n    err = renderer.RenderLayer(0)\n    if err != nil {\n        fmt.Printf(\"layer unsupported for rendering: %s\", err.Error())\n        os.Exit(2)\n    }\n\n    // Get a reference to the Renderer's output, an image.NRGBA struct.\n    img := renderer.Result\n\n    // Clear the render result after copying the output if separation of\n    // layers is desired.\n    renderer.Clear()\n\n    // And so on. You can also export the image to a file by using the\n    // Renderer's Save functions.\n}\n```\n\n## Documentation\n\nFor further documentation, see \u003chttps://pkg.go.dev/github.com/lafriks/go-tiled\u003e or run:\n\n```sh\ngodoc github.com/lafriks/go-tiled\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flafriks%2Fgo-tiled","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flafriks%2Fgo-tiled","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flafriks%2Fgo-tiled/lists"}