{"id":25387930,"url":"https://github.com/karshprime/uni-genesis","last_synced_at":"2025-04-09T20:24:23.999Z","repository":{"id":212381913,"uuid":"730138794","full_name":"karshPrime/uni-genesis","owner":"karshPrime","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-13T23:21:18.000Z","size":47699,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T12:43:26.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karshPrime.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}},"created_at":"2023-12-11T09:39:24.000Z","updated_at":"2023-12-11T09:39:35.000Z","dependencies_parsed_at":"2023-12-14T00:45:42.210Z","dependency_job_id":null,"html_url":"https://github.com/karshPrime/uni-genesis","commit_stats":null,"previous_names":["karshprime/uni-genesis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karshPrime%2Funi-genesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karshPrime%2Funi-genesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karshPrime%2Funi-genesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karshPrime%2Funi-genesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karshPrime","download_url":"https://codeload.github.com/karshPrime/uni-genesis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248105343,"owners_count":21048504,"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":"2025-02-15T12:36:06.265Z","updated_at":"2025-04-09T20:24:23.977Z","avatar_url":"https://github.com/karshPrime.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genesis [Assignment 9.3]\n![Game Snip](https://github.com/karshPrime/uni-genesis/blob/main/overview/game-snip.gif?raw=true)\n\u003cdetails\u003e\n\u003csummary\u003eDetails:\u003c/summary\u003e\n\n## Project Summary\nGenesis is a 2D indie game written in Ruby using the Gosu module. Game objective is to kill all mobs (skulls) possible. \u003cbr\u003e\nThe player will be able to switch gravity and summon a 1st POV gun.\u003cbr\u003e\n**Controls:**\n|         Key         | Action                                      |\n|---------------------|---------------------------------------------|\n|          W          | Switch player (and pet) gravity upwards     |\n|          A          | Player (and pet) move backwards             |\n|          S          | Switch player (and pet) gravity downwards   |\n|          D          | Player (and pet) move forward               |\n|        SPACE        | Enable scope                                |\n|     CLICK LEFT      | Shoot                                       |\n|     CLICK RIGHT     | Reload                                      |\n\n## Required Data Types\n### 1. Layer details\n**Field Name:** Layer\u003cbr\u003e\n**Type:** Class\u003cbr\u003e\n**Notes:** Will import and initialize all graphical media used in the program. Will also be the parent class to various other classes.\n\n### 2. Character details\n**Field Name:** Character\u003cbr\u003e \n**Type:** Class\u003cbr\u003e\n**Notes:** Will Inherit Layer class, and will contains all characteristics \nthat a character would have.\n\n### 3. Accessories details\n**Field Name:** Accessories\u003cbr\u003e\n**Type:** Class\u003cbr\u003e\n**Notes:**  Will inherits Layer class, and will contains all characteristics that the “magical elements” (portals and carrot) would require.\n\n### 4. Audio_used details\n**Field Name:** Audio_used\u003cbr\u003e\n**Type:** Class\u003cbr\u003e\n**Notes:**  Will imports and initialize all audio that would be used in the program.\n\n### 5. Number details\n**Field Name:** Number_use\u003cbr\u003e\n**Type:** Class\u003cbr\u003e\n**Notes:** Will have instances to store current starting coordinate information for the number sprite file and the difference in x and y coordinate from the live-mouse-coordinates\n\n### 6. Results\n**Field Name:** Result\u003cbr\u003e\n**Type:** Class\u003cbr\u003e\n**Notes:** Will maintain a record of player health, score, time spent and ammo used.\n\n### 7. Genesis details\n**Field Name:** Genesis\u003cbr\u003e\n**Type:** Class\u003cbr\u003e\n**Notes:** Will inherit Gosu::Window and will be used to call all the functions and procedures defined.\n\n## Overview of Program Structure\nThe code uses the following inbuilt and external libraries-\n* Gosu - the base of the game.\n* Colorize - to output fancier terminal instructions.\n* Threads - to run different methods at (kind of) simultaneously.\n\nGame uses a bunch of substances to make things look fancier and  less static. These substances are:\n* player character\n* pet character - will follow the player around\n* backgrounds - layers of various images to give depth\n* elements - things such as portal\n* skull - game mob\n* scope - for gun functionality\n* result  - game statistics for the player\n\nTo make the code cleaner, each of these substances will be modularized in their own separate script-files, and one main file- `Genesis.rb` will call and use them.\n\n### Chart 1: Genesis.rb [Gosu core methods]\n![Chart1](https://github.com/karshPrime/uni-genesis/blob/main/overview/chart1.png?raw=true)\nThe initialize method will define (mostly) all instance variables that the main class- Genesis will use.\n\n### Chart 2: Genesis.rb \u003e def initialize()\n![Chart2](https://github.com/karshPrime/uni-genesis/blob/main/overview/char2.png?raw=true)\nThese variables would be later used as parameters for different functions and procedures in other Gosu methods (`update`, `draw`, `button_up(id)` and `button_down(id)`).\n\n### Other GOSU method’s actions:\n#### update\nWill take care of controls and movement and basically everything dynamic in the game as long as ammo and health is not less than or equal to 0.\n#### draw\nWill draw all the substances. Some substances would be drawn only if certain condition is matched.\n#### button_down(id)\nWill   be   used   to   put   certain   functions/procedures   on loop(like   function   for   player’s movement sound), and increment values for the substances which are supposed to update only on player’s interaction.\n#### button_up(id)\nWill be mainly used to stop all the loops started by button_down(id).\n\n\u003c/details\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarshprime%2Funi-genesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarshprime%2Funi-genesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarshprime%2Funi-genesis/lists"}