From f8cb37a801fd0acc5b05fe97063bad0e49d1c28f Mon Sep 17 00:00:00 2001 From: Conor Damery <90935800+ConorDamery@users.noreply.github.com> Date: Fri, 28 Jun 2024 00:04:39 +0200 Subject: [PATCH] [Updated] Gauntlet WIP custom modules --- CMakeLists.txt | 18 +- CMakeSettings.json | 9 +- README.md | 14 +- editor/imgui.ini | 302 ++++++++++++++++++ .../editor.json => editor/settings.json | 22 +- extern/bx | 2 +- game/settings/game.json | 8 +- include/editor/inspector.hpp | 0 include/framework/components/custom_cmp.hpp | 8 + include/framework/systems/custom_sys.hpp | 13 + src/application.cpp | 14 + src/editor/inspector.cpp | 0 src/framework/components/custom_cmp.cpp | 0 src/framework/systems/custom_sys.cpp | 17 + 14 files changed, 407 insertions(+), 20 deletions(-) create mode 100644 editor/imgui.ini rename game/settings/editor.json => editor/settings.json (91%) create mode 100644 include/editor/inspector.hpp create mode 100644 include/framework/components/custom_cmp.hpp create mode 100644 include/framework/systems/custom_sys.hpp create mode 100644 src/application.cpp create mode 100644 src/editor/inspector.cpp create mode 100644 src/framework/components/custom_cmp.cpp create mode 100644 src/framework/systems/custom_sys.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b689b1..dfb6068 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,9 +5,23 @@ project (Gauntlet) add_subdirectory (extern) set (SRCS - # Custom files here + "src/application.cpp" + + "src/framework/components/custom_cmp.cpp" + "src/framework/systems/custom_sys.cpp" +) + +if (BX_BUILD_EDITOR) + set (SRCS ${SRCS} + "src/editor/inspector.cpp" ) +endif () + +include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) add_executable (${PROJECT_NAME} ${SRCS}) target_link_libraries (${PROJECT_NAME} bx) -install(TARGETS ${PROJECT_NAME} DESTINATION bin) \ No newline at end of file + +if (BX_INSTALL) + install(TARGETS ${PROJECT_NAME} DESTINATION bin) +endif () \ No newline at end of file diff --git a/CMakeSettings.json b/CMakeSettings.json index d6386e2..700272c 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -66,7 +66,14 @@ "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "", - "inheritEnvironments": [ "msvc_x64_x64" ] + "inheritEnvironments": [ "msvc_x64_x64" ], + "variables": [ + { + "name": "BX_INSTALL", + "value": "True", + "type": "BOOL" + } + ] } ] } \ No newline at end of file diff --git a/README.md b/README.md index 7823fe2..0a70a45 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Gauntlet + A remake of the arcade game [Gauntlet](https://en.wikipedia.org/wiki/Gauntlet_(1985_video_game)) with 3D graphics inspired on [Gauntlet Slayer Edition](https://store.steampowered.com/app/258970/Gauntlet_Slayer_Edition/). The point of this remake is to develop an engine with similar capabilities and support for the Raspberry Pi 4. @@ -13,7 +14,18 @@ Launch Visual Studio and open a new CMake project by navigating to *"File->Open- Alternatively, you can right click on the root folder which has this file and in the drop box menu select *"Open with Visual Studio"* -After opening Visual Studio will start generating the cache, once it completes without errors there should be two targets called *"Gauntlet.exe"* and *"GauntletEditor.exe"*, which are the game and editor runtimes respectively. +After opening Visual Studio will start generating the cache, once it completes without errors there should be five configurations to pick from: + +- Win64-Editor-(Config)-MSVC +- Win64-Game-(Config)-MSVC + +Where (Config) is either Debug, Release, or Shipping. Editor configurations will include the editor and should not be used for shipping builds. + +There should also be two targets called *"Gauntlet.exe"* and *"Gauntlet.exe (Install) (bin\)Guantlet.exe"*, which are the game runtimes, the latter used to package the project. + + + +### For RPi/Linux (WIP) When switching to the ARM based platform rsync will need to copy all the assets and source files over, this might take a while so if the connection times-out try deleting the cache and re-generating it. diff --git a/editor/imgui.ini b/editor/imgui.ini new file mode 100644 index 0000000..f38660f --- /dev/null +++ b/editor/imgui.ini @@ -0,0 +1,302 @@ +[Window][Debug##Default] +Pos=677,354 +Size=400,400 +Collapsed=0 + +[Window][Importing] +Pos=720,458 +Size=480,101 +Collapsed=0 + +[Window][ Data] +Pos=1318,60 +Size=594,628 +Collapsed=0 +DockId=0x0000000A,1 + +[Window][Scene] +Pos=258,62 +Size=257,234 +Collapsed=0 +DockId=0x00000007,0 + +[Window][Inspector] +Pos=7,455 +Size=508,358 +Collapsed=0 +DockId=0x00000003,0 + +[Window][GameObjects] +Pos=7,62 +Size=249,234 +Collapsed=0 +DockId=0x00000006,0 + +[Window][Assets] +Pos=7,298 +Size=508,155 +Collapsed=0 +DockId=0x00000005,0 + +[Window][##GizmoControls] +Pos=256,86 +Size=214,220 +Collapsed=0 + +[Window][Profiler] +Pos=1265,61 +Size=651,589 +Collapsed=0 + +[Window][Settings] +Pos=466,151 +Size=346,278 +Collapsed=0 + +[Window][ Console] +Pos=8,690 +Size=1340,319 +Collapsed=0 +DockId=0x0000000D,1 + +[Window][Dear ImGui Demo] +Pos=781,63 +Size=525,681 +Collapsed=1 + +[Window][Example: Console] +Pos=225,294 +Size=520,600 +Collapsed=0 + +[Window][Example: Custom rendering] +Pos=60,60 +Size=485,428 +Collapsed=0 + +[Window][Example: Log] +Pos=60,60 +Size=500,400 +Collapsed=0 + +[Window][Title bar Hovered/Active tests] +Pos=60,60 +Size=367,62 +Collapsed=0 + +[Window][Example: Property editor] +Pos=60,60 +Size=430,450 +Collapsed=0 + +[Window][Dear ImGui Stack Tool] +Pos=902,101 +Size=387,439 +Collapsed=0 + +[Window][Dear ImGui Debug Log] +Pos=1118,178 +Size=735,299 +Collapsed=0 + +[Window][Dear ImGui Metrics/Debugger] +Pos=1209,152 +Size=274,354 +Collapsed=0 + +[Window][Example: Long text display] +Pos=61,57 +Size=520,600 +Collapsed=0 + +[Window][DockSpace Demo] +Pos=0,18 +Size=1920,999 +Collapsed=0 + +[Window][Same title as another window##2] +Pos=100,200 +Size=344,62 +Collapsed=0 + +[Window][Same title as another window##1] +Pos=496,422 +Size=344,62 +Collapsed=0 + +[Window][###AnimatedTitle] +Pos=416,585 +Size=194,48 +Collapsed=0 + +[Window][Example: Constrained Resize] +Pos=271,253 +Size=441,500 +Collapsed=0 + +[Window][Example: Documents] +Pos=60,60 +Size=546,926 +Collapsed=0 + +[Window][Lettuce] +Pos=68,158 +Size=530,820 +Collapsed=0 +DockId=0xA086D808,5 + +[Window][Eggplant] +Pos=68,158 +Size=530,820 +Collapsed=0 +DockId=0xA086D808,0 + +[Window][Carrot] +Pos=68,158 +Size=530,820 +Collapsed=0 +DockId=0xA086D808,1 + +[Window][Tomato] +Pos=68,158 +Size=530,820 +Collapsed=0 +DockId=0xA086D808,2 + +[Window][A Rather Long Title] +Pos=68,158 +Size=530,820 +Collapsed=0 +DockId=0xA086D808,3 + +[Window][Some Document] +Pos=68,158 +Size=530,820 +Collapsed=0 +DockId=0xA086D808,4 + +[Window][Example: Simple layout] +Pos=295,328 +Size=500,440 +Collapsed=0 + +[Window][Delete?] +Pos=829,445 +Size=262,126 +Collapsed=0 + +[Window][Stacked 1] +Pos=782,416 +Size=343,176 +Collapsed=0 + +[Window][Stacked 2] +Pos=730,462 +Size=188,136 +Collapsed=0 + +[Window][ Profiler] +Pos=1350,690 +Size=562,319 +Collapsed=0 +DockId=0x0000000F,0 + +[Window][ Scene] +Pos=306,60 +Size=1010,628 +Collapsed=0 +DockId=0x00000008,0 + +[Window][ Inspector] +Pos=1318,60 +Size=594,628 +Collapsed=0 +DockId=0x0000000A,0 + +[Window][ Assets] +Pos=8,690 +Size=1340,319 +Collapsed=0 +DockId=0x0000000D,0 + +[Window][ GameObjects] +Pos=8,60 +Size=296,237 +Collapsed=0 +DockId=0x00000012,0 + +[Window][CreatePopup] +Pos=720,381 +Size=480,254 +Collapsed=0 + +[Window][##Scene] +Pos=60,60 +Size=32,34 +Collapsed=0 + +[Window][SceneTexture] +Pos=268,60 +Size=1219,661 +Collapsed=0 +DockId=0x00000010,0 + +[Window][##SceneTexture] +Pos=60,60 +Size=32,32 +Collapsed=0 + +[Window][##DockSpace] +Pos=0,34 +Size=1920,983 +Collapsed=0 + +[Window][Hierarchy] +Pos=8,299 +Size=296,389 +Collapsed=0 +DockId=0x00000013,0 + +[Table][0xD0F0C6E3,2] +Column 0 Weight=1.0000 +Column 1 Weight=1.0000 + +[Table][0xE0773582,3] +Column 0 Weight=1.0000 +Column 1 Weight=1.0000 +Column 2 Weight=1.0000 + +[Table][0x82CBB907,3] +Column 0 Weight=1.0000 +Column 1 Weight=1.0000 +Column 2 Weight=1.0000 + +[Table][0x49D11DC0,3] +RefScale=14 +Column 0 Width=63 +Column 1 Width=63 +Column 2 Width=63 + +[Docking][Data] +DockNode ID=0x00000001 Pos=11,63 Size=229,643 Split=Y + DockNode ID=0x00000002 Parent=0x00000001 SizeRef=404,391 Split=Y Selected=0x26CE0345 + DockNode ID=0x00000004 Parent=0x00000002 SizeRef=404,234 Split=X Selected=0xE192E354 + DockNode ID=0x00000006 Parent=0x00000004 SizeRef=198,135 Selected=0x932C7F92 + DockNode ID=0x00000007 Parent=0x00000004 SizeRef=204,135 Selected=0xE192E354 + DockNode ID=0x00000005 Parent=0x00000002 SizeRef=404,155 Selected=0x26CE0345 + DockNode ID=0x00000003 Parent=0x00000001 SizeRef=404,547 Selected=0x04EEE1F1 +DockSpace ID=0x1AC534AB Window=0xACDAB037 Pos=8,60 Size=1904,949 Split=Y + DockNode ID=0x00000009 Parent=0x1AC534AB SizeRef=1904,628 Split=X Selected=0xC0F476BA + DockNode ID=0x0000000C Parent=0x00000009 SizeRef=296,470 Split=Y Selected=0x3B037D73 + DockNode ID=0x00000012 Parent=0x0000000C SizeRef=130,237 Selected=0x3B037D73 + DockNode ID=0x00000013 Parent=0x0000000C SizeRef=130,389 Selected=0x29EABFBD + DockNode ID=0x0000000E Parent=0x00000009 SizeRef=1606,470 Split=X Selected=0x8FD1D8E1 + DockNode ID=0x00000010 Parent=0x0000000E SizeRef=1219,683 Selected=0x8FD1D8E1 + DockNode ID=0x00000011 Parent=0x0000000E SizeRef=423,683 Split=X Selected=0xC0F476BA + DockNode ID=0x00000008 Parent=0x00000011 SizeRef=1010,661 Selected=0x78684295 + DockNode ID=0x0000000A Parent=0x00000011 SizeRef=594,661 Selected=0xC0F476BA + DockNode ID=0x0000000B Parent=0x1AC534AB SizeRef=1904,319 Split=X + DockNode ID=0x0000000D Parent=0x0000000B SizeRef=1340,264 CentralNode=1 Selected=0x04EEE1F1 + DockNode ID=0x0000000F Parent=0x0000000B SizeRef=562,264 Selected=0xBCCC914D +DockSpace ID=0xA086D808 Pos=68,158 Size=530,820 CentralNode=1 Selected=0xCC2E5A42 + diff --git a/game/settings/editor.json b/editor/settings.json similarity index 91% rename from game/settings/editor.json rename to editor/settings.json index ef90bdd..264c5ef 100644 --- a/game/settings/editor.json +++ b/editor/settings.json @@ -14,11 +14,11 @@ "value": true }, { - "key": "Toolbar Show Profiler", + "key": "Toolbar Show Assets", "value": true }, { - "key": "Toolbar Show Assets", + "key": "Toolbar Show Profiler", "value": true }, { @@ -37,25 +37,25 @@ "value1": [], "value2": [], "value3": [ - { - "key": "Scene View Cam Rot Y", - "value": -18731.0 - }, { "key": "Scene View Cam Pos X", - "value": 5.911830425262451 + "value": 15.968964576721192 }, { - "key": "Scene View Cam Rot X", - "value": 20.5 + "key": "Scene View Cam Rot Y", + "value": -18762.5 }, { "key": "Scene View Cam Pos Y", - "value": 13.683990478515625 + "value": 23.01344871520996 + }, + { + "key": "Scene View Cam Rot X", + "value": 35.0 }, { "key": "Scene View Cam Pos Z", - "value": -17.153244018554689 + "value": -17.598114013671876 }, { "key": "Scene View Cam Rot Z", diff --git a/extern/bx b/extern/bx index 292aace..bc60b56 160000 --- a/extern/bx +++ b/extern/bx @@ -1 +1 @@ -Subproject commit 292aacecaa5ea1409ac034853932c6b986f9cab2 +Subproject commit bc60b56d0e2a5f2dd9949380b07412d6dae02f1a diff --git a/game/settings/game.json b/game/settings/game.json index eb48d5f..aa97ef8 100644 --- a/game/settings/game.json +++ b/game/settings/game.json @@ -4,14 +4,14 @@ "value1": [], "value2": [], "value3": [ - { - "key": "Camera Input Dead Zone", - "value": 0.10000000149011612 - }, { "key": "Camera Look Speed", "value": 0.5 }, + { + "key": "Camera Input Dead Zone", + "value": 0.10000000149011612 + }, { "key": "Camera Move Speed", "value": 50.0 diff --git a/include/editor/inspector.hpp b/include/editor/inspector.hpp new file mode 100644 index 0000000..e69de29 diff --git a/include/framework/components/custom_cmp.hpp b/include/framework/components/custom_cmp.hpp new file mode 100644 index 0000000..631bd30 --- /dev/null +++ b/include/framework/components/custom_cmp.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include + +class CustomCmp : public Component +{ +public: +}; \ No newline at end of file diff --git a/include/framework/systems/custom_sys.hpp b/include/framework/systems/custom_sys.hpp new file mode 100644 index 0000000..9fe1941 --- /dev/null +++ b/include/framework/systems/custom_sys.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include + +class CustomSys : public System +{ +public: + void Initialize() override; + void Shutdown() override; + + void Update() override; + void Render() override; +}; \ No newline at end of file diff --git a/src/application.cpp b/src/application.cpp new file mode 100644 index 0000000..18e6caf --- /dev/null +++ b/src/application.cpp @@ -0,0 +1,14 @@ +#include + +bool Application::Initialize() +{ + return true; +} + +void Application::Shutdown() +{ +} + +void Application::Reload() +{ +} \ No newline at end of file diff --git a/src/editor/inspector.cpp b/src/editor/inspector.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/framework/components/custom_cmp.cpp b/src/framework/components/custom_cmp.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/framework/systems/custom_sys.cpp b/src/framework/systems/custom_sys.cpp new file mode 100644 index 0000000..4da0ec5 --- /dev/null +++ b/src/framework/systems/custom_sys.cpp @@ -0,0 +1,17 @@ +#include "framework/systems/custom_sys.hpp" + +void CustomSys::Initialize() +{ +} + +void CustomSys::Shutdown() +{ +} + +void CustomSys::Update() +{ +} + +void CustomSys::Render() +{ +} \ No newline at end of file