{"id":18885444,"url":"https://github.com/dagit/rust-2d-demo","last_synced_at":"2026-02-23T07:30:16.800Z","repository":{"id":66389440,"uuid":"69196363","full_name":"dagit/rust-2d-demo","owner":"dagit","description":null,"archived":false,"fork":false,"pushed_at":"2016-10-24T18:05:09.000Z","size":73,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T04:41:58.950Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dagit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-09-25T23:20:57.000Z","updated_at":"2018-09-23T01:03:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"55c33058-d18e-4e35-8f8c-155b39b04160","html_url":"https://github.com/dagit/rust-2d-demo","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/dagit%2Frust-2d-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Frust-2d-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Frust-2d-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Frust-2d-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dagit","download_url":"https://codeload.github.com/dagit/rust-2d-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239858833,"owners_count":19708856,"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-11-08T07:18:49.973Z","updated_at":"2026-02-23T07:30:16.749Z","avatar_url":"https://github.com/dagit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThis is a template for starting 2D game projects in Rust. The choice of libraries are only meant as examples, but they have been carefully chosen such that:\n\n  * We get cross-platform support (defined to be at least Linux, Windows, and OSX)\n  * They are compatible with each other\n\nFurthermore, we define the minimal requirements of 2D games as follows:\n\n  * HUD elements -\u003e font rendering, orthographic textured quads, etc\n  * GUI elements -\u003e font rendering, click events, text entry fields, buttons, that sort of thing\n  * Audio -\u003e sound effects and background music\n  * Mouse events\n  * Keyboard events\n\nIn addition to the minimal requirements we also hope to reuse this template for starting 3D game projects. As such we also include full OpenGL support.\n\n# Building\n\n## Windows\n\n1. Visit SDL [download page](https://www.libsdl.org/download-2.0.php)\n  and grab the correct SDL development libraries. I use the msvc\n  toolchain, so I grab the Visual C++ development libraries.\n\n  If you're on msvc you'll need to set `LIB` to point to `SDL2.lib`. In\n  my case, I unzipped the files to my desktop and I set the following\n  path:\n\n  ```sh\n  export LIB=\"C:\\Users\\dagit\\Desktop\\SDL2-2.0.5\\lib\\x64\"\n  ```\n\n  On the GNU toolchain you set `LIBRARY_PATH` instead of `LIB`.\n\n2. Copy `SDL2.dll` into the top of your crate (next to `Cargo.toml`).\n\n3. Checkout/update git submodules:\n\n    ```sh\n    $ git submodule update --init --recursive\n    ```\n\n  If you encounter an error during this step, I may need to give you access to\n  the scene-rs repository.\n\n4. Use cargo as normal, eg., `cargo build`\n\n\n## Linux\n\nTODO\n\n## OSX\n\n1. Checkout/update git submodules:\n\n    ```sh\n    $ git submodule update --init --recursive\n    ```\n\n2. Follow the instructions for `rust-sdl2` for OSX: [https://github.com/AngryLawyer/rust-sdl2#mac-os-x](https://github.com/AngryLawyer/rust-sdl2#mac-os-x)\n\n    For homebrew users this is roughly:\n\n    ```sh\n    $ brew install sdl2\n    $ export LIBRARY_PATH=\"$LIBRARY_PATH:/usr/local/lib\"\n    ```\n\n3. Use cargo as normal, eg., `cargo build`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagit%2Frust-2d-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdagit%2Frust-2d-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagit%2Frust-2d-demo/lists"}