{"id":49453267,"url":"https://github.com/katharostech/bevy_ldtk","last_synced_at":"2026-05-16T16:00:57.227Z","repository":{"id":52781259,"uuid":"326502523","full_name":"katharostech/bevy_ldtk","owner":"katharostech","description":"A Bevy plugin for loading the LDtk 2D tile map format.","archived":true,"fork":false,"pushed_at":"2021-08-09T21:50:38.000Z","size":317,"stargazers_count":24,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-10T18:26:55.830Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/katharostech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-03T21:18:10.000Z","updated_at":"2025-02-07T19:23:14.000Z","dependencies_parsed_at":"2022-08-22T21:21:19.691Z","dependency_job_id":null,"html_url":"https://github.com/katharostech/bevy_ldtk","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/katharostech/bevy_ldtk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fbevy_ldtk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fbevy_ldtk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fbevy_ldtk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fbevy_ldtk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katharostech","download_url":"https://codeload.github.com/katharostech/bevy_ldtk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fbevy_ldtk/sbom","scorecard":{"id":551603,"data":{"date":"2025-08-11","repo":{"name":"github.com/katharostech/bevy_ldtk","commit":"440d815b7f2f4285e8b68084c1e2a2d01babedd6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T11:02:24.133Z","repository_id":52781259,"created_at":"2025-08-20T11:02:24.133Z","updated_at":"2025-08-20T11:02:24.133Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33109461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["rust"],"created_at":"2026-04-30T04:01:02.091Z","updated_at":"2026-05-16T16:00:57.219Z","avatar_url":"https://github.com/katharostech.png","language":"Rust","funding_links":[],"categories":["Plugins and Crates"],"sub_categories":["2D"],"readme":"# bevy_ldtk\n\n[![Crates.io](https://img.shields.io/crates/v/bevy_ldtk.svg)](https://crates.io/crates/bevy_ldtk)\n[![Docs.rs](https://docs.rs/bevy_ldtk/badge.svg)](https://docs.rs/bevy_ldtk)\n[![Katharos License](https://img.shields.io/badge/License-Katharos-blue)](https://github.com/katharostech/katharos-license)\n\n![screenshot](./doc/screenshot.png)\n\n_( Tileset from [\"Cavernas\"] by Adam Saltsman  )_\n\n[\"Cavernas\"]: https://adamatomic.itch.io/cavernas\n\nA [Bevy] plugin for loading [LDtk] tile maps.\n\n[ldtk]: https://github.com/deepnight/ldtk\n\n[bevy]: https://bevyengine.org\n\n\u003e **🚧 Maintenance Note:** This library has been merged into [Bevy Retrograde][bevy_retro]. With Bevy Retrograde [migrating] to Bevy's renderer, the plugin will be usable with out-of-the-box Bevy and will not require using with the rest of Bevy Retrograde if all you want is map loading. Updates will now be made in the Bevy Retrograde repository instead of here.\n\u003e \n\u003e The next published release of Bevy LDtk that is compatible with Bevy's renderer should be made after Bevy 0.6 comes out.\n\n[migrating]: https://github.com/katharostech/bevy_retrograde/issues/41\n[bevy_retro]: https://github.com/katharostech/bevy_retrograde\n\n## License\n\nBevy LDtk is licensed under the [Katharos License][k_license] which places certain restrictions\non what you are allowed to use it for. Please read and understand the terms before using Bevy\nLDtk for your project.\n\n[k_license]: https://github.com/katharostech/katharos-license\n\n## Usage\n\n```rust\nuse bevy::prelude::*;\nuse bevy_ldtk::*;\n\nfn main() {\n    App::build()\n        .add_plugins(DefaultPlugins)\n        .add_plugin(LdtkPlugin)\n        .add_startup_system(setup.system())\n        .run();\n}\n\nfn setup(mut commands: Commands, asset_server: Res\u003cAssetServer\u003e) {\n    // Enable hot reload\n    asset_server.watch_for_changes().unwrap();\n\n    commands\n        // Spawn the map\n        .spawn()\n        .insert_bundle(LdtkMapBundle {\n            map: asset_server.load(\"map1.ldtk\"),\n            config: LdtkMapConfig {\n                set_clear_color: true,\n                scale: 1.0,\n                level: std::env::args()\n                    .nth(2)\n                    .map(|x| x.parse().unwrap())\n                    .unwrap_or(0),\n                center_map: false,\n            },\n            ..Default::default()\n        });\n\n    // And the camera\n    commands\n        .spawn()\n        .insert_bundle(OrthographicCameraBundle::new_2d());\n}\n```\n\n### Layers\n\nWhen the map layers are spawned, the bottommost layer is spawned at the transform coordinate of\nthe `LdtkMapBundle`'s `Transform` component. Each layer after the bottom layer is placed one\nunit higher on the Z axis. To have your sprites for players, etc. appear on top of the rendered\nmap, their Z axis translation must be higher than the map transform + the layer number that you\nwant it to appear above.\n\n### LDtk Versions\n\n| LDtk Version | Plugin Version |\n| ------------ | ---------------|\n| 0.8.1        | 0.4, 0.5       |\n| 0.7.0        | 0.2, 0.3       |\n\n### Bevy Versions\n\n| Bevy Version | Plugin Version                                      |\n| ------------ | --------------------------------------------------- |\n| 0.4          | 0.2, 0.3, 0.4                                       |\n| 0.5          | 0.5                                                 |\n| master       | not officially supported, but it might work         |\n\n## Features\n\n- An efficient renderer that only uses 4 vertices per map layer and lays out tiles on the GPU\n- Supports hot reload through the Bevy asset server integration\n- Heavily commented code to help others who want to see how to make their own tilemap renderers.\n\n## Caveats\n\nThe plugin is in relatively early stages, but it is still rather functional for many basic maps\n\n- Many features are not supported yet, including:\n  - tilesets with spacing in them\n  - levels in separate files\n- Occasionally some slight rendering artifacts between tiles. ( [#1] ) Not sure what causes\n  those yet. Help from anybody with rendering experience would be greatly appreciated!\n\n### Extracting Map Information\n\nYou can extract any information necessary for your game from the LDtk JSON map data. Here is an example showing how you could spawn a player.\n\n```rust\nfn spawn_player(\n    mut commands: Commands,\n    printed_maps: Local\u003cVec\u003cEntity\u003e\u003e,\n    query: Query\u003c(Entity, \u0026Handle\u003cLdtkMap\u003e)\u003e,\n    map_assets: Res\u003cAssets\u003cLdtkMap\u003e\u003e,\n    asset_server: Res\u003cAssetServer\u003e,\n    mut color_materials: ResMut\u003cAssets\u003cColorMaterial\u003e\u003e,\n) {\n    for (ent, handle) in query.iter() {\n        // Skip any maps we have already printed the spawn location for\n        if printed_maps.contains(\u0026ent) {\n            continue;\n        }\n\n        // If the map asset has finished loading\n        if let Some(map) = map_assets.get(handle) {\n            // This is the default level, but if you spawned a different level, put that ID here\n            let level_idx = 0;\n\n            // Get the level from the project\n            let level = \u0026map.project.levels[level_idx];\n\n            // Find the entities layer\n            let entities_layer = level\n                .layer_instances\n                .as_ref() // get a reference to the layer instances\n                .unwrap() // Unwrap the option ( this could be None, if there are no layers )\n                .iter() // Iterate over the layers\n                .filter(|\u0026x| x.__identifier == \"Entities\") // Filter on the name of the layer\n                .next() // Get it\n                .unwrap(); // Unwrap it ( would be None if it could not find a layer \"MyEntities\" )\n\n            // Get the specific entity you want\n            let player_start = entities_layer\n                .entity_instances\n                .iter() // Iterate over our entities in the layer\n                .filter(|x| x.__identifier == \"Player_Spawn\") // Find the one we want\n                .next() // Get it\n                .unwrap(); // Unwrap it\n\n            // Get the number of layers in the map and add one to it: this is how high we need to\n            // spawn the player so that he is on top of all the maps\n            let player_z = level.layer_instances.as_ref().unwrap().len() as f32 + 1.0;\n\n            // Spawn the entity!\n            commands.spawn().insert_bundle(SpriteBundle {\n                // Set your sprite stuff\n                transform: Transform::from_xyz(\n                    // The player x position is the entity's x position from the map data\n                    player_start.px[0] as f32,\n                    // The player y position is the entity's y position from the map data, but\n                    // multiplied by negative one because in the LDtk map +y means down and not up.\n                    player_start.px[1] as f32 * -1.0,\n                    // Spawn the player with the z value we determined earlier\n                    player_z,\n                ),\n                material: color_materials.add(ColorMaterial {\n                    texture: Some(asset_server.load(\"character.png\")),\n                    ..Default::default()\n                }),\n                ..Default::default()\n            });\n        }\n    }\n}\n```\n\n[#1]: https://github.com/katharostech/bevy_ldtk/issues/1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatharostech%2Fbevy_ldtk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatharostech%2Fbevy_ldtk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatharostech%2Fbevy_ldtk/lists"}