{"id":50816029,"url":"https://github.com/ydah/pixeru","last_synced_at":"2026-06-13T09:33:44.286Z","repository":{"id":343753508,"uuid":"1178934613","full_name":"ydah/pixeru","owner":"ydah","description":"A small 2D game engine for PicoRuby and CRuby-based POSIX development.","archived":false,"fork":false,"pushed_at":"2026-03-11T16:06:27.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-11T21:44:12.861Z","etag":null,"topics":["2d-game","2d-game-engine","game-engine","picoruby","posix","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ydah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-11T14:15:55.000Z","updated_at":"2026-03-11T16:06:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ydah/pixeru","commit_stats":null,"previous_names":["ydah/pixeru"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ydah/pixeru","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fpixeru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fpixeru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fpixeru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fpixeru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ydah","download_url":"https://codeload.github.com/ydah/pixeru/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fpixeru/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34279898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["2d-game","2d-game-engine","game-engine","picoruby","posix","ruby"],"created_at":"2026-06-13T09:33:40.656Z","updated_at":"2026-06-13T09:33:44.278Z","avatar_url":"https://github.com/ydah.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pixeru\n\nPixeru is a small 2D game engine for PicoRuby and CRuby-based POSIX development.\n\nIt is written mostly in Ruby, keeps the API compact, and is inspired by Taylor's style of game loop and drawing primitives. The repository now supports both of these use cases:\n\n- CRuby development on POSIX with `require \"pixeru\"`\n- PicoRuby firmware builds via a root `mrbgem.rake`\n\n## Current Status\n\n- Core API is implemented: `Window`, `Colour`, `Vec2`, `Rect`, `FrameBuffer`, `Shape`, `Font`, `Input`, `Timer`, `Scene`, `Sprite`, `Audio`\n- POSIX development uses a terminal renderer in [`hal/posix`](hal/posix)\n- PicoRuby packaging is prepared through [`mrbgem.rake`](mrbgem.rake), [`mrblib`](mrblib), and [`src`](src)\n- RP2040 HAL wrappers exist, but actual board wiring and display configuration are still project-specific\n\n## Install\n\n### CRuby / POSIX\n\nBuild and install the gem locally:\n\n```bash\ngem build pixeru.gemspec\ngem install ./pixeru-0.1.0.gem\n```\n\nOr run directly from this repository:\n\n```bash\nruby -I lib examples/hello_world.rb\n```\n\n### PicoRuby\n\nAdd this repository to your PicoRuby build config:\n\n```ruby\nconf.gem github: \"YOUR_GITHUB_USER/pixeru\"\n```\n\nFor local integration without pushing first:\n\n```ruby\nconf.gem File.expand_path(\"../pixeru\", __dir__)\n```\n\nPicoRuby consumes this repository as an `mrbgem`. RubyGems publication is optional and mainly useful for CRuby development, tooling, and CI.\n\n## Quick Start\n\nFor CRuby or POSIX development:\n\n```ruby\nrequire \"pixeru\"\n\nPixeru::Window.open(width: 160, height: 128, fps: 30)\n\ndef main\n  Pixeru::Input.update\n\n  Pixeru::Window.draw do\n    Pixeru::Window.clear(colour: Pixeru::Colour::BLACK)\n\n    Pixeru::Font.default.draw(\n      \"Hello Pixeru!\",\n      x: 20, y: 10,\n      colour: Pixeru::Colour::WHITE\n    )\n\n    Pixeru::Shape.draw_rect(\n      x: 40, y: 40,\n      width: 80,\n      height: 50,\n      colour: Pixeru::Colour::RED\n    )\n  end\nend\n\nmain until Pixeru::Scene.close?\nPixeru::Window.close\n```\n\nFor RP2040 targets, map your buttons and audio pin before starting the loop:\n\n```ruby\nPixeru::Input.map(Pixeru::Input::A, pin: 2)\nPixeru::Input.map(Pixeru::Input::B, pin: 3)\nPixeru::Input.map(Pixeru::Input::START, pin: 4)\nPixeru::Audio.open(pin: 15)\n```\n\n## Examples\n\n- [`examples/hello_world.rb`](examples/hello_world.rb): minimal drawing loop\n- [`examples/shapes_demo.rb`](examples/shapes_demo.rb): primitives and text\n- [`examples/input_demo.rb`](examples/input_demo.rb): keyboard-driven movement on POSIX\n- [`examples/simple_game.rb`](examples/simple_game.rb): scene-based sample game\n\nRun an example from the repository root:\n\n```bash\nruby -I lib examples/shapes_demo.rb\n```\n\n## Development\n\nSmoke test the public entrypoint:\n\n```bash\nruby -I lib -e 'require \"pixeru\"; puts Pixeru::VERSION'\n```\n\nRun all tests:\n\n```bash\nfor f in test/test_*.rb; do ruby -I lib -I test \"$f\"; done\n```\n\nBuild the gem package:\n\n```bash\ngem build pixeru.gemspec\n```\n\nCI is defined in [`.github/workflows/ci.yml`](.github/workflows/ci.yml) and covers:\n\n- CRuby test matrix\n- gem packaging\n- PicoRuby POSIX build with this repository included as a local `mrbgem`\n\n## Project Layout\n\n- [`lib/pixeru`](lib/pixeru): main Ruby API\n- [`hal/posix`](hal/posix): terminal-based development HAL\n- [`hal/rp2040`](hal/rp2040): RP2040 HAL wrappers and legacy C sources\n- [`mrblib`](mrblib): PicoRuby-side Ruby glue for the `mrbgem`\n- [`src`](src): PicoRuby C entrypoints\n- [`examples`](examples): runnable demos\n- [`test`](test): lightweight test suite\n- [`tools`](tools): asset conversion helpers\n\n## Notes and Limitations\n\n- The POSIX renderer currently targets ANSI-capable terminals, not SDL or a native window\n- The design docs still describe some planned work that is not fully reflected in the runtime yet\n- Dirty-region optimization is not yet wired through the active rendering path\n- RP2040 display and pin assignments are intentionally not hard-coded at the README level beyond small examples\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fpixeru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fydah%2Fpixeru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fpixeru/lists"}