{"id":16108796,"url":"https://github.com/lightningfz/swapshot","last_synced_at":"2025-08-26T11:34:13.884Z","repository":{"id":65370897,"uuid":"588281386","full_name":"LightningFz/SwapShot","owner":"LightningFz","description":"A 2D puzzle-platformer built with Unity and C#, featuring a unique pet-swapping mechanic to solve challenges and track best runs.","archived":false,"fork":false,"pushed_at":"2024-09-07T19:40:16.000Z","size":24135,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-30T06:08:31.510Z","etag":null,"topics":["csharp","platformer-game","puzzle-game","unity2d"],"latest_commit_sha":null,"homepage":"","language":"ShaderLab","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/LightningFz.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":"2023-01-12T18:53:58.000Z","updated_at":"2024-09-07T19:44:13.000Z","dependencies_parsed_at":"2024-09-07T20:59:24.367Z","dependency_job_id":null,"html_url":"https://github.com/LightningFz/SwapShot","commit_stats":null,"previous_names":["lightningfz/swapshot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LightningFz/SwapShot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightningFz%2FSwapShot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightningFz%2FSwapShot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightningFz%2FSwapShot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightningFz%2FSwapShot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LightningFz","download_url":"https://codeload.github.com/LightningFz/SwapShot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightningFz%2FSwapShot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272214419,"owners_count":24893201,"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-08-26T02:00:07.904Z","response_time":60,"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":["csharp","platformer-game","puzzle-game","unity2d"],"created_at":"2024-10-09T19:28:42.667Z","updated_at":"2025-08-26T11:34:13.867Z","avatar_url":"https://github.com/LightningFz.png","language":"ShaderLab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **SwapShot**\n\nA technical showcase of a 2D puzzle-platformer developed using the Unity game engine and C# language. The game implements a unique pet-swapping mechanic and demonstrates various game development skills, including game logic design, player input handling, object collision detection, and file I/O for tracking player progress.\n\n## **Table of Contents**\n- [Overview](#overview)\n- [Technologies Used](#technologies-used)\n- [Game Mechanics](#game-mechanics)\n- [Architecture](#architecture)\n- [Installation](#installation)\n\n\n## **Overview**\nThis project is a 2D platformer focused on puzzle-solving through a custom-designed pet-swapping mechanic. The game was built using Unity, with all core game logic written in C#. It features multiple levels and includes a system that tracks and stores the player's best times for each level.\n\nThe game was developed as a technical project and published on [Itch.io](#) for feedback and improvement. It is currently in a non-commercial, unpolished state, with the emphasis placed on functionality over visual design.\n\n## **Technologies Used**\n- **Unity**: Used for game engine functionalities, physics simulation, and level design.\n- **C#**: Core language used to script game mechanics, player interactions, pet movement logic, and collision detection.\n- **MonoBehaviour Framework**: Utilized to handle Unity’s component lifecycle, including the game loop (Update, FixedUpdate), collision events, and input handling.\n- **File I/O**: Implemented in C# to read and write the player’s best run times in a persistent text file.\n- **Physics Engine**: Unity's built-in 2D physics engine to handle player and pet interactions with the environment.\n\n## **Game Mechanics**\n- **Pet Swapping Mechanic**: \n  - Players are followed by a pet that they can shoot towards green boxes in the level.\n  - Upon touching a green box, the pet and player swap positions, allowing for puzzle-solving.\n  - This mechanic is implemented using collision detection (OnTriggerEnter2D) and positional transformations.\n- **Player Movement**:\n  - Movement is handled via Unity’s `Rigidbody2D` component to enable realistic physics-based movement (acceleration, deceleration, and friction).\n  - The input system (Unity Input Manager) captures keyboard input for movement (`WASD` or arrow keys).\n- **Shooting the Pet**:\n  - Shooting the pet is done by calculating the direction from the player to the mouse position, with a force applied to the pet's Rigidbody2D to simulate projectile motion.\n\n## **Architecture**\nThe game's code follows a modular design to separate gameplay mechanics, level management, and file I/O:\n- **PlayerController.cs**: Manages player input, movement, and interactions.\n- **PetController.cs**: Handles the pet’s behavior, such as following the player and swapping mechanics.\n- **LevelManager.cs**: Manages level transitions and tracks player completion times.\n- **RunTracker.cs**: Stores best run times and writes them to a text file using C#'s `StreamWriter` and `StreamReader`.\n\n## **Installation**\n1. Download the game from the [Itch.io page](https://lightningfz.itch.io/swapshot).\n2. Extract the zip file to a local directory.\n3. Run the executable file to launch the game.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightningfz%2Fswapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightningfz%2Fswapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightningfz%2Fswapshot/lists"}