Godot 4.3 template for game projects (GDScript).
Fusion of curated plugins, essential features and best practices to kick-start new projects.
Play here: https://tinytakinteller.itch.io/takin-godot-template
Swap modules with either simpler or advanced alternatives, depending on your project size.
- Foundation
- 🖼️ Scene Manager - Custom transitions and loading screens.
- 🎵 Audio Manager - Reliable music tracks and sound effects.
- ⚙️ Configuration - Persistent game options and statistics in INI file.
- 💾 Save Files - Modular save system for game data, optional encryption.
- Localization
- 🌍 Polygot Template with 28 languages and over 600 game words.
- ✏️ Google Noto Sans fonts glyphs (Arabic, Hebrew, HK, JP, KR, SC, TC, Thai).
- Accessibility
- 🎮 Controller Support - Grab UI focus for joypad and keyboard users.
- 🔍 Multiple Resolutions - Video options: display mode, window zoom.
- ⚡ Optimizations - E.g. Native web dialog to capture clipboard.
- UI/UX
- 🎬 Boot Splash - The main scene, allowing custom transition to main menu.
- 🏠 Main Menu - Display buttons to enter other menus, version and author.
- 🔧 Options Menu - Audio, Video (display, vsync), Controls (keybinds), Game.
- 📜 Credits Menu - Renders CREDITS.md file in-game with formatting.
- 📓 Save Files Menu - List of files: Play, Import, Export, Delete, Rename.
- 🎲 Game Scene - Example incremental game mechanics and particle effects.
- ⏸️ Pause Menu - Pause gameplay, change options. Esc key shortcut.
- Placeholder
- Singletons
- 📢 Signal Bus - Observer pattern for cleaner global signals.
- 📖 References - Map of preloaded resources for convenience.
- Special
- 👷 Builder - adds components to nodes, alternative to upcomming Traits.
- Scripts
- 🧰 Utility - Datetime, File, Marshalls, Math, Node, Number, Random, String, Theme.
- 🛠️ Objects - ActionHandler, ConfigStorage (INI File), LinkedMap.
- Tools
- 🐛 Logger - Easier debugging, custom log groups configuration.
- 🧩 IDE Plugin - Improves scripting in GDScript in editor.
- 📋 Resource View - Better resource management in editor.
- ✨ GDScript Toolkit - Code style formatting on save and linter.
- Workflow
- 🚀 Deployment - Automatically upload to itch.io page from Github.
- ✅ Actions - Verify style and formatting in GDScript code on push to Github.
The project contains example game_content
scenes (replace it in game_scene
scene).
- 2D Incremental Clicker (default)
- 3D First Person Controller (
/artifacts/example_3d_fp_controller
)
- .github
- docs
- workflows
- FUNDING.yml
- godot
- addons (Plugins)
- artifacts (additional examples)
- assets (.png, .mp3, .csv, .ttf, ...)
- autoload (Globals)
- resources (.tres, .gd)
- scenes (.tscn, .gd)
- scripts (static/const/object .gd)
- shaders (.gdshader)
- snippets (.cpp, .js, ...)
- CREDITS.md
- export_presets.cfg
- gdlintrc
- project.godot (ProjectSettings)
- .gitattributes
- .gitignore
- LICENSE
- README.md
- Clean Code
- Use snake_case for files, folders, variables, functions.
- Use PascalCase for nodes, classes, enums, types.
- Use typed variables and functions.
- Use style inspired by GDScript Style (see gdlintrc).
- Function definition order: override, public, private, static.
- Consider using good design patterns when programming.
- Consider maintaining enum values when appropriate.
- Script IDE
- The Script-IDE improves scripting, e.g. Ctrl+U, Ctrl+O.
- Consider using a professional IDE like "JetBrains Rider (GDScript)" instead of Godot Editor.
- Resource Tables
- The Edit Resources as Table adds view for managing Resources.
- GDScript Toolkit
- This project uses addons Format on Save and gdLinter (enforces gdlintrc).
- They require GDScript Toolkit python package being installed.
- Logger
- The Log inspired by Log4J allows logging.
- Scene Manager
- The SceneManager handles Scenes transitions and loadings.
- Audio Manager
- The Resonate addon handles music tracks and sound effects.
- For a complex audio project, consider using FMOD or WWise.
The Globals (autoload Scenes) and Scripts (statics, consts, objects) are available from anywhere in the project. The latter is independent of (not managed by) the Scene Tree.
Otherwise, Scenes must be loaded or added to the Scene Tree.
- Configuration
- Configure Project, use ConfigStorage object for user config presistence.
- Logger configuration exports log groups (override log levels).
- Game options/settings configurations are tied to the menu UI.
- Data
- Configure structure of save files, use as setter and getter of save file data.
- Overlay
- Container for debug elements, e.g. FPS counter.
- Reference
- Preloads & holds references to Resources in dictionary by name.
- When creating a new Resource type, consider creating a getter here.
- SignalBus
- Exchange global signals for cleaner observer pattern.
- Wrapper : Extend functionality without modifying the original.
- AudioWrapper - Calls Resonance plugin with enums instead of string names.
- LogWrapper - Extends Logger plugin with log groups configuration.
- SceneManagerWrapper - Calls SceneManager plugin with custom resource.
- TranslationServerWrapper - Extends localization to work in tool scripts.
Scenes are split into following categories:
- "Component" scenes extend functionality of the parent.
- "Node" scenes are reusable as standalone functional units.
- "Scene" scenes are larger specialized collections.
- Component
- Audio
- ButtonAudio - Audio events on signals (focus, click, release).
- SliderAudio - Audio events on signals (drag start, drag end).
- TreeAudio - Audio events on signals (cell selected, button clicked).
- Builder
- UiBuilder - Spawn components, e.g. an focus animation on all focusable nodes.
- Control
- ControlExpandStylebox - Resize target node to fill parent container.
- ControlFocusOnHover - Grabs focus of node on mouse hover signal.
- ControlGrabFocus - Grabs focus of node for controller support.
- Motion
- ScaleMotion - Animate (tween) scale on interaction. (Game counter labels.)
- TwistMotion - Animate (tween) scale and rotation on interaction. (UI nodes.)
- Supplemental
- ResizeOnDisabledStretchMode - Custom UI scaling if "stretch mode: disabled".
- Audio
- Node
- Game
- ParticleQueue - Emit any scene via GPU particles as SubViewport.
- Menu
- MenuButton - Localized menu button.
- MenuDropdown - Localized dropdown option button.
- MenuSlider - Localized menu slider with accessibility buttons.
- MenuToggle - Localized menu toggle button (ON or OFF).
- Game
- Scene
- BootSplashScene (Main Scene) - Smooth transition to menu scene.
- MenuScene - Manages menu scenes as children.
- MainMenu - Display buttons to enter other menus or next scene.
- OptionsMenu - Manages options (persistent app settings) scenes.
- AudioOptions - Configure Music and SFX volume or mute.
- VideoOptions - Display, Resolution, VSync, FPS Limit, Anti-Alias.
- ControlsOptions - Change (add or remove) keybinds.
- GameOptions - Custom options, e.g. toggle autosave.
- CreditsMenu - Renders CREDITS.md file in-game with formatting.
- SaveFilesMenu - List of files: play, import, export, delete, rename.
- GameScene - Example incremental game mechanics and effects.
- PauseMenu - Pause gameplay, change options. Esc key shortcut.
- Const - Collections of commonly used constants.
- Enum - Collections of organised values.
- Object
- ActionHandler - Implements the (light) command pattern design.
- ConfigStorage - Persists (save & load) app settings in INI file.
- LinkedMap - Dictionary data structure that tracks order of keys.
- Util
- DatetimeUtils - Useful for save file metadata (e.g. last played at).
- FileSystemUtils - Robust functions to extract file paths and names.
- MarshallsUtils - Convert data formats with optional encryption.
- MathUtils - Integer power function, base conversion and similar.
- NodeUtils - Collection of node manipulation functions.
- NumberUtils - Numbers format (digits, metric, scientific), validate.
- RandomUtils - Weighted Loot Table and random string functions.
- StringUtils - String functions for validation and transformations.
- ThemeUtils - Shortcut Theme getters and setters.
- ConfirmationDialogJsLoader
- Native HTML/CSS/JS dialog to access clipboard in web build.
- Supports transfer of Theme resource properties to CSS style.
- Useful because Godot Nodes cannot read or write to web clipboard.
- Itch.io
- Project uses
release_master.yml
to automate uploads to itch.io page. - You can disable this by deleting the mentioned file.
- You can enable this by doing the following:
- Generate new API key in Itch settings, setup
BUTLER_API_KEY
secret in Github. - Create a new game project page on Itch.
- Setup
ITCHIO_GAME
andITCHIO_USERNAME
secrets in Github.
- Generate new API key in Itch settings, setup
- Project uses
- quality_check.yml
- Automatically check gdlintrc coding style standards.
Godot Engine has known issues requiring hacks (workarounds) until officially resolved.
List of relevant issues (and current hacks/workarounds/solutions) as of Godot 4.3 stable:
- General
- Issue #66014 suffixed tres files. Solved with sanitization.
- Issue #65390 defect GPU particles. Solved with interpolate toggle.
- Issue #35836 font size tween lag. Solved by scale tween instead.
- Issue #89712 "hicon" is null sometimes. TODO?
- Issues #75369, #71182, #61929 large scene lag sometimes. TODO?
- Desktop
- Web
TODO: Test the template on following platforms.
- Linux
- MacOS
- iOS
- Android
After setup, you should have no errors and no warnings.
- Either click Use this template in Github or clone the repository.
- Setup GDScript Toolkit python package to use formatter and linter plugins.
- Open (Import) the project for the first time in the Godot Editor.
- Enable all plugins, then restart the project "Project > Reload Current Project".
On Godot 4.3 you must also:
- Do font uuid workaround by opening
res://resources/global/theme.tres
and clear then set again the fontnoto_sans.woff
. - Do font fallbacks workaround by editing
noto_sans.woff.import
and pasting lines:
Fallbacks=null
fallbacks=[Resource("res://assets/font/noto_sans/woff/noto_sans_arabic.woff"), Resource("res://assets/font/noto_sans/woff/noto_sans_hebrew.woff"), Resource("res://assets/font/noto_sans/woff/noto_sans_hk.woff"), Resource("res://assets/font/noto_sans/woff/noto_sans_jp.woff"), Resource("res://assets/font/noto_sans/woff/noto_sans_kr.woff"), Resource("res://assets/font/noto_sans/woff/noto_sans_sc.woff"), Resource("res://assets/font/noto_sans/woff/noto_sans_tc.woff"), Resource("res://assets/font/noto_sans/woff/noto_sans_thai.woff")]
Optional:
- See the CI/CD section of this README to configure deployment.
For questions and help, open a Github Issue or contact my Discord tiny_takin_teller
.
- Opening the project for the first time, I have errors/warnings?
- Try (re)enable all Plugins and then select "Reload Current Project".
- Warning "ext_resource, invalid UID" when opening the project?
- Resolve by re-saving the mentioned scene (.tscn), e.g. rename root node.
Editor layout can be changed via "Editor > Editor Layout > ..." in Godot Editor.
To use my layout, locate editor_layouts.cfg
in Editor Data Paths and add:
[takin_godot_template]
dock_1_selected_tab_idx=0
dock_5_selected_tab_idx=0
dock_floating={}
dock_bottom=[]
dock_closed=[]
dock_split_1=0
dock_split_3=0
dock_hsplit_1=365
dock_hsplit_2=170
dock_hsplit_3=-430
dock_hsplit_4=0
dock_filesystem_h_split_offset=240
dock_filesystem_v_split_offset=0
dock_filesystem_display_mode=0
dock_filesystem_file_sort=0
dock_filesystem_file_list_display_mode=1
dock_filesystem_selected_paths=PackedStringArray("res://")
dock_filesystem_uncollapsed_paths=PackedStringArray("res://")
dock_1="FileSystem,Scene,Scene Manager"
dock_5="Inspector,Node,Import,History"
For editor features, you can change "Editor > Manage Editor Features..." (e.g. toggle 3D Editor view).
- Open a new Issue for discussion first, later Fork and open a pull request.
-
Godot Examples
-
Godot Engine
-
Godot Extensions
-
Godot Templates