├── Properties └── .gdignore ├── Framework ├── Game.cs.uid ├── InputActions.cs.uid ├── Autoloads │ ├── BBColor.cs.uid │ ├── Logger.cs.uid │ ├── AudioManager.cs.uid │ ├── Autoloads.cs.uid │ ├── ModLoaderUI.cs.uid │ ├── SceneManager.cs.uid │ ├── Services.cs.uid │ ├── BBColor.cs │ ├── Autoloads.tscn │ ├── Services.cs │ ├── ModLoaderUI.cs │ ├── Autoloads.cs │ ├── SceneManager.cs │ ├── AudioManager.cs │ └── Logger.cs ├── Debugging │ ├── Commands.cs.uid │ ├── Profiler.cs.uid │ ├── MetricsOverlay.cs.uid │ ├── ProfilerEntry.cs.uid │ ├── ProfilerEntry.cs │ ├── Commands.cs │ ├── Profiler.cs │ └── MetricsOverlay.cs ├── Scenes │ ├── MenuScenes.cs.uid │ ├── Scenes.cs.uid │ ├── MainMenuNav.cs.uid │ ├── Options │ │ ├── Options.cs.uid │ │ ├── Scripts │ │ │ ├── OptionsNav.cs.uid │ │ │ ├── OptionsAudio.cs.uid │ │ │ ├── OptionsDisplay.cs.uid │ │ │ ├── OptionsGeneral.cs.uid │ │ │ ├── OptionsInput.cs.uid │ │ │ ├── OptionsManager.cs.uid │ │ │ ├── OptionsGameplay.cs.uid │ │ │ ├── OptionsGraphics.cs.uid │ │ │ ├── ResourceHotkeys.cs.uid │ │ │ ├── ResourceOptions.cs.uid │ │ │ ├── ResourceHotkeys.cs │ │ │ ├── OptionsAudio.cs │ │ │ ├── OptionsGeneral.cs │ │ │ ├── OptionsGameplay.cs │ │ │ ├── OptionsGraphics.cs │ │ │ ├── ResourceOptions.cs │ │ │ ├── OptionsNav.cs │ │ │ ├── OptionsDisplay.cs │ │ │ └── OptionsManager.cs │ │ └── Options.cs │ ├── PopupMenu │ │ ├── PopupMenu.cs.uid │ │ ├── PopupMenu.cs │ │ └── PopupMenu.tscn │ ├── MenuUI │ │ ├── Credits │ │ │ ├── Credits.cs.uid │ │ │ ├── Credits.tscn │ │ │ └── Credits.cs │ │ ├── Console │ │ │ └── Gear.png │ │ └── MainMenu │ │ │ └── MainMenu.tscn │ ├── Scenes.cs │ ├── MenuScenes.cs │ ├── MenuScenes.tres │ └── MainMenuNav.cs ├── Components │ ├── Component.cs.uid │ ├── ComponentManager.cs.uid │ ├── RotationComponent.cs.uid │ ├── RotationComponent.cs │ ├── Component.cs │ └── ComponentManager.cs ├── Console │ ├── ConsoleHistory.cs.uid │ ├── GameConsole.cs.uid │ ├── CommandLineArgs.cs.uid │ ├── ConsoleCommandInfo.cs.uid │ ├── ConsoleCommandInfo.cs │ ├── ConsoleHistory.cs │ ├── GameConsole.tscn │ ├── CommandLineArgs.cs │ └── GameConsole.cs ├── ModLoader │ ├── ModLoader.cs.uid │ ├── ModLoader.cs │ └── ModLoader.tscn ├── Theme │ ├── FocusOutlineManager.cs.uid │ ├── CornerDashOutline.png │ ├── PressedButton.tres │ ├── CornerDashOutline.tres │ ├── NormalButton.tres │ ├── MainTheme.tres │ └── FocusOutlineManager.cs ├── Icon.svg ├── Localisation │ └── text.csv ├── Game.cs └── InputActions.cs ├── Setup ├── SetupEditor.cs.uid ├── SetupUI.cs.uid ├── SetupUtils.cs.uid ├── CheckDotNetVersion.cs.uid ├── VSCode Templates │ ├── launch.json │ └── tasks.json ├── SetupEditor.cs ├── CheckDotNetVersion.cs ├── SetupUI.cs ├── SetupUtils.cs └── SetupUI.tscn ├── .gitattributes ├── addons ├── GodotUtils.dll └── Visualize.dll ├── Mods └── Example Mod │ ├── Mod.dll │ ├── mod.pck │ └── mod.json ├── .gitmodules ├── Template.csproj.user ├── Level.tscn ├── Credits.txt ├── .gitignore ├── LICENSE ├── Template.sln ├── .editorconfig ├── Template.csproj ├── README.md └── project.godot /Properties/.gdignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Framework/Game.cs.uid: -------------------------------------------------------------------------------- 1 | uid://ct7wor4v6sbsp 2 | -------------------------------------------------------------------------------- /Setup/SetupEditor.cs.uid: -------------------------------------------------------------------------------- 1 | uid://do87uqxx44ab8 2 | -------------------------------------------------------------------------------- /Setup/SetupUI.cs.uid: -------------------------------------------------------------------------------- 1 | uid://dosqetacy3knn 2 | -------------------------------------------------------------------------------- /Setup/SetupUtils.cs.uid: -------------------------------------------------------------------------------- 1 | uid://dtfwm0v2yt6pl 2 | -------------------------------------------------------------------------------- /Framework/InputActions.cs.uid: -------------------------------------------------------------------------------- 1 | uid://7tilyyyanloa 2 | -------------------------------------------------------------------------------- /Framework/Autoloads/BBColor.cs.uid: -------------------------------------------------------------------------------- 1 | uid://n1sa3nkk7iho 2 | -------------------------------------------------------------------------------- /Framework/Autoloads/Logger.cs.uid: -------------------------------------------------------------------------------- 1 | uid://br42xukyu1bkq 2 | -------------------------------------------------------------------------------- /Framework/Debugging/Commands.cs.uid: -------------------------------------------------------------------------------- 1 | uid://2ai8vctcbook 2 | -------------------------------------------------------------------------------- /Framework/Scenes/MenuScenes.cs.uid: -------------------------------------------------------------------------------- 1 | uid://17yxgcswri77 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Scenes.cs.uid: -------------------------------------------------------------------------------- 1 | uid://dhjdrl43yn46w 2 | -------------------------------------------------------------------------------- /Setup/CheckDotNetVersion.cs.uid: -------------------------------------------------------------------------------- 1 | uid://blxj0cebqkjo2 2 | -------------------------------------------------------------------------------- /Framework/Autoloads/AudioManager.cs.uid: -------------------------------------------------------------------------------- 1 | uid://d102rl17730xk 2 | -------------------------------------------------------------------------------- /Framework/Autoloads/Autoloads.cs.uid: -------------------------------------------------------------------------------- 1 | uid://cdt2k6s3xm13g 2 | -------------------------------------------------------------------------------- /Framework/Autoloads/ModLoaderUI.cs.uid: -------------------------------------------------------------------------------- 1 | uid://duyyelfprqewg 2 | -------------------------------------------------------------------------------- /Framework/Autoloads/SceneManager.cs.uid: -------------------------------------------------------------------------------- 1 | uid://di53rvtypdwb0 2 | -------------------------------------------------------------------------------- /Framework/Autoloads/Services.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bhx5ou1uiwfkj 2 | -------------------------------------------------------------------------------- /Framework/Components/Component.cs.uid: -------------------------------------------------------------------------------- 1 | uid://d26gq73rajotn 2 | -------------------------------------------------------------------------------- /Framework/Console/ConsoleHistory.cs.uid: -------------------------------------------------------------------------------- 1 | uid://rwa25d0443r2 2 | -------------------------------------------------------------------------------- /Framework/Console/GameConsole.cs.uid: -------------------------------------------------------------------------------- 1 | uid://blp5ybyxnppar 2 | -------------------------------------------------------------------------------- /Framework/Debugging/Profiler.cs.uid: -------------------------------------------------------------------------------- 1 | uid://brlcnx2mkimq1 2 | -------------------------------------------------------------------------------- /Framework/ModLoader/ModLoader.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bsp7uk58xytxa 2 | -------------------------------------------------------------------------------- /Framework/Scenes/MainMenuNav.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bi551lrt82awu 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Options.cs.uid: -------------------------------------------------------------------------------- 1 | uid://b88ck7eam4e70 2 | -------------------------------------------------------------------------------- /Framework/Components/ComponentManager.cs.uid: -------------------------------------------------------------------------------- 1 | uid://ct4og8hi8urvd 2 | -------------------------------------------------------------------------------- /Framework/Components/RotationComponent.cs.uid: -------------------------------------------------------------------------------- 1 | uid://0pg7exsmsjkh 2 | -------------------------------------------------------------------------------- /Framework/Console/CommandLineArgs.cs.uid: -------------------------------------------------------------------------------- 1 | uid://cwtgwqgmuuihe 2 | -------------------------------------------------------------------------------- /Framework/Console/ConsoleCommandInfo.cs.uid: -------------------------------------------------------------------------------- 1 | uid://ni0io7iigcb6 2 | -------------------------------------------------------------------------------- /Framework/Debugging/MetricsOverlay.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bamosxalm8lxs 2 | -------------------------------------------------------------------------------- /Framework/Debugging/ProfilerEntry.cs.uid: -------------------------------------------------------------------------------- 1 | uid://dg7hgnei4yux6 2 | -------------------------------------------------------------------------------- /Framework/Scenes/PopupMenu/PopupMenu.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bj7mf85f3xll2 2 | -------------------------------------------------------------------------------- /Framework/Theme/FocusOutlineManager.cs.uid: -------------------------------------------------------------------------------- 1 | uid://crt03orciniqn 2 | -------------------------------------------------------------------------------- /Framework/Scenes/MenuUI/Credits/Credits.cs.uid: -------------------------------------------------------------------------------- 1 | uid://cg3so70gfansf 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/OptionsNav.cs.uid: -------------------------------------------------------------------------------- 1 | uid://pdomcsu3uajx 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/OptionsAudio.cs.uid: -------------------------------------------------------------------------------- 1 | uid://nots3syd4eur 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/OptionsDisplay.cs.uid: -------------------------------------------------------------------------------- 1 | uid://duywpdpydv488 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/OptionsGeneral.cs.uid: -------------------------------------------------------------------------------- 1 | uid://byg8c8jdptylv 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/OptionsInput.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bpcd5ahs73ga4 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/OptionsManager.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bji01posut5cy 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/OptionsGameplay.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bnb0qpdygtgve 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/OptionsGraphics.cs.uid: -------------------------------------------------------------------------------- 1 | uid://bkctgqs1uogu8 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/ResourceHotkeys.cs.uid: -------------------------------------------------------------------------------- 1 | uid://b671novbig7ts 2 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/ResourceOptions.cs.uid: -------------------------------------------------------------------------------- 1 | uid://csiwm4478j43k 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Normalize EOL for all files that Git considers text files. 2 | * text=auto eol=lf 3 | -------------------------------------------------------------------------------- /addons/GodotUtils.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CSharpGodotTools/Template/HEAD/addons/GodotUtils.dll -------------------------------------------------------------------------------- /addons/Visualize.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CSharpGodotTools/Template/HEAD/addons/Visualize.dll -------------------------------------------------------------------------------- /Mods/Example Mod/Mod.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CSharpGodotTools/Template/HEAD/Mods/Example Mod/Mod.dll -------------------------------------------------------------------------------- /Mods/Example Mod/mod.pck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CSharpGodotTools/Template/HEAD/Mods/Example Mod/mod.pck -------------------------------------------------------------------------------- /Framework/Theme/CornerDashOutline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CSharpGodotTools/Template/HEAD/Framework/Theme/CornerDashOutline.png -------------------------------------------------------------------------------- /Framework/Scenes/MenuUI/Console/Gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CSharpGodotTools/Template/HEAD/Framework/Scenes/MenuUI/Console/Gear.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "addons/imgui-godot"] 2 | path = addons/imgui-godot 3 | url = https://github.com/CSharpGodotTools/imgui-godot-csharp 4 | -------------------------------------------------------------------------------- /Template.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Framework/Scenes/Scenes.cs: -------------------------------------------------------------------------------- 1 | using Godot; 2 | 3 | namespace __TEMPLATE__.UI; 4 | 5 | [GlobalClass] 6 | public partial class Scenes : Node 7 | { 8 | [Export] public PackedScene Game { get; private set; } 9 | } 10 | -------------------------------------------------------------------------------- /Mods/Example Mod/mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Example Mod", 3 | "id": "example_mod", 4 | "modVersion": "1.0", 5 | "gameVersion": "*", 6 | "description": "Example description.", 7 | "author": "valkyrienyanko", 8 | "dependencies": {}, 9 | "incompatibilities": {} 10 | } 11 | -------------------------------------------------------------------------------- /Framework/Console/ConsoleCommandInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace __TEMPLATE__.UI.Console; 4 | 5 | public class ConsoleCommandInfo 6 | { 7 | public required string Name { get; set; } 8 | public required Action Code { get; set; } // string[] is the the functions params 9 | public string[] Aliases { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /Framework/Autoloads/BBColor.cs: -------------------------------------------------------------------------------- 1 | namespace __TEMPLATE__; 2 | 3 | // Full list of BBCode color tags: https://absitomen.com/index.php?topic=331.0 4 | public enum BBColor 5 | { 6 | Gray, 7 | DarkGray, 8 | Green, 9 | DarkGreen, 10 | LightGreen, 11 | Aqua, 12 | DarkAqua, 13 | Deepskyblue, 14 | Magenta, 15 | Red, 16 | White, 17 | Yellow, 18 | Orange 19 | } 20 | -------------------------------------------------------------------------------- /Framework/Theme/PressedButton.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="StyleBoxFlat" format=3 uid="uid://b8uqbeckjjkp0"] 2 | 3 | [resource] 4 | bg_color = Color(0.24524486, 0.2554823, 0.39747292, 1) 5 | border_width_top = 5 6 | border_color = Color(1, 1, 1, 0) 7 | corner_radius_top_left = 10 8 | corner_radius_top_right = 10 9 | corner_radius_bottom_right = 10 10 | corner_radius_bottom_left = 10 11 | anti_aliasing = false 12 | -------------------------------------------------------------------------------- /Level.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://djhd6uw7l1ok"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://c6pism2kgjr5c" path="res://Framework/Scenes/PopupMenu/PopupMenu.tscn" id="1_bexhn"] 4 | 5 | [node name="Main" type="Node2D"] 6 | 7 | [node name="CanvasLayer" type="CanvasLayer" parent="."] 8 | 9 | [node name="PopupMenu" parent="CanvasLayer" instance=ExtResource("1_bexhn")] 10 | visible = false 11 | -------------------------------------------------------------------------------- /Framework/Scenes/MenuScenes.cs: -------------------------------------------------------------------------------- 1 | using Godot; 2 | 3 | namespace __TEMPLATE__.UI; 4 | 5 | [GlobalClass] 6 | public partial class MenuScenes : Resource 7 | { 8 | [Export] public PackedScene MainMenu { get; private set; } 9 | [Export] public PackedScene ModLoader { get; private set; } 10 | [Export] public PackedScene Options { get; private set; } 11 | [Export] public PackedScene Credits { get; private set; } 12 | } 13 | -------------------------------------------------------------------------------- /Framework/Theme/CornerDashOutline.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="StyleBoxTexture" load_steps=2 format=3 uid="uid://bb5d4xfkdayi8"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://djggjhepn0bsf" path="res://Framework/Theme/CornerDashOutline.png" id="1_h1p6h"] 4 | 5 | [resource] 6 | texture = ExtResource("1_h1p6h") 7 | texture_margin_left = 8.0 8 | texture_margin_top = 8.0 9 | texture_margin_right = 8.0 10 | texture_margin_bottom = 8.0 11 | draw_center = false 12 | -------------------------------------------------------------------------------- /Framework/Theme/NormalButton.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="StyleBoxFlat" format=3 uid="uid://bu2ywx2nob8v3"] 2 | 3 | [resource] 4 | content_margin_left = 10.0 5 | content_margin_right = 10.0 6 | bg_color = Color(0.112, 0.112, 0.14, 1) 7 | border_width_bottom = 5 8 | border_color = Color(0.0923971, 0.0923971, 0.0923971, 1) 9 | corner_radius_top_left = 10 10 | corner_radius_top_right = 10 11 | corner_radius_bottom_right = 10 12 | corner_radius_bottom_left = 10 13 | -------------------------------------------------------------------------------- /Credits.txt: -------------------------------------------------------------------------------- 1 | [h1]Big Header 2 | 3 | [h2]Smaller Header 4 | 5 | Anything here will show up in the credits in-game. Update this file with the appropriate credits!!! 6 | 7 | You do NOT have to mention the link to Template although it is appreciated. 8 | 9 | This game used https://github.com/CSharpGodotTools/Template by Valkyrienyanko and Contributors 10 | 11 | [h2]Assets Used 12 | 13 | "Example Asset" by FirstName LastName LICENSED CC0: https://github.com/ 14 | -------------------------------------------------------------------------------- /Setup/VSCode Templates/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Debug Game", 6 | "type": "coreclr", 7 | "request": "launch", 8 | "preLaunchTask": "build", 9 | "program": "ENGINE_EXE", 10 | "args": [], 11 | "cwd": "${workspaceFolder}", 12 | "stopAtEntry": false, 13 | "console": "integratedTerminal" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /Framework/Components/RotationComponent.cs: -------------------------------------------------------------------------------- 1 | using Godot; 2 | 3 | namespace __TEMPLATE__; 4 | 5 | // Useful to quickly rotate a Sprite2D node to see if the game is truly paused or not 6 | [GlobalClass] 7 | public partial class RotationComponent : Node 8 | { 9 | [Export] private float _speed = 1.5f; 10 | 11 | private Node2D _parent; 12 | 13 | public override void _Ready() 14 | { 15 | _parent = GetParent(); 16 | } 17 | 18 | public override void _Process(double delta) 19 | { 20 | _parent.Rotation += _speed * (float)delta; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Godot 2 | .godot/* 3 | Exported/* 4 | .import/ 5 | **/*.import 6 | export.cfg 7 | export_presets.cfg 8 | *.translation 9 | 10 | # Addons 11 | addons/**/*.template_debug.x86_64.dll 12 | 13 | # GdUnit4 14 | TestResults/ 15 | 16 | # Mono-specific 17 | .mono/ 18 | data_*/ 19 | mono_crash.*.json 20 | *.DotSettings.user 21 | 22 | # Visual Studio 23 | .vs/* 24 | Properties/* 25 | 26 | # Visual Studio Code 27 | .vscode/* 28 | 29 | # Rider 30 | .idea/* 31 | 32 | # enet custom 33 | ENet-CSharp.dll 34 | 35 | libenet.so 36 | enet.so 37 | 38 | libenet.dylib 39 | enet.dylib 40 | 41 | # os files 42 | .DS_Store 43 | 44 | # Include these files 45 | !**/*.gdignore 46 | !.vscode/settings.json 47 | !.vscode/extensions.json 48 | 49 | # Make sure this file is ignored 50 | .godot/.gdignore 51 | -------------------------------------------------------------------------------- /Setup/SetupEditor.cs: -------------------------------------------------------------------------------- 1 | using Godot; 2 | using System; 3 | using System.Diagnostics; 4 | 5 | namespace __TEMPLATE__.Setup; 6 | 7 | public class SetupEditor 8 | { 9 | public static void Start() 10 | { 11 | OS.Execute(OS.GetExecutablePath(), ["--editor"]); 12 | } 13 | 14 | public static void Restart() 15 | { 16 | Quit(); 17 | Start(); 18 | } 19 | 20 | public static void Quit() 21 | { 22 | string[] names = ["redot", "godot"]; 23 | 24 | foreach (Process process in Process.GetProcesses()) 25 | { 26 | foreach (string name in names) 27 | { 28 | string winTitle = process.MainWindowTitle.ToLower(); 29 | 30 | if (winTitle.Contains(name) && !winTitle.Contains("console")) 31 | { 32 | process.Kill(); 33 | return; 34 | } 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Framework/Icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Framework/Scenes/MenuScenes.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="MenuScenes" load_steps=6 format=3 uid="uid://xig0kceiok04"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://rbcqvr4snrvn" path="res://Framework/Scenes/MenuUI/Credits/Credits.tscn" id="1_sc3de"] 4 | [ext_resource type="PackedScene" uid="uid://d4a5xfmaulku1" path="res://Framework/Scenes/MenuUI/MainMenu/MainMenu.tscn" id="2_65alf"] 5 | [ext_resource type="PackedScene" uid="uid://d1jo48n2hdkih" path="res://Framework/ModLoader/ModLoader.tscn" id="3_jpuli"] 6 | [ext_resource type="PackedScene" uid="uid://7tfets4irkba" path="res://Framework/Scenes/Options/Options.tscn" id="4_u3dbg"] 7 | [ext_resource type="Script" uid="uid://17yxgcswri77" path="res://Framework/Scenes/MenuScenes.cs" id="5_o2h5i"] 8 | 9 | 10 | [resource] 11 | script = ExtResource("5_o2h5i") 12 | MainMenu = ExtResource("2_65alf") 13 | ModLoader = ExtResource("3_jpuli") 14 | Options = ExtResource("4_u3dbg") 15 | Credits = ExtResource("1_sc3de") 16 | -------------------------------------------------------------------------------- /Framework/Debugging/ProfilerEntry.cs: -------------------------------------------------------------------------------- 1 | using Godot; 2 | 3 | namespace __TEMPLATE__.Debugging; 4 | 5 | public class ProfilerEntry 6 | { 7 | public ulong StartTimeUsec { get; private set; } 8 | public ulong AccumulatedTimeUsec { get; private set; } 9 | public int FrameCount { get; private set; } 10 | 11 | public void Start() 12 | { 13 | StartTimeUsec = Time.GetTicksUsec(); 14 | } 15 | 16 | public void Stop() 17 | { 18 | AccumulatedTimeUsec += Time.GetTicksUsec() - StartTimeUsec; 19 | FrameCount++; 20 | } 21 | 22 | public void Reset() 23 | { 24 | AccumulatedTimeUsec = 0UL; 25 | FrameCount = 0; 26 | } 27 | 28 | /// 29 | /// Returns the average frame time in milliseconds with specified accuracy. 30 | /// 31 | public string GetAverageMs(int accuracy) 32 | { 33 | if (FrameCount == 0) 34 | return "0.0"; 35 | 36 | double avgMs = (double)AccumulatedTimeUsec / FrameCount / 1000.0; 37 | return avgMs.ToString($"F{accuracy}"); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 ValksGodotTools 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Framework/Debugging/Commands.cs: -------------------------------------------------------------------------------- 1 | using __TEMPLATE__.UI.Console; 2 | using GodotUtils; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace __TEMPLATE__.UI; 7 | 8 | public class Commands 9 | { 10 | public static void RegisterAll() 11 | { 12 | GameConsole console = Game.Console; 13 | console.RegisterCommand("help", CommandHelp); 14 | console.RegisterCommand("quit", CommandQuit).WithAliases("exit"); 15 | console.RegisterCommand("debug", CommandDebug); 16 | } 17 | 18 | private static void CommandHelp(string[] args) 19 | { 20 | IEnumerable cmds = Game.Console.GetCommands().Select(x => x.Name); 21 | Game.Logger.Log(cmds.ToFormattedString()); 22 | } 23 | 24 | private async static void CommandQuit(string[] args) 25 | { 26 | await Autoloads.Instance.ExitGame(); 27 | } 28 | 29 | private static void CommandDebug(string[] args) 30 | { 31 | if (args.Length <= 0) 32 | { 33 | Game.Logger.Log("Specify at least one argument"); 34 | return; 35 | } 36 | 37 | Game.Logger.Log(args[0]); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Template.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.5.2.0 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Template", "Template.csproj", "{87041398-62C1-8D78-B512-37DE781C5205}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Any CPU = Debug|Any CPU 10 | Release|Any CPU = Release|Any CPU 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {87041398-62C1-8D78-B512-37DE781C5205}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 | {87041398-62C1-8D78-B512-37DE781C5205}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 | {87041398-62C1-8D78-B512-37DE781C5205}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 | {87041398-62C1-8D78-B512-37DE781C5205}.Release|Any CPU.Build.0 = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(SolutionProperties) = preSolution 19 | HideSolutionNode = FALSE 20 | EndGlobalSection 21 | GlobalSection(ExtensibilityGlobals) = postSolution 22 | SolutionGuid = {E6313EBD-3921-4BBD-82BF-B3AF80D6765E} 23 | EndGlobalSection 24 | EndGlobal 25 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Scripts/ResourceHotkeys.cs: -------------------------------------------------------------------------------- 1 | using Godot; 2 | using Godot.Collections; 3 | 4 | // This was intentionally set to GodotUtils instead of __TEMPLATE__ as GodotUtils relies on MainMenuBtnPressed 5 | // and GodotUtils should NOT have any trace of using __TEMPLATE__. 6 | namespace __TEMPLATE__.UI; 7 | 8 | /* 9 | * If the ResourceHotkeys.cs script is moved then the file path will not updated 10 | * in the .tres file. In order to fix this go to AppData\Roaming\Godot\app_userdata\Template 11 | * and delete the .tres file so Godot will be forced to generate it from 12 | * scratch. This is not a Godot bug it is just something to look out for. 13 | * 14 | * Resource props must have [Export] attribute otherwise they will not save 15 | * properly. 16 | * 17 | * The 'recommended' way of storing config files can be found here 18 | * https://docs.godotengine.org/en/stable/classes/class_configfile.html 19 | * However this is undesired because values are saved through string keys 20 | * instead of props. 21 | */ 22 | public partial class ResourceHotkeys : Resource 23 | { 24 | [Export] public Dictionary> Actions { get; set; } = []; 25 | } 26 | -------------------------------------------------------------------------------- /Framework/Scenes/Options/Options.cs: -------------------------------------------------------------------------------- 1 | using Godot; 2 | 3 | namespace __TEMPLATE__.UI; 4 | 5 | public partial class Options : PanelContainer 6 | { 7 | private OptionsNav _optionsNav; 8 | private OptionsGeneral _optionsGeneral; 9 | private OptionsGameplay _optionsGameplay; 10 | private OptionsDisplay _optionsDisplay; 11 | private OptionsGraphics _optionsGraphics; 12 | private OptionsAudio _optionsAudio; 13 | private OptionsInput _optionsInput; 14 | 15 | public override void _Ready() 16 | { 17 | _optionsNav = new OptionsNav(this, GetNode