{"id":13523797,"url":"https://github.com/crystal-bit/godot-game-template","last_synced_at":"2025-04-12T21:29:44.833Z","repository":{"id":42002646,"uuid":"293137567","full_name":"crystal-bit/godot-game-template","owner":"crystal-bit","description":"Generic template for Godot games","archived":false,"fork":false,"pushed_at":"2024-08-22T16:12:35.000Z","size":36341,"stargazers_count":681,"open_issues_count":11,"forks_count":48,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-04T01:06:41.381Z","etag":null,"topics":["game-template","godot","godot4","godotengine"],"latest_commit_sha":null,"homepage":"","language":"GDScript","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/crystal-bit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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},"funding":{"custom":["https://crystalbit.it/supporter","https://www.paypal.com/paypalme/crystalbit"]}},"created_at":"2020-09-05T19:02:02.000Z","updated_at":"2025-04-02T14:53:13.000Z","dependencies_parsed_at":"2023-09-22T06:23:05.848Z","dependency_job_id":"b049484b-6711-437b-8ac4-79464411ccd1","html_url":"https://github.com/crystal-bit/godot-game-template","commit_stats":{"total_commits":197,"total_committers":9,"mean_commits":21.88888888888889,"dds":0.07106598984771573,"last_synced_commit":"766b30e0c66dfe0fd2be04ae129d24e2e1b13867"},"previous_names":[],"tags_count":16,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crystal-bit%2Fgodot-game-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crystal-bit%2Fgodot-game-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crystal-bit%2Fgodot-game-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crystal-bit%2Fgodot-game-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crystal-bit","download_url":"https://codeload.github.com/crystal-bit/godot-game-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248634611,"owners_count":21137078,"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":["game-template","godot","godot4","godotengine"],"created_at":"2024-08-01T06:01:03.778Z","updated_at":"2025-04-12T21:29:44.811Z","avatar_url":"https://github.com/crystal-bit.png","language":"GDScript","funding_links":["https://crystalbit.it/supporter","https://www.paypal.com/paypalme/crystalbit"],"categories":["Templates","GDScript"],"sub_categories":["3D"],"readme":"![game-template-overview](https://user-images.githubusercontent.com/6860637/101258948-24c35c80-3726-11eb-8c64-7a201e945f73.png)\n\n\u003e 🌟 You make games, the template handles the boring stuff.\n\n\u003cp\u003e\n  \u003ca href=\"https://godotengine.org/download\"\u003e\n    \u003cimg alt=\"Godot Download badge\" src=\"https://img.shields.io/badge/godot-4.2.1-blue\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/crystal-bit/godot-game-template/releases\"\u003e\n    \u003cimg alt=\"GitHub release (latest by date)\" src=\"https://img.shields.io/github/v/release/crystal-bit/godot-game-template\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n**Godot Game Template** is a generic starter project for Godot games.\n\nIts main focus is to provide a solid base to build upon.\n\n# Get started\n\nYou have 2 options:\n\n## 1. Get started with Github Templates:\n\n1. [Create a new repo using this template](https://github.com/crystal-bit/godot-game-template/generate)\n2. Clone the new repository locally\n3. Open the project in [Godot](https://godotengine.org/download/) (GDScript)\n\n## 2. Get started with a local project:\n\n1. Go to https://github.com/crystal-bit/godot-game-template/releases\n2. Download _Source code (zip)_\n3. Unzip the project\n4. Open the project in [Godot Engine](https://godotengine.org/download/) (GDScript) and create your game!\n\n## Used by\n\n| Logo                                                                                                                                            | Godot | Title                               | Link                                                                                                                                                                                                                   |\n| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ![YouAreUto icon](https://play-lh.googleusercontent.com/lL54YNps-UPuDONDHfy3pmn8_aVUZGMorHJcDArimJWCQKjjNax0QMxpiAWCc5PUPbU=s100-rw)            | 3.x   | **YouAreUto** (2019)                | [Android](https://play.google.com/store/apps/details?id=com.youare.uto), [iOS](https://apps.apple.com/app/brain-game-teaser-youareuto/id1590561597#?platform=iphone), [GitHub](https://github.com/YouAreUto/YouAreUto) |\n| ![Defending Todot icon](https://imgur.com/Bn10XAf.png)                                                                                          | 3.x   | **Defending Todot** (2020)          | [HTML5](https://crystal-bit.github.io/defending-todot/), [GitHub](https://github.com/crystal-bit/defending-todot)                                                                                                      |\n| ![Karooto No Gase icon](https://play-lh.googleusercontent.com/sWgjV9dJxa1jKina0mNbU3fGmqA4zuqtRWXfhn_dfEK6reW90GH1uz0wsai1SG898bOZ=s100-rw)     | 3.x   | **Karooto No Gase** (2021)          | [Android](https://play.google.com/store/apps/details?id=org.calalinta.karootonogase), [Itch.io](https://calalinta.itch.io/)                                                                                            |\n| ![Godot Game Template Demo](https://play-lh.googleusercontent.com/aOVexQckoyjN2WJp_puq8ifTr2TnWwJ-cNw6iflcH0IpQYp04m_ChTd0jwkCKalz5wVM=s100-rw) | 3.x   | **demo-godot-game-template** (2021) | [Android](https://play.google.com/store/apps/details?id=org.crystalbit.godottemplate), [GitHub](https://github.com/crystal-bit/demo-godot-game-template)                                                               |\n\n_Get in contact if you want to be featured here!_\n\n# How to...\n\n## Change scene\n\n```gd\nGame.change_scene(\"res://scenes/gameplay/gameplay.tscn\")\n```\n\n![change_scene](https://user-images.githubusercontent.com/6860637/162567110-026c1979-6237-4255-bb2a-97815fc4b0c4.gif)\n\n## Change scene and show progress bar\n\n```gd\nGame.change_scene(\"res://scenes/gameplay/gameplay.tscn\", {\n  \"show_progress_bar\": true\n})\n```\n\n![progress](https://user-images.githubusercontent.com/6860637/162567097-81b5c54e-1ee5-42b9-a583-60764ecff069.gif)\n\n## Change scene and pass parameters\n\n```gd\n# you can pass whatever value you like: int, float, dictionary, ...\nvar params = {\n  \"level\": 4,\n  \"skin\": 'dark'\n}\nGame.change_scene(\"res://scenes/gameplay/gameplay.tscn\", params)\n```\n\n```gd\n# gameplay.gd\n\nfunc pre_start(params):\n   print(params.level) # 4\n   print(params.skin) # 'dark'\n   # setup your scene here\n```\n\n## \\_ready() vs pre_start() vs start()\n\nThey are called in this order:\n\n| method              | description                                                                                                                 |\n| ------------------- | --------------------------------------------------------------------------------------------------------------------------- |\n| `_ready()`          | gets called when the graphic transition covers the screen                                                                   |\n| `pre_start(params)` | gets called immediately after \\_ready, it receives params passed via Game.change_scene(scene_path, params)                  |\n| `start`             | it's called as soon as the graphic transition finishes. It's a good place to activate gameplay logic, enemy AI, timers, ... |\n\n## Restart the current scene\n\n```gd\nGame.restart_scene() # old params will be reused\n```\n\n## Restart the current scene and override params\n\n```gd\nvar new_params = {\n  \"level\": 5,\n}\nGame.restart_scene_with_params(new_params)\n```\n\n## Center a Node2D into the viewport\n\n```gd\n$Sprite.position = Game.size / 2\n# Game.size it's just a shortcut to  get_viewport().get_visible_rect().size\n```\n\n# Conventions and project structure\n\n- `assets/`\n  - Contains textures, sprites, sounds, music, fonts, ...\n- `builds/`\n  - output directory for game builds (ignored by .gitignore and .gdignore)\n- `scenes/`\n  - Contains Godot scenes (both entities, reusable scenes and \"game screen\" scenes)\n  - Scene folders can contain `.gd` scripts or resources used by the scene\n\nMostly inspired by the official [Godot Engine guidelines][l1]:\n\n- **snake_case** for files and folders (eg: game.gd, game.tscn)\n- **PascalCase** for node names (eg: Game, Player)\n\n[l1]: https://docs.godotengine.org/en/stable/getting_started/workflow/project_setup/project_organization.html#style-guide\n\n### Lower Case file names\n\nThis convention avoids having filesystem issues on different platforms. Stick with it\nand it will save you time. Read more\n[here](https://docs.godotengine.org/en/stable/getting_started/workflow/project_setup/project_organization.html#case-sensitivity):\n\n\u003e Windows and recent macOS versions use case-insensitive filesystems by default,\n\u003e whereas Linux distributions use a case-sensitive filesystem by default. This\n\u003e can cause issues after exporting a project, since Godot's PCK virtual\n\u003e filesystem is case-sensitive. To avoid this, it's recommended to stick to\n\u003e snake_case naming for all files in the project (and lowercase characters in\n\u003e general).\n\nSee also [this PR](https://github.com/godotengine/godot/pull/82957/files) that adds `is_case_sensitive()`.\n\n# Export utilities\n\n## `release.sh`\n\nFrom your project root:\n\n```sh\n./release.sh MyGameName # this assumes that you have a \"godot\" binary/alias in your $PATH\n```\n\nLook inside the ./builds/ directory:\n\n```sh\nbuilds\n└── MyGameName\n    ├── html5\n    │   ├── build.log # an export log + build datetime and git hash\n    │   ├── index.html\n    │   ├── ...\n    ├── linux\n    │   ├── MyGameName.x86_64\n    │   └── build.log\n    ├── osx\n    │   ├── MyGameName.dmg\n    │   └── build.log\n    └── windows\n        ├── MyGameName.exe\n        └── build.log\n```\n\n## Github Actions\n\nIf you are using Github you can take advantage of:\n\n1. automatic exports for every commit push (see [push-export.yml][ci-push-export])\n2. manual exports via Github CI (see [dispatch-export.yml][ci-dispatch] )\n\n[ci-push-export]: ./.github/workflows/push-export.yml\n[ci-dispatch]: ./.github/workflows/push-export.yml\n\nYou can read more on [Wiki - Continuos Integration][wiki_ci]\n\n[wiki_ci]: https://github.com/crystal-bit/godot-game-template/wiki/1.-Continuous-integration-(via-GitHub-Actions)\n\n# Contributing\n\nIf you want to help the project, create games and feel free to get in touch and report any issue.\n\n![Discord](https://img.shields.io/discord/686600734636376102?logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)\n\nYou can also join [the Discord server](https://discord.gg/SA6S2Db) (`#godot-game-template` channel).\n\nBefore adding new features please open an issue to discuss it with other contributors.\n\n## Contributors\n\nMany features were implemented only thanks to the help of:\n\n- [Andrea-Miele](https://github.com/Andrea-Miele)\n- [Fahien](https://github.com/Fahien)\n- [Andrea1141](https://github.com/Andrea1141)\n- [vini-guerrero](https://github.com/vini-guerrero)\n- [idbrii](https://github.com/idbrii)\n- [jrassa](https://github.com/jrassa) \n\nAlso many tools were already available in the open source community, see the [Thanks](#thanks) section.\n\n# Thanks\n\n- For support \u0026 inspiration:\n  - All the [contributors](https://github.com/crystal-bit/godot-game-template/graphs/contributors)\n  - Crystal Bit community\n  - GameLoop.it\n  - Godot Engine Italia\n  - Godot Engine\n- For their work on free and open source software:\n  - [aBARICHELLO](https://github.com/aBARICHELLO/godot-ci)\n  - [croconut](https://github.com/croconut/godot-multi-builder)\n  - [josephbmanley](https://github.com/josephbmanley)\n  - [GDQuest](https://github.com/GDquest)\n  - [Scony](https://github.com/Scony)\n  - [myood](https://github.com/myood)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrystal-bit%2Fgodot-game-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrystal-bit%2Fgodot-game-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrystal-bit%2Fgodot-game-template/lists"}