{"id":13712071,"url":"https://github.com/prime31/zig-gamekit","last_synced_at":"2025-07-10T08:32:10.456Z","repository":{"id":39660906,"uuid":"312370103","full_name":"prime31/zig-gamekit","owner":"prime31","description":"Companion repo for zig-renderkit for making 2D games","archived":false,"fork":false,"pushed_at":"2023-04-28T02:02:35.000Z","size":1043,"stargazers_count":124,"open_issues_count":3,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-13T22:35:27.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","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/prime31.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}},"created_at":"2020-11-12T19:02:04.000Z","updated_at":"2024-11-09T09:42:07.000Z","dependencies_parsed_at":"2024-04-17T11:37:15.497Z","dependency_job_id":"57ce40a9-215d-45f8-b11f-23291b9120d8","html_url":"https://github.com/prime31/zig-gamekit","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/prime31%2Fzig-gamekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prime31%2Fzig-gamekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prime31%2Fzig-gamekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prime31%2Fzig-gamekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prime31","download_url":"https://codeload.github.com/prime31/zig-gamekit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225629944,"owners_count":17499291,"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-08-02T23:01:14.567Z","updated_at":"2024-11-20T20:43:11.318Z","avatar_url":"https://github.com/prime31.png","language":"Zig","funding_links":[],"categories":["Libraries","Multimedia \u0026 Graphics"],"sub_categories":["Game Development"],"readme":"# Zig GameKit\nCompanion repo and example implementation for [zig-renderkit](https://github.com/prime31/zig-renderkit). `GameKit` provides an example implementation of a game framework built on top of `RenderKit`. It includes the core render loop, window (via SDL), input, Dear ImGui and timing support. You can use it as a base to make a 2D game as-is or create your own 2D framework based on it.\n\n`GameKit` provides the following wrappers around `RenderKit`'s API showing how it can be abstracted away in a real world project: `Texture`, `Shader` and `OffscreenPass`. Building on top of those types, `GameKit` then provides `Mesh` and `DynamicMesh` which manage buffers and bindings for you. Finally, the high level types utilize `DynamicMesh` and cover pretty much all that any 2D game would require: `Batcher` (quad/sprite batch) and `TriangleBatcher`.\n\nSome basic utilities and a small math lib with just the types required for the renderer (`Vec2`, `Vec3`, `Color`, `3x2 Matrix`, `Quad`) are also included.\n\n\n## Dependencies\nGameKit has just one external dependency: SDL. You can install SDL with the package manager of your choice.\n\n\n### Usage\n- clone the repository recursively: `git clone --recursive https://github.com/prime31/zig-gamekit`\n- `zig build help` to see what examples are availble\n- `zig build EXAMPLE_NAME` to run an example\n\n\n### Minimal GameKit Project File\n```zig\nvar texture: Texture = undefined;\n\npub fn main() !void {\n    try gamekit.run(.{ .init = init, .render = render });\n}\n\nfn init() !void {\n    texture = Texture.initFromFile(std.heap.HeapAllocator, \"texture.png\", .nearest) catch unreachable;\n}\n\nfn render() !void {\n    gamekit.gfx.beginPass(.{ .color = Color.lime });\n    gamekit.gfx.draw.tex(texture, .{ .x = 50, .y = 50 });\n    gamekit.gfx.endPass();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprime31%2Fzig-gamekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprime31%2Fzig-gamekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprime31%2Fzig-gamekit/lists"}