Godot - Simple Menu Settings Game Example

This is a small Godot game that showcases a simple 2D settings menu in a 3D environment. The settings menu includes three user options for changing the game window’s width, height, and mode (e.g. full screen or windowed).

Settings are retrieved from a file on disk in JSON format. When the “Apply” button is clicked, the current settings are saved to the file on disk.

Note - While in game, you can use the escape key to toggle the 2D menu.

General Settings
Here’s a list of general settings the script uses.

  • Default Width - The default screen width. (default 1920)
  • Default Height - The default screen height. (default 1080)
  • Default Windowed - Whether to run windowed mode by default. (default true)
  • Settings Path - A path to the settings file on disk. (default ./settings.json)

Images

preview01.png

Source Code