{"id":13502978,"url":"https://github.com/17cupsofcoffee/tetra","last_synced_at":"2025-05-14T00:05:59.504Z","repository":{"id":40960849,"uuid":"150993369","full_name":"17cupsofcoffee/tetra","owner":"17cupsofcoffee","description":"🎮 A simple 2D game framework written in Rust","archived":false,"fork":false,"pushed_at":"2024-12-10T18:00:48.000Z","size":10080,"stargazers_count":960,"open_issues_count":19,"forks_count":61,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-07T15:01:11.502Z","etag":null,"topics":["2d-game-framework","game-development","game-engine","game-frameworks","gamedev","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/17cupsofcoffee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"ko_fi":"17cupsofcoffee"}},"created_at":"2018-09-30T18:17:43.000Z","updated_at":"2025-04-07T10:17:51.000Z","dependencies_parsed_at":"2024-01-02T21:22:50.139Z","dependency_job_id":"e662278a-5b28-4462-9185-ac648000772e","html_url":"https://github.com/17cupsofcoffee/tetra","commit_stats":{"total_commits":995,"total_committers":24,"mean_commits":"41.458333333333336","dds":0.06331658291457287,"last_synced_commit":"3ae0ee3ecf874c8c1cd2f49f05252110d3a18c72"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/17cupsofcoffee%2Ftetra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/17cupsofcoffee%2Ftetra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/17cupsofcoffee%2Ftetra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/17cupsofcoffee%2Ftetra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/17cupsofcoffee","download_url":"https://codeload.github.com/17cupsofcoffee/tetra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248933349,"owners_count":21185460,"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-game-framework","game-development","game-engine","game-frameworks","gamedev","rust"],"created_at":"2024-07-31T22:02:32.396Z","updated_at":"2025-04-14T18:00:16.889Z","avatar_url":"https://github.com/17cupsofcoffee.png","language":"Rust","readme":"# Tetra\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/17cupsofcoffee/tetra/ci.yml?branch=main)](https://github.com/17cupsofcoffee/tetra/actions?query=branch%3Amain)\n[![Crates.io](https://img.shields.io/crates/v/tetra.svg)](https://crates.io/crates/tetra)\n[![Documentation](https://docs.rs/tetra/badge.svg)](https://docs.rs/tetra)\n[![License](https://img.shields.io/crates/l/tetra.svg)](LICENSE)\n\nTetra is a simple 2D game framework written in Rust. It uses SDL2 for event handling and OpenGL 3.2+ for rendering.\n\n* [API Docs](https://docs.rs/tetra)\n* [Installation Guide](/docs/installation.md)\n* [Distribution Guide](/docs/distributing.md)\n* [Examples](/docs/examples.md)\n* [Tutorial](/docs/tutorial/)\n* [FAQ](/docs/faq.md)\n\n## Status\n\nTetra is being passively maintained, [as of January 2022](https://www.seventeencups.net/posts/three-years-of-tetra/).\n\nNo new features are planned, but occasional bugfix updates may still be released from time to time. PRs may be accepted if they don't have a large maintainence burden.\n\nIf you're looking for a similar framework that's more actively developed, try [macroquad](https://github.com/not-fl3/macroquad) or [GGEZ](https://github.com/ggez/ggez/). Alternatively, you can try [nova](https://github.com/17cupsofcoffee/nova), my spiritual successor to this library (much smaller scope, still very experimental).\n\n## Features\n\n* XNA/MonoGame-inspired API\n* Efficient 2D rendering, with draw call batching by default\n* Easy input handling, via polling or events, with support for gamepads\n* Deterministic game loop by default, à la [Fix Your Timestep](https://gafferongames.com/post/fix_your_timestep/)\n* Common building blocks built-in, such as:\n    * Font rendering\n    * Cameras\n    * Screen scaling\n\n## Installation\n\nTo add Tetra to your project, add the following line to your `Cargo.toml` file:\n\n```toml\ntetra = \"0.8\"\n```\n\nYou will also need to install the SDL2 native libraries - full details are provided in the [documentation](https://tetra.seventeencups.net/installation).\n\n## Examples\n\nTo get a simple window displayed on screen, the following code can be used:\n\n```rust ,noplaypen\nuse tetra::graphics::{self, Color};\nuse tetra::{Context, ContextBuilder, State};\n\nstruct GameState;\n\nimpl State for GameState {\n    fn draw(\u0026mut self, ctx: \u0026mut Context) -\u003e tetra::Result {\n        // Cornflower blue, as is tradition\n        graphics::clear(ctx, Color::rgb(0.392, 0.584, 0.929));\n        Ok(())\n    }\n}\n\nfn main() -\u003e tetra::Result {\n    ContextBuilder::new(\"Hello, world!\", 1280, 720)\n        .build()?\n        .run(|_| Ok(GameState))\n}\n```\n\nYou can see this example in action by running `cargo run --example hello_world`.\n\nThe full list of examples is available [here](https://tetra.seventeencups.net/examples).\n\n## Support/Feedback\n\nTetra is fairly early in development, so you might run into bugs/flaky docs/general weirdness. Please feel free to open an issue/PR if you find something! You can also contact me via [Twitter](https://twitter.com/17cupsofcoffee) or the [Rust Game Development Discord](https://discord.gg/yNtPTb2).\n","funding_links":["https://ko-fi.com/17cupsofcoffee"],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F17cupsofcoffee%2Ftetra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F17cupsofcoffee%2Ftetra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F17cupsofcoffee%2Ftetra/lists"}