{"id":18045183,"url":"https://github.com/abusch/pixels-playground","last_synced_at":"2025-04-05T03:41:32.629Z","repository":{"id":103640692,"uuid":"431291935","full_name":"abusch/pixels-playground","owner":"abusch","description":"Playground for old-school pixel effects in lua","archived":false,"fork":false,"pushed_at":"2025-01-20T12:51:24.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T11:48:14.553Z","etag":null,"topics":[],"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/abusch.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2021-11-24T00:02:58.000Z","updated_at":"2025-01-20T12:51:27.000Z","dependencies_parsed_at":"2023-05-24T04:15:50.587Z","dependency_job_id":null,"html_url":"https://github.com/abusch/pixels-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abusch%2Fpixels-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abusch%2Fpixels-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abusch%2Fpixels-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abusch%2Fpixels-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abusch","download_url":"https://codeload.github.com/abusch/pixels-playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284913,"owners_count":20913691,"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":[],"created_at":"2024-10-30T18:12:19.262Z","updated_at":"2025-04-05T03:41:32.605Z","avatar_url":"https://github.com/abusch.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pixels-playground\n\nA little experiment to play with old-school pixel effects using lua. Gives you a vaguely mode-13h-ish environment: a 320x240 screen, with a 256-color palette.\n\nUses [`mlua`](https://crates.io/crates/mlua) for lua integration, [`pixels`](https://crates.io/crates/pixels) for rendering. Effects ported over from [this repo](https://seancode.com/demofx/).\n\n## To run:\nYou need a working Rust environment, then run `cargo run --release -- lua/blobs.lua` (or another script).\n\n## API\n\nProvides a tiny api, vaguely inspired by pico-8:\n- `pset(x, y, c)`: sets the pixel at coordinates (x,y) to color index `c`\n- `cls(c)`: clear screen with color `c`\n- `pal(c, r, g, b)`: set palette index `c` to color (r,g,b)\n- more to come...\n\nLua scripts simply need to define a `Render(t)` function where you can do your rendering. The argument passed in is the current time in milliseconds. You can also define an optional `Init()` function that will be called once at the beginning (and when hot-reloading).\n\n## TODO\n- [ ] better error handling\n- [x] hot-reload of lua scripts\n- [ ] more api\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabusch%2Fpixels-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabusch%2Fpixels-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabusch%2Fpixels-playground/lists"}