{"id":31688321,"url":"https://github.com/oliverbestmann/byke","last_synced_at":"2025-10-08T10:54:57.145Z","repository":{"id":301941516,"uuid":"1010734953","full_name":"oliverbestmann/byke","owner":"oliverbestmann","description":"ECS game engine based on ebitengine for golang, heavily inspired by bevy.","archived":false,"fork":false,"pushed_at":"2025-10-05T12:01:30.000Z","size":762,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T14:24:16.637Z","etag":null,"topics":["bevy","ebitengine","ecs","game-engine","gamedev"],"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/oliverbestmann.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":"2025-06-29T17:37:22.000Z","updated_at":"2025-10-05T12:01:34.000Z","dependencies_parsed_at":"2025-07-17T06:18:46.317Z","dependency_job_id":"4f71b735-6b94-4902-b7ca-4023357de58c","html_url":"https://github.com/oliverbestmann/byke","commit_stats":null,"previous_names":["oliverbestmann/byke"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/oliverbestmann/byke","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverbestmann%2Fbyke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverbestmann%2Fbyke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverbestmann%2Fbyke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverbestmann%2Fbyke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oliverbestmann","download_url":"https://codeload.github.com/oliverbestmann/byke/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverbestmann%2Fbyke/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278931658,"owners_count":26070788,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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":["bevy","ebitengine","ecs","game-engine","gamedev"],"created_at":"2025-10-08T10:54:53.518Z","updated_at":"2025-10-08T10:54:57.140Z","avatar_url":"https://github.com/oliverbestmann.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Reference byke](https://pkg.go.dev/badge/github.com/oliverbestmann/byke.svg)](https://pkg.go.dev/github.com/oliverbestmann/byke)\n[![Reference bykebiten](https://pkg.go.dev/badge/github.com/oliverbestmann/byke/bykebiten.svg)](https://pkg.go.dev/github.com/oliverbestmann/byke/bykebiten)\n\n# byke\n\n**byke** is an Entity Component System (ECS) library for Go, inspired by the [Bevy](https://bevy.org/) API.\n\n\u003e Although still under development, it already includes a wide range of features.\n\u003e Documentation and examples will improve in the near feature.\n\nWith a background in Bevy, you'll find Byke straightforward.\nThe `App` type is the main entry point - just add plugins, resources, and systems.\n\n```golang\nfunc main() {\n   var app App\n\n   app.AddPlugin(GamePlugin)\n   app.AddSystems(Startup, spawnCamera, spawnWorld)\n   app.AddSystems(Update, Systems(moveObjectsSystem, otherSystem).Chain())\n   app.MustRun()\n}\n```\n\nComponents are defined by embedding the zero-sized `Component[T]` type.\nSystem parameters, such as resources, `Local` or `Query`, are automatically injected.\nUse `Query[T]` for data retrieval. Byke offers standard query filters such as `With`, `Without`, `Changed`, and more.\n\n```golang\ntype Velocity struct {\n   Component[Velocity]\n   Linear Vec\n}\n\nfunc moveObjectsSystem(vt VirtualTime, query Query[struct {\n   Velocity  Velocity\n   Transform *Transform\n}]) {\n   for item := range query.Items() {\n      item.Transform.Translation = item.Transform.Translation.\n         Add(item.Velocity.Linear.Mul(vt.DeltaSecs))\n   }\n}\n```\n\n### Core Features\n\n* **Schedules and SystemSets**: Organize systems and define execution order.\n   * `Local[T]` local state for systems\n   * `In[T]` to pass a value when invoking a system\n* **Resources**: Inject shared data into systems.\n* **Queries**: Supports filters like `With`, `Without`, `Added`, and `Changed`. Also supports `Option[T]` and\n  `OptionMut[T]`. Automatic mapping to struct types.\n* **Events**: Use `EventWriter[E]` and `EventReader[E]` to send and receive events.\n* **Observers**: Support bevy style (Entity-)Observers\n* **States**: Manage application state with `State[S]` and `NextState[S]`.\n\n    * Supports `OnEnter(state)` and `OnExit(state)` schedules.\n    * Emits `StateTransitionEvent[S]` during transitions.\n    * Allows state-scoped entities via `DespawnOnExitState(TitleScreen)`.\n* **Commands**: Spawn/despawn entities, trigger observers and add/remove components.\n* **Change detection**: Components marked as `Comparable` support automatic change detection.\n* **Type Safety**: Avoids the need for type assertions like `value.(MyType)`.\n* **Entity Hierarchies**: Support for parent-child relationships between entities.\n* **Fixed Timestep**: Execute game logic or physics systems with a fixed timestep interval.\n\n\n### Ebitengine Integration\n\nThe `bykebiten` package provides integration with [Ebitengine](https://ebitengine.org/):\n* Initializes and manages the game loop\n* Configures window settings, screen size, and input\n* Applies transforms through entity hierarchy\n* Manages rendering with z-order, anchors, and sizes\n* Sprites, also supports sprite sheets\n* Text rendering with custom fonts\n* Handles vectors with filled and stroked paths\n* Supports meshes: circles, rectangles, and triangulated polygons\n* Shaders for sprites and meshes with uniforms and image inputs\n* Multi-camera functionality\n* Custom render targets via *ebiten.Image\n* Asset loading:\n  * AssetLoader support\n  * Tracks asset loads\n  * Custom fs.FS: embedded, http, local support\n* Audio playback with looping and despawning\n* Spatial audio (see `astroids` example)\n\n### Example\n\nCheck out the [examples](https://github.com/oliverbestmann/byke/blob/main/bykebiten/examples/) for a\nlook at how everything comes together.\n\n---\n\n\u003e Note: This README and some documentation was refined using generative AI,\n\u003e but all code in this project is handwritten.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverbestmann%2Fbyke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliverbestmann%2Fbyke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverbestmann%2Fbyke/lists"}