{"id":15018032,"url":"https://github.com/seldom-se/seldom_pixel","last_synced_at":"2025-05-09T00:07:51.883Z","repository":{"id":62466143,"uuid":"560655596","full_name":"Seldom-SE/seldom_pixel","owner":"Seldom-SE","description":"Bevy plugin for limited color palette pixel art games","archived":false,"fork":false,"pushed_at":"2025-05-07T16:05:17.000Z","size":557,"stargazers_count":69,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T00:07:44.324Z","etag":null,"topics":["2d","bevy","bevy-engine","game-development","graphics","gui","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Seldom-SE.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2022-11-02T01:03:05.000Z","updated_at":"2025-05-07T16:05:21.000Z","dependencies_parsed_at":"2023-02-08T05:02:01.372Z","dependency_job_id":"f81227a9-b5b1-4a93-98b3-465d87107cae","html_url":"https://github.com/Seldom-SE/seldom_pixel","commit_stats":{"total_commits":61,"total_committers":4,"mean_commits":15.25,"dds":"0.21311475409836067","last_synced_commit":"9872fbe4ab7d08a1d5f85eb59201653b1d56c279"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Fseldom_pixel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Fseldom_pixel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Fseldom_pixel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seldom-SE%2Fseldom_pixel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seldom-SE","download_url":"https://codeload.github.com/Seldom-SE/seldom_pixel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166520,"owners_count":21864482,"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":["2d","bevy","bevy-engine","game-development","graphics","gui","rust"],"created_at":"2024-09-24T19:51:20.508Z","updated_at":"2025-05-09T00:07:51.874Z","avatar_url":"https://github.com/Seldom-SE.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `seldom_pixel`\n\n[![Crates.io](https://img.shields.io/crates/v/seldom_pixel.svg)](https://crates.io/crates/seldom_pixel)\n[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/Seldom-SE/seldom_pixel#license)\n[![Crates.io](https://img.shields.io/crates/d/seldom_pixel.svg)](https://crates.io/crates/seldom_pixel)\n\n`seldom_pixel` is a Bevy plugin for limited color palette pixel art games. It handles:\n\n- Sprites\n- Filters (defined through images; apply to layers or individual entities)\n- Simple UI (text, buttons, and sprites locked to the camera)\n- Tilemaps\n- Animations (for sprites, filters, tilesets, and text; supports dithering!)\n- Custom layers\n- Particles (with pre-simulation! Enable `particle` feature)\n- Palette changing\n- Typefaces\n- An in-game cursor\n- Camera\n- Lines (enable `line` feature)\n- And more to come!\n\nIt also features optional integration with:\n\n- `seldom_state` (for animation state machines; `state` feature)\n- `seldom_map_nav` (makes `SubPxPosition` implement `Position2`; `nav` feature)\n\nSee the `examples` directory for examples. If you need help, feel free to ping me\non [the Bevy Discord server](https://discord.com/invite/bevy) (`@Seldom`)! If any of the docs\nneed improvement, feel free to submit an issue or pr!\n\n## Philosophies\n\n- Assets are normal images\n\nAll assets, including filters, are loaded from images. `seldom_pixel`'s scope is limited\nto rendered things, so this doesn't apply to things like levels and sounds. I recommend\nfinding an art program you're comfortable with. Personally, I use [GIMP](https://www.gimp.org/),\nbut it can be difficult to figure out. I hear good things\nabout [Aseprite](https://github.com/aseprite/aseprite/), which you can use for free if you\ncan compile it. I've only used this plugin on `.png` files, so I recommend using that format,\nbut feel free to try it on other lossless formats.\n\n- What you see is what you get\n\nThis crate's position component, `PxPosition`, uses an `IVec2` (2-dimensional `i32` vector)\nto store positions. This means that entities are located at exact pixel positions.\nSo, if it looks like the player is up against a wall, or a projectile hit an enemy, then the game\nwill respond like that's true. There is also a `SubPxPosition` component, which uses a `Vec2`,\nfor features like movement and velocity. It automatically updates the `PxPosition` component,\nwhich I recommend using when possible. I also recommend resetting the `SubPxPosition`\nto `PxPosition`'s value when it stops moving, so moving objects feel consistent to the player.\nThis is less of a concern for games with smaller pixels.\n\n- Trade versatility for productivity\n\nIf you are already interested in making a limited color palette pixel art game,\nthis is an easy win for you. Filters in `seldom_pixel` are just maps from each color\nin the palette to another color in the palette. Filters like this would be difficult to create\nfor each of the 16,777,216 RGB colors, but `seldom_pixel` only allows up to 255 colors\nin your palette (and you will likely want to use fewer), so it's easy to create effects.\nThis also applies on the library-development end too. The limitations of `seldom_pixel` mean\nI only need to make its features work for 2D games that use bytes for pixels, so it's easier\nto develop and maintain. Anyway, limitations can incite creativity.\n\n## Future Work\n\n- [x] Advanced UI, good enough to build a UI library on\n- [ ] More advanced particle system\n- [x] More shape primitives\n- [ ] Spatial filters that can filter defined areas, and apply their animations over space\n      instead of time. For effects like lighting and bloom.\n- [x] Make the rendering happen in the render world\n\n## Usage\n\nAdd to your `Cargo.toml`\n\n```toml\n# Replace * with your desired version\n[dependencies]\nseldom_pixel = \"*\"\n```\n\nThen add `PxPlugin` to your app. Check out the examples for further usage.\n\n## Compatibility\n\n| Bevy | `seldom_state` | `seldom_map_nav` | `seldom_interop` | `bevy_ecs_tilemap` | `seldom_pixel` |\n| ---- | -------------- | ---------------- | ---------------- | ------------------ | -------------- |\n| 0.15 | 0.12           | 0.8              |                  |                    | 0.8            |\n| 0.14 | 0.11           | 0.7              |                  |                    | 0.7            |\n| 0.13 | 0.10           | 0.6              |                  |                    | 0.6            |\n| 0.12 | 0.9            |                  | 0.5              | 0.12               | 0.5            |\n| 0.11 | 0.7            |                  | 0.4              | 0.11               | 0.4            |\n| 0.10 | 0.6            |                  | 0.3              | 0.10               | 0.3            |\n| 0.10 | 0.5            |                  | 0.3              | 0.10               | 0.2            |\n| 0.8  | 0.2            |                  | 0.1              | 0.7                | 0.1            |\n\n## License\n\n`seldom_pixel` is dual-licensed under MIT and Apache 2.0 at your option.\n\n## Contributing\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion\nin the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above,\nwithout any additional terms or conditions.\n\n## Demo Video\n\n[![Demo video](https://img.youtube.com/vi/pmTPdGxYVYw/maxresdefault.jpg)](https://youtu.be/pmTPdGxYVYw)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseldom-se%2Fseldom_pixel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseldom-se%2Fseldom_pixel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseldom-se%2Fseldom_pixel/lists"}