Skip to content

appsinacup/addon_shared_menus

 
 

Repository files navigation

Shared Menus Addon

Shared menus used for settings, lobby management and game starting.

example

Project Settings

After enabling this addon, you need to set the following in Project Settings (Some have default values, some don't):

Setting Key Description Default Value
blazium/game/max_players_min Minimum players needed to start a game. 2
blazium/game/max_players_max Maximum players needed to start a game. 10
blazium/game/max_players_default Default players set when creating a lobby. 6
blazium/game/lobby_server_local Use local Lobby Server. false
blazium/game/store_name Set in actions to store name. ""
blazium/game/pogr_client_id Your pogr client id. Used for analytics. ""
blazium/game/pogr_build_id Your pogr build id. Used for analytics. ""
blazium/game/login_game_id Your login game_id. Used for authentication. ""
blazium/game/lobby_game_id Your lobby game_id. Used for multiplayer. ""
blazium/game/menu_competitive_enabled If it should use the Competitive button on main menu or not false

The lobby and login game_id's are required. The pogr id's are only for analytics.

Menus

flowchart TD
	Loading_Screen --Authenticate--> Main_Menu
	Main_Menu --> Settings
	Main_Menu --> About
	Main_Menu --> Quit
	Main_Menu --> Lobby_Creator
	Main_Menu --> Lobby_Browser
	Lobby_Creator --> Lobby_Viewer
	Lobby_Browser --> Lobby_Viewer
	Lobby_Viewer --> Game
Loading

All scenes are located in their own folder. The Game scene is not in this repo but instead it's loaded from res://game/game.tscn. This will be the screen of your game.

Also the following scene can exist to extend functionality of main menu: res://game/menu_persona.tscn.

Also the following scene can exist to extend functionality of settings: res://game/settings_extra.tscn.

Design

Each of the scenes are designed to be resizeable. This is done by having the following structure:

  • Control
    • BlaziumBG (animated interactable background)
      • HBoxContainer
        • LeftSpacer
        • VBoxContainer: Child of this is the content.
        • RightSpacer

The idea is that the left and right spacer will help distribute the spacing evenly (based on stretch_ratio set). These will dissapear on portrait mode (mobile screens).

Then, inside the content, there will be:

  • Label: Title
  • BoxContainer

The BoxContainer is set to either be VBox or HBox based on screen orientation.

Localization

Add the localizations in lang after enabling this addon.

Credits

This repo is forked from blazium-engine/blazium-shared-menus

About

Shared Menus used in games

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • GDScript 94.9%
  • Python 2.8%
  • GDShader 2.3%