For Godot 4.2
This template has a main menu, pause menu, and credits scene. It supports basic accessibility features like input rebinding, sound, and video controls.
Setup menus and accessibility features in about 15 minutes.
The core components can support a larger project, but the template was originally built to support smaller projects and game jams.
The App/
folder holds the core components of the menus application.
- Main Menu
- Options Menus
- Pause Menu
- Credits
- Loading Screen
- Persistent Settings
- Simple Config Interface
- Keyboard/Mouse Support
- Gamepad Support
- Centralized UI Sound Control
The Extras/
folder holds components that extend the core application.
- Example Game Scene
- Opening Scene
- Success & Failure Scenes
- End Credits
- Level Advancement
- Logging Scripts
- Additional Inherited Scenes from
App/
:OptionsMenu.tscn
MasterOptionsMenu.tscn
MainMenu.tscn
PauseMenu.tscn
InitApp.tscn
InitApp.tscn
is the project's main scene. It loads all the configuration settings from the config file (if it exists) into game and sets the loading screen. It then loads the next scene (Opening.tscn
orMainMenu.tscn
).Opening.tscn
is a simple scene for fading in/out a few images at the start of the game. It then loads the next scene (MainMenu.tscn
).MainMenu.tscn
is where a player can start the game, change settings, watch credits, or quit. It can link to the path of a game scene to play, and the packed scene of an options menu to use.SceneLoader.gd
is an autoload script. It can load scenes in the background or with a loading screen (LoadingScreen.tscn
by default).Credits.tscn
reads fromATTRIBUTION.md
to automatically generate the content for it's scrolling text label.- The
UISoundController
node automatically attaches sounds to buttons, tab bars, sliders, and line edits in the scene.UISoundControllerAutoload.tscn
can be enabled in the project autoloads to apply settings project-wide. InGameMenuController.gd
controls opening and closing a menu and pausing the game in the background.- The
PauseMenuController
node loads thePauseMenu.tscn
(usingInGameMenuController.gd
) when triggeringui-cancel
. GameUI.tscn
is a demo game scene that displays recognized action inputs, and features thePauseMenuController
node, theLevelLoader
node to advance through levels, andInGameMenuController.gd
to showSuccessScene.tscn
orFailureScene.tscn
.
App/
contains the core features of the package. On first use, it's recommended to keep the Extras/
folder, and make changes there. Features can be added and removed as needed.
To start minimally, use just the App/
folder, and safely remove the Extras/
folder by following the minimal instructions.
Compare features to decide which approach is best for your project.
If you just want to use just the projects minimum App/
folder:
- Go to
Project > Project Settings… > General > Application > Run
. - Update
Main Scene
tores://App/Scenes/InitApp/InitApp.tscn
. - Go to
Project > Project Settings… > Autoload
. - Remove autoloads that start with the path
res://Extras/...
.ProjectUiSoundController
ProjectLevelLoader
RuntimeLogger
- Close the window.
- Delete the
Extras/
folder. - Reload the project.
The remaining instructions will apply the same for either folder you decide to use.
The pause menu feature can be removed if not used. From the App/
folder, delete PauseMenu/*
, PauseMenuController.gd
, and InGameMenuController.gd
.
Lastly, this README.md
and the Media/
directory can both be removed.
These instructions assume starting with the entire contents of the project folder.
-
Update the project’s name.
- Go to
Project > Project Settings… > General > Application > Config
. - Update
Name
to"Game Name"
. - Close the window.
- Open
MainMenu.tscn
. - Select the
Title
node. - Update the
Text
to"Game Name"
. - Save the scene.
- Go to
-
Point the main menu to the game scene.
- Open
MainMenu.tscn
. - Select the
MainMenu
node. - Update
Game Scene Path
to the path of “Game Name” game scene. - Save the scene.
- Open
-
Update the project’s inputs.
- Go to
Project > Project Settings… > Input Map
. - Update the input actions and keybindings for “Game Name”.
- Close the window.
- Open
InputOptionsMenu.tscn
. - Select the
Controls
node. - Update the
Action Name Map
to show readable names for “Game Name” input actions. - Update the
Add Button Texture
andRemove Button Texture
with textures. - Save the scene.
- Go to
-
Add sound effects to the UI.
-
By scene.
- Open
MainMenu.tscn
andPauseMenu.tscn
. - Select the
UISoundController
node. - Add audio streams to the various UI node events.
- Save the scenes.
- Open
-
Project-wide, with
Extras/
.- Open
UISoundControllerAutoload.tscn
. - Select the
UISoundController
node. - Add audio streams to the various UI node events.
- Save the scene.
- Go to
Project > Project Settings… > Autoload
. - Enable
UISoundControllerAutoload
. - Close the window.
- Open
-
-
Update the game credits / attribution.
-
Copy
ATTRIBUTION_example.md
overATTRIBUTION.md
. -
Update
ATTRIBUTION.md
with “Game Name” credits, following the example. -
Reload
Credits.tscn
scene to apply changes fromATTRIBUTION.md
. -
Include the attribution in exports.
- Go to Project > Export.
- Select one of “Game Name” presets (or set them up).
- Select the Resources tab.
- Update
Filters to export non-resource file/folders
to includeATTRIBUTION.md
. - Close the window.
-
For an existing project, just copy over the App/
folder (optionally the Extras/
folder, as well).
-
Update the project’s main scene.
- Go to
Project > Project Settings… > General > Application > Run
. - Update
Main Scene
tores://…/InitApp.tscn
. - Close the window.
- Go to
-
Update the project’s autoloads.
- Go to
Project > Project Settings… > Autoload
. - Add
res://App/Scripts/SceneLoader.gd
. - Optionally enable
res://Extras/Scripts/RuntimeLogger.gd
. - Close the window.
- Go to
-
Update the project’s name.
- Open
MainMenu.tscn
. - Select the
Title
node. - Update the
Text
toGame Name
. - Save the scene.
- Open
-
Point the main menu to the game scene.
- Open
MainMenu.tscn
. - Select the
MainMenu
node. - Update
Game Scene Path
to the path of “Game Name” game scene. - Save the scene.
- Open
-
Update the project’s inputs.
- Open
InputOptionsMenu.tscn
. - Select the
Controls
node. - Update the
Action Name Map
to show readable names for “Game Name” input actions. - Update the
Add Button Texture
andRemove Button Texture
with textures. - Save the scene.
- Open
-
Add sound effects to the UI.
-
By scene.
- Open
MainMenu.tscn
andPauseMenu.tscn
. - Select the
UISoundController
node. - Add audio streams to the various UI node events.
- Save the scenes.
- Open
-
Project-wide, with
Extras/
.- Open
UISoundControllerAutoload.tscn
. - Select the
UISoundController
node. - Add audio streams to the various UI node events.
- Save the scene.
- Go to
Project > Project Settings… > Autoload
. - Enable
UISoundControllerAutoload
. - Close the window.
- Open
-
-
Update the game credits / attribution.
-
Copy
ATTRIBUTION_example.md
overATTRIBUTION.md
. -
Update
ATTRIBUTION.md
with “Game Name” credits, following the example. -
Reload
Credits.tscn
scene to apply changes fromATTRIBUTION.md
. -
Include the attribution in exports.
- Go to Project > Export.
- Select one of “Game Name” presets (or set them up).
- Select the Resources tab.
- Update
Filters to export non-resource file/folders
to includeATTRIBUTION.md
. - Close the window.
-