{"id":23516558,"url":"https://github.com/ambientrun/tangentrider","last_synced_at":"2025-05-13T23:12:46.496Z","repository":{"id":201434571,"uuid":"707316986","full_name":"AmbientRun/TangentRider","owner":"AmbientRun","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-19T17:45:34.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-16T22:35:09.225Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmbientRun.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}},"created_at":"2023-10-19T16:40:54.000Z","updated_at":"2024-07-30T08:12:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a5826ee-98b2-45a2-ab53-80b59fb9d51f","html_url":"https://github.com/AmbientRun/TangentRider","commit_stats":null,"previous_names":["ambientrun/tangentrider"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmbientRun%2FTangentRider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmbientRun%2FTangentRider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmbientRun%2FTangentRider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmbientRun%2FTangentRider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmbientRun","download_url":"https://codeload.github.com/AmbientRun/TangentRider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254042418,"owners_count":22004901,"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-12-25T15:14:07.524Z","updated_at":"2025-05-13T23:12:41.486Z","avatar_url":"https://github.com/AmbientRun.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tangent Rider\n\n[\u003cimg width=\"887\" alt=\"image\" src=\"https://github.com/AmbientRun/TangentRider/assets/707827/0c7d5b8a-8560-411b-a095-9c434ec506ce\"\u003e](https://ambient.run/packages/vsywwcmghxgv7wl3csj65oxqggqack5z)\n\nTangent Rider is a very basic game inspired by Line Rider and Ultimate Chicken Horse. It takes the hovercars from Tangent, our prototype game for testing our engine, and hooks them up to a rudimentary level builder. The goal of the game is to collaboratively build a level, then be the first one to beat it.\n\nIts primary purpose is to demonstrate how you might mod a game with Ambient. It's not the most mechanically complex or polished game, but it's designed to be remixed with more placeable blocks, as well as other mechanics you might consider adding.\n\nTo get started with remixing it, [install Ambient](https://ambient.run/docs/user/installing), then create a new package. You do **not** need to clone this repository. We recommend that you follow the rest of the tutorial first to get an understanding for what working in Ambient is like.\n\n```sh\nambient new my_tangent_rider_remix --name \"My Tangent Rider Remix\" --rust empty\n```\n\nNext, open up its `package.toml` and insert a dependency on the game itself, which you can find on its [package page](https://ambient.run/packages/vsywwcmghxgv7wl3csj65oxqggqack5z):\n\n\u003cimg width=\"272\" alt=\"image\" src=\"https://github.com/AmbientRun/TangentRider/assets/707827/7e1d1f7a-a07b-4685-ac61-640a2e88116e\"\u003e\n\nNext, you'll need the schemas for both Tangent and Tangent Rider. You can get these from [the `ambient.toml` for `standard_spawnables` in this repository](https://github.com/AmbientRun/TangentRider/blob/main/standard_spawnables/ambient.toml) - just make sure to remove any mentions of `path`, as you're working outside of this repository.\n\nYou can then add a sphere as a spawnable by replacing `server.rs` with the following:\n\n```rust\nuse ambient_api::{\n    core::{\n        physics::components::sphere_collider, primitives::concepts::Sphere,\n        transform::components::translation,\n    },\n    prelude::*,\n};\nuse packages::tangent_rider_schema::concepts::Spawnable;\n\n#[main]\npub fn main() {\n    let base = Entity::new()\n        .with_merge(Sphere::suggested())\n        .with(translation(), Vec3::Z * -100.);\n\n    Spawnable {\n        spawnable_name: \"Sphere\".to_string(),\n        spawnable_cost: 50,\n        spawnable_main_ref: base.clone().with(sphere_collider(), 0.5).spawn(),\n        spawnable_ghost_ref: base.spawn(),\n    }\n    .spawn();\n}\n```\n\nThis code creates templates for the ghost sphere (shown when you're in the level builder), and the main sphere (what gets spawned), then registers those templates by spawning a new entity that has the relevant stats as components. This is made easier through the use of the `Spawnable` concept; the above block is equivalent to\n\n```rust\nEntity::new()\n    .with(spawnable_name(), \"Sphere\".to_string())\n    .with(spawnable_cost(), 50)\n    .with(spawnable_main_ref(), base.clone().with(sphere_collider(), 0.5).spawn())\n    .with(spawnable_ghost_ref(), base.spawn())\n    .spawn();\n```\n\nThese spawnables are then detected by the core game and shown in the list. If you now run\n\n```sh\nambient run\n```\n\nin your remix's directory, you should be able to see the sphere in the list!\n\nFor more examples of how to build spawnables, check out the `standard_spawnables` package, which also implements a boost pad.\n\nHappy modding, and feel free to let us know if you run into any issues. We can be most easily reached on our [Discord](https://discord.gg/ambient).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fambientrun%2Ftangentrider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fambientrun%2Ftangentrider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fambientrun%2Ftangentrider/lists"}