Skip to content
Open

test #160

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
543 commits
Select commit Hold shift + click to select a range
846f73a
Merge branch 'develop/ecs-engine' into rigid_body_update
dandria56 Aug 24, 2022
01a525f
fixes to change requests
dandria56 Aug 24, 2022
0cc00e5
Merge pull request #120 from dante1130/rigid_body_update
dante1130 Aug 24, 2022
89e1e3c
Merge pull request #121 from dante1130/develop/ecs-engine
dandria56 Aug 24, 2022
0b370e9
Add sunlight to TheDen scene
dante1130 Aug 24, 2022
1829322
Add theater lights
dante1130 Aug 24, 2022
d1acd84
Add attributes of orthogonal light projection to DirectionalLight con…
dante1130 Aug 25, 2022
cffde88
Change light projection to be initialized in base class Light initial…
dante1130 Aug 25, 2022
4f5530b
Light projection to be initialized in base class
dante1130 Aug 25, 2022
5313f13
Add light projection attributes to light components
dante1130 Aug 25, 2022
65ef510
Added light projection attributes to ECS game asset factory
dante1130 Aug 25, 2022
c65c27b
Fix assert error when selecting text from GUI
dante1130 Aug 25, 2022
f5341ce
Adjusted sunlight orthogonal projection
dante1130 Aug 25, 2022
841a795
Base of GUI debug menu
dandria56 Aug 25, 2022
457c21f
Added 2 point lights on left corridor
dante1130 Aug 25, 2022
7224c63
Change to middle lights
dante1130 Aug 25, 2022
b9565d2
Performance loggers implementation
dandria56 Aug 25, 2022
dbf54fb
Doxygen for performance logger
dandria56 Aug 25, 2022
aaff380
Added more lights
dante1130 Aug 25, 2022
5cc5bbc
Somewhat complete, although errors persist
dandria56 Aug 25, 2022
a43aef0
Bugs appear to be fixed
dandria56 Aug 25, 2022
92e348a
Bugs fixed & output complete for performance logger
dandria56 Aug 25, 2022
f64732c
Removed double physics world update
dandria56 Aug 25, 2022
d97b318
Merge pull request #122 from dante1130/theden-lights
dandria56 Aug 25, 2022
9211bcd
Merge branch 'develop/milestone1' into debugGUI
dandria56 Aug 25, 2022
5631653
Merge pull request #123 from dante1130/debugGUI
dante1130 Aug 25, 2022
4be43a0
fix
dandria56 Aug 25, 2022
7df27df
Merge pull request #124 from dante1130/debugGUI
dante1130 Aug 25, 2022
9ce1365
start of version 2 - stable state
dandria56 Aug 26, 2022
e89aca4
average and max times shown
dandria56 Aug 26, 2022
0ee6cfd
performance logger v2 completed
dandria56 Aug 26, 2022
0a9811b
Merge pull request #125 from dante1130/Performance_Logger_V2
dante1130 Aug 26, 2022
5fccc5d
Add some tests for ECS
dante1130 Aug 26, 2022
5b3bbc5
Add component tests
dante1130 Aug 26, 2022
87b2b65
Switched to pre-increment:
dante1130 Aug 26, 2022
3e0554d
Merge pull request #126 from dante1130/ecs-test
dandria56 Aug 26, 2022
3e48d60
Reduced shadow resolution and far plane
dante1130 Aug 27, 2022
430603b
adjusted point light farplane
dante1130 Aug 27, 2022
531ca8b
adjust directional light farplane
dante1130 Aug 27, 2022
ed1c367
Adjust pointlight nearplane
dante1130 Aug 27, 2022
91720d6
Collision detection linked with physics entites
openGLBRUH Aug 27, 2022
29e7751
Merge pull request #127 from dante1130/theden-light-tweak
dandria56 Aug 27, 2022
f1d6c37
start of collections gui
dandria56 Aug 28, 2022
cec8c3c
get functions implemented
dandria56 Aug 28, 2022
761f8e0
Merge remote-tracking branch 'origin/develop/milestone1' into network…
Accident-Prone Aug 28, 2022
322711f
putting collections on hold
dandria56 Aug 28, 2022
55dc730
Fixed loading rigidbody component
openGLBRUH Aug 28, 2022
c33e551
double world update fix
dandria56 Aug 28, 2022
258852f
Acceleration fix
openGLBRUH Aug 28, 2022
31afe33
small changes to stable build
dandria56 Aug 28, 2022
2759967
added remove method and prepared gui a bit more
dandria56 Aug 28, 2022
faf0321
basic collections draw to screen, stable state
dandria56 Aug 28, 2022
43e3057
Enabled collection recursion
dandria56 Aug 28, 2022
1a611b5
Ability to create new collections through GUI
dandria56 Aug 28, 2022
a54d2df
basics of dragging for collections
dandria56 Aug 29, 2022
0857f15
able to drag and drop entities into a collection
dandria56 Aug 29, 2022
f112ba3
Added ability to move collections around (into another collection or …
dandria56 Aug 29, 2022
a10454d
ability to rename collections
dandria56 Aug 29, 2022
89d0047
Drag fix
openGLBRUH Aug 29, 2022
4852c3a
Added ability to remove collections
dandria56 Aug 29, 2022
72e4d3d
lua access for creating and setting entities to collections
dandria56 Aug 29, 2022
85655e2
Moved entities into collections
dandria56 Aug 29, 2022
02f9f91
doxygen and small fixed
dandria56 Aug 29, 2022
616f42b
fix to collection disappearing
dandria56 Aug 29, 2022
5e374a8
resolved issues
dandria56 Aug 29, 2022
35beba2
Merge pull request #130 from dante1130/gui_collections
dante1130 Aug 30, 2022
b3dcea8
collections gui switched to using unordered map
dandria56 Aug 30, 2022
291c57d
fix to collection moving child collection when deleting
dandria56 Aug 30, 2022
a9851d5
unnecessary for loop removed
dandria56 Aug 30, 2022
6e14da8
Objects bounce off static colliders, doesnt pass through colliders
openGLBRUH Aug 30, 2022
74f6ca9
fixed to parent not gaining child
dandria56 Aug 31, 2022
6624e3f
moved imGUI code out of collectionsGUI to ECSGui
dandria56 Aug 31, 2022
88f0718
Merge pull request #131 from dante1130/gui_collections_update
dante1130 Aug 31, 2022
95096fe
Working collision system
openGLBRUH Aug 31, 2022
8b8fd05
Merge branch 'engine-resolution' of https://github.com/dante1130/Refl…
openGLBRUH Aug 31, 2022
e10823c
Merge issue fix and gravity works
openGLBRUH Aug 31, 2022
dd40040
Optimization fixes
openGLBRUH Aug 31, 2022
321177d
allowed multiple inputs to player movement
dandria56 Aug 31, 2022
d053da3
Force addition fix
openGLBRUH Aug 31, 2022
a0fc277
Flickering fixes
openGLBRUH Aug 31, 2022
2e201f9
collections test
dandria56 Sep 1, 2022
ffb9294
PerformanceLogger test
dandria56 Sep 1, 2022
fc12416
Merge pull request #132 from dante1130/catch2_tests
dante1130 Sep 1, 2022
85f1d3b
extra small objects added to theden blend file
dandria56 Sep 1, 2022
7c3661d
small objects added to scene
dandria56 Sep 2, 2022
53b7443
lights tweaked
dandria56 Sep 2, 2022
5d91b81
Merge pull request #133 from dante1130/small_models/objects
dante1130 Sep 2, 2022
561d6c2
Merge branch 'develop/milestone1' into engine-resolution
openGLBRUH Sep 2, 2022
adc4843
fix for player being unresponsive when physics movement switched too
dandria56 Sep 2, 2022
a9b0bc4
Comment out of print collision type
openGLBRUH Sep 2, 2022
df6caf6
Merge pull request #134 from dante1130/engine-resolution
dandria56 Sep 3, 2022
82c4d86
updated directional light serializer
dandria56 Sep 3, 2022
95fc951
correctly serialize basic rigidbody
dandria56 Sep 3, 2022
43a01a4
implemented stack for saving entities for glass rendering
dandria56 Sep 3, 2022
28199f6
serialization is in order and extra rigidbody values stored
dandria56 Sep 3, 2022
681f071
ability to serialize obj collider data
dandria56 Sep 3, 2022
7f2cf22
stopped player from changing noclip when saving/loading
dandria56 Sep 3, 2022
681141e
Got network menus displaying
Accident-Prone Sep 3, 2022
7563042
fixed network menu to correctly display chat
Accident-Prone Sep 3, 2022
55f6a62
removed network.lua from creation. added doxygen
Accident-Prone Sep 3, 2022
94e7afd
update to contributing text document
dandria56 Sep 4, 2022
4914eb9
cut load times by a couple of seconds
dandria56 Sep 4, 2022
c239feb
Doxygen update to Rigidbody .hpp and PhysicsBody.hpp
openGLBRUH Sep 4, 2022
3559213
Doxygen update to EngineResolve and ReactResolve
openGLBRUH Sep 4, 2022
cd33045
Updating .cpp to clang-format
openGLBRUH Sep 4, 2022
238242c
Merge branch 'develop/milestone1' of https://github.com/dante1130/Ref…
Accident-Prone Sep 4, 2022
a00e4e5
Merge branch 'network-menu' into develop/milestone1
Accident-Prone Sep 4, 2022
3df071a
removed added object which no longer exists
dandria56 Sep 4, 2022
f4b0576
Merge pull request #135 from dante1130/save&load
Accident-Prone Sep 4, 2022
3fa90b9
Changed name of player from 'network' to 'player'
Accident-Prone Sep 4, 2022
e4c6e6b
Merge branch 'develop/milestone1' into loading_optimisation
dandria56 Sep 4, 2022
65043d6
small fixes
dandria56 Sep 4, 2022
fb31841
Merge branch 'develop/milestone1' into rigidbody_doxygen
dandria56 Sep 4, 2022
6cfe000
Merge pull request #137 from dante1130/rigidbody_doxygen
dandria56 Sep 4, 2022
a332645
Merge pull request #138 from dante1130/Player_Rename
dandria56 Sep 4, 2022
fde7759
Merge pull request #136 from dante1130/loading_optimisation
Accident-Prone Sep 4, 2022
134f4e4
Adjusted network menus. Removed PvP menus
Accident-Prone Sep 4, 2022
29e6b9e
Merge pull request #139 from dante1130/Network_menu-adjustments
dandria56 Sep 4, 2022
2109b77
Merge pull request #140 from dante1130/develop/milestone1
openGLBRUH Sep 4, 2022
93d7f8c
Add getter for physics debug renderer
dante1130 Sep 29, 2022
4d8551e
Change setDebuggerValues to take in the enum instead of integer
dante1130 Sep 29, 2022
3ea6193
Add react shader to renderer
dante1130 Sep 29, 2022
49a9ef3
Add code to update and draw collider renderer
dante1130 Sep 29, 2022
690b222
Render collider react meshes
dante1130 Sep 29, 2022
d7cfa95
Add render passes to performance logger
dante1130 Sep 29, 2022
6615a7a
Logged validate functions in for shaders
dandria56 Sep 29, 2022
ffd5c1d
Add colors to debug collision rendering
dante1130 Sep 29, 2022
c9ee981
Merge branch 'collision-renderer-draw' of https://github.com/dante113…
dante1130 Sep 29, 2022
9b4d60a
Add more performance logs
dante1130 Sep 29, 2022
6200bca
validate commented back in
dandria56 Sep 29, 2022
833f29b
Merge pull request #142 from dante1130/collision-renderer-draw
dandria56 Sep 29, 2022
72608db
set scene
dandria56 Oct 3, 2022
2967fca
Scene and scripting set up
dandria56 Oct 3, 2022
010ab67
removed current physics system
dandria56 Oct 3, 2022
e56901c
removed move previous code
dandria56 Oct 3, 2022
05b6bd2
buildable project with linear movement
dandria56 Oct 3, 2022
b7cbc96
small change to linear velocity position calculation
dandria56 Oct 3, 2022
b33b3f8
basic angular rotation (with y rotation lock bug)
dandria56 Oct 3, 2022
8b3f791
Fixed bug with y rotation under angular velocity
dandria56 Oct 4, 2022
45097b3
small fixes and start of foundation for collision resolution
dandria56 Oct 4, 2022
4d44dd7
start of collision resolution. Passing initial variables
dandria56 Oct 4, 2022
4f79fa9
removed most of old engine
dandria56 Oct 5, 2022
ec28dff
added epsilon and mass to collider creation
dandria56 Oct 5, 2022
a456654
implemented physics resolution (buggy)
dandria56 Oct 5, 2022
aae0670
small fixes and start of physics unit tests
dandria56 Oct 6, 2022
22e4769
Bit of unit testing and fixes to physics resolution
dandria56 Oct 6, 2022
0c5747d
more testing & small fixes & info dump of collision data
dandria56 Oct 6, 2022
578a485
potentially fixed rotation not applying to inertia tensor
dandria56 Oct 6, 2022
5a78893
fix epsilon
dandria56 Oct 6, 2022
7d90b28
added basic de penetrate function
dandria56 Oct 7, 2022
c448f0d
fix to rotation bug and modification to readability
dandria56 Oct 9, 2022
d8042c8
Potential fix to rotating the inertia tensor for physics resolution
dandria56 Oct 9, 2022
c57e9e7
small fixes, scene adjustment & updated output data
dandria56 Oct 10, 2022
fc23f8f
small changes, more output, and cleanup
dandria56 Oct 10, 2022
f448cca
fixed collision rotations (inertia tensor & point) & added better pri…
dandria56 Oct 12, 2022
35bf5c9
individual assessment finished
dandria56 Oct 13, 2022
1efdf00
clean up and moved most of print statements
dandria56 Oct 14, 2022
49f580a
moved print statement, added basic static object resolution
dandria56 Oct 14, 2022
a3c0979
added setters and getters for drag, gravity & can sleep
dandria56 Oct 14, 2022
fd8134b
merged over drag and gravity
dandria56 Oct 14, 2022
9727081
start of adding back "the den"
dandria56 Oct 14, 2022
0b8e8fa
added static collision method
dandria56 Oct 14, 2022
81ccbd5
fixed rotation issue with r1 & r2
dandria56 Oct 14, 2022
d275ea3
fix wrong method call for getting physics body
dandria56 Oct 14, 2022
01fd245
removed pointless if statement and fixed up scene a little
dandria56 Oct 14, 2022
d35b70e
changed to global angular velocity and set zeros on non diagonal for …
dandria56 Oct 14, 2022
deef41c
reconstructed "the den" scene
dandria56 Oct 15, 2022
a5b2062
changed light name back
dandria56 Oct 15, 2022
3bc84ed
removed useless commented code
dandria56 Oct 15, 2022
87be38e
Merge pull request #143 from dante1130/practical-exercise
dante1130 Oct 15, 2022
a93a4f0
cut the fat of the scene for quick loading
dandria56 Oct 15, 2022
c06eb75
removed to_string calls for outputting physics data
dandria56 Oct 15, 2022
6dbd743
Fix conflicts
dante1130 Oct 16, 2022
9588558
wtf is this
dante1130 Oct 16, 2022
f1b927c
Merge branch 'develop/milestone2' of https://github.com/dante1130/Ref…
dante1130 Oct 16, 2022
2a5060d
now set transform after collision to reduce jitter
dandria56 Oct 16, 2022
c920c9f
now store mass and epsilon on a per collider basis and introduced Va …
dandria56 Oct 16, 2022
761d8ef
renamed rotated inertia tensor to inverse rotated inertia tensor
dandria56 Oct 16, 2022
7c3c24c
Add composite design pattern
dante1130 Oct 16, 2022
beb332d
Implemented Affordance to use Composite pattern
dante1130 Oct 16, 2022
a4912f1
Make the Affordance class the base composite class
dante1130 Oct 17, 2022
eeb4a66
Class declaration of AffordanceLeaf
dante1130 Oct 17, 2022
547f337
Class declaration of AffordanceComposite
dante1130 Oct 17, 2022
4134cbe
Implementation of Affordance classes
dante1130 Oct 17, 2022
87181e3
Change to moving instead of const ref
dante1130 Oct 17, 2022
9305d01
Implement AffordanceSystem
dante1130 Oct 17, 2022
f6df719
calculate the center of mass
dandria56 Oct 17, 2022
06e7a0f
calculate inertia tensor for composite bodies (basic - position only)
dandria56 Oct 17, 2022
2e78176
Implemented lua access for Affordance classes
dante1130 Oct 17, 2022
bb3ac5c
Make get_instance of AffordanceSystem static
dante1130 Oct 17, 2022
fc6fb4c
Implement test for creating an affordance leaf
dante1130 Oct 17, 2022
dbd39fc
added rotation parameter and removed bounciness parameter
dandria56 Oct 17, 2022
9a85566
Add test for creating an affordance composite
dante1130 Oct 17, 2022
73c0c06
rotated inertia tensor for composite physic bodies
dandria56 Oct 17, 2022
4fc0d0f
fixed local point with composite bodies & calculating inertia tensor …
dandria56 Oct 17, 2022
c759c77
Change Affordance Lua construction to factories to shared_ptr
dante1130 Oct 17, 2022
0609f0a
added back player physics collision
dandria56 Oct 17, 2022
25cf332
Fix bug where parameters were seen as tables and not containers
dante1130 Oct 17, 2022
cb643ff
Add assertions for upcasting
dante1130 Oct 17, 2022
c777ccd
added baumarte stabilisation term and removed useless inertia tensor …
dandria56 Oct 17, 2022
5521709
Implement successful affordance composite test
dante1130 Oct 17, 2022
e1c26a5
added the scene back for the merge
dandria56 Oct 18, 2022
f89063d
Merge pull request #144 from dante1130/composite_physics_bodies
dante1130 Oct 18, 2022
81a51b2
fixed how I set the transform after collision
dandria56 Oct 19, 2022
0c3232f
Add nested affordance test
dante1130 Oct 19, 2022
f7523e1
Add a default case to the nested affordance test
dante1130 Oct 19, 2022
9790591
Change value of affordance map in AffordanceSystem to be a vector of …
dante1130 Oct 19, 2022
57effc6
updated Va and Wa to be along collision normal
dandria56 Oct 19, 2022
d8db9bb
Extended nesting test with tests for add_affordance methods
dante1130 Oct 19, 2022
0ee36c3
Updated the den collisions and added back cabinet collisions
dandria56 Oct 20, 2022
08188cf
updated player movement
dandria56 Oct 20, 2022
2f35f44
added colliders to pizza boxes
dandria56 Oct 20, 2022
11985f0
added reduction methods for collisions below threshold
dandria56 Oct 20, 2022
8fafe17
small changes to the scene and setting default values
dandria56 Oct 20, 2022
ae990fa
react upstream bug fixed (on local need to fork reactphysics3d)
dandria56 Oct 20, 2022
f5f5dec
added physics colliders to laptops
dandria56 Oct 20, 2022
edfb7b8
added colliders to all objects in scene and smaller changes to script…
dandria56 Oct 20, 2022
abc06f0
removed debug logger code
dandria56 Oct 20, 2022
033f084
changed from immediately applying collision results to wait till afte…
dandria56 Oct 20, 2022
361bd8e
Initial AI emotion class push
Accident-Prone Oct 21, 2022
759cd49
added chairs to scene
dandria56 Oct 21, 2022
3d5e07c
fixed physics tests cases
dandria56 Oct 22, 2022
3659a6d
Merge branch 'affordance' into AI-Emotions
Accident-Prone Oct 22, 2022
c498bf9
Working affordance system test using workaround with garbage collector
dante1130 Oct 22, 2022
6d60864
Adding 2 affordances to affordance system test
dante1130 Oct 23, 2022
e801c43
Added agent component. Slightly Modified EmotionSystem
Accident-Prone Oct 23, 2022
fc16956
Added more for agent and EmotionSystem
Accident-Prone Oct 23, 2022
74eca2a
added accumulator
dandria56 Oct 23, 2022
31846ae
Merge pull request #145 from dante1130/collision_bodies_fixes
dante1130 Oct 23, 2022
2c80ab1
Added some comments.
Accident-Prone Oct 23, 2022
8e92725
Small change
Accident-Prone Oct 23, 2022
62cc84e
Create affordance agent component
dante1130 Oct 24, 2022
fa6968a
Add a helper function to traverse and find the best affordance in the…
dante1130 Oct 24, 2022
fe2a509
Fix edge case where the composite would be returned instead of the leaf
dante1130 Oct 24, 2022
084ad22
Add unit test for affordance finder
dante1130 Oct 24, 2022
d22f187
Remove duplicate affordance in test
dante1130 Oct 24, 2022
850418c
Add test for finding a composite that has no children but still was e…
dante1130 Oct 24, 2022
f1a1dbe
Add doxygen comments to find_affordance
dante1130 Oct 24, 2022
7ba1ec2
Merge branch 'develop/milestone2' of https://github.com/dante1130/Ref…
dante1130 Oct 24, 2022
862ade5
Fix conflicts
dante1130 Oct 24, 2022
3455c84
totally not sus
dante1130 Oct 24, 2022
fc67bc4
Merge pull request #146 from dante1130/affordance
dandria56 Oct 24, 2022
9d53135
Merge branch 'develop/milestone2' into AI-Emotions
Accident-Prone Oct 25, 2022
97d7fa9
Added more to emotions+agentemotions classes
Accident-Prone Oct 25, 2022
38525ba
Missed a bit in last push
Accident-Prone Oct 25, 2022
3a42644
Added more for emotion
Accident-Prone Oct 27, 2022
50b2a5b
Merge branch 'develop/milestone2' into AI-Emotions
Accident-Prone Oct 27, 2022
7ed8578
Add clang-format instructions for Visual Studio users
dante1130 Oct 27, 2022
a26aede
Refactor to buildable state
dante1130 Oct 27, 2022
6cddab4
Use suffix F
dante1130 Oct 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "cmake/entt"]
path = cmake/entt
url = https://github.com/skypjack/entt
[submodule "cmake/imgui"]
path = cmake/imgui
url = https://github.com/dante1130/imgui
[submodule "cmake/catch2"]
path = cmake/catch2
url = https://github.com/catchorg/Catch2
138 changes: 92 additions & 46 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Minimum CMake version
cmake_minimum_required (VERSION 3.17)
cmake_minimum_required(VERSION 3.17)

# Project declaration.
project (ReflexEngine LANGUAGES CXX)
project(ReflexEngine LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)

Expand All @@ -12,62 +12,108 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON)
# CMake path for libraries.
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

add_executable (ReflexEngine)
enable_testing()

add_executable(ReflexEngine src/main.cpp)
add_executable(ReflexEngineTest)

add_subdirectory(cmake)

add_subdirectory(src)
add_subdirectory(test)

if (MSVC)
set(MSVC_DISABLED_WARNINGS_LIST
"C4100" # 'identifier' : unreferenced formal parameter
)
endif()

target_compile_options(ReflexEngineSrc PRIVATE

target_compile_options(${PROJECT_NAME} PRIVATE
# Clang
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
-Wall -Wextra -Wpedantic -fcolor-diagnostics
# Turn off useless warnings
-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded
-Wno-deprecated-declarations -Wno-exit-time-destructors
-Wno-switch-enum -Wno-weak-vtables -Wno-global-constructors>
-Wall -Wextra -Wpedantic -fcolor-diagnostics

# Turn off useless warnings
-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded
-Wno-deprecated-declarations -Wno-exit-time-destructors
-Wno-switch-enum -Wno-weak-vtables -Wno-global-constructors>

# GCC
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wpedantic -fdiagnostics-color=always>
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wpedantic -fdiagnostics-color=always -mbig-obj>

# Visual Studio
$<$<CXX_COMPILER_ID:MSVC>:/W4>
$<$<CXX_COMPILER_ID:MSVC>:/W4 /bigobj>

$<$<CONFIG:RELEASE>:-O3>
$<$<CONFIG:DEBUG>:-O0>
)

add_custom_command(TARGET ReflexEngine POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/dlls
${CMAKE_CURRENT_BINARY_DIR})
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/dlls
${CMAKE_CURRENT_BINARY_DIR})

add_custom_command(TARGET ReflexEngine POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/resources
${CMAKE_CURRENT_BINARY_DIR})

# Include dependencies.
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/glad/include)
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/glfw/include)
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/glm)
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/stb_image)
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/assimp/include)
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/imgui)
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/reactphysics3d)
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/raknet/include)
include_directories (ReflexEngine SYSTEM ${CMAKE_PREFIX_PATH}/irrklang)

# Link libraries.
target_link_libraries (ReflexEngine PRIVATE glfw)
target_link_libraries (ReflexEngine PRIVATE glm)
target_link_libraries (ReflexEngine PRIVATE glad)
target_link_libraries (ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/assimp/lib/assimp-vc143-mt.lib)
target_link_libraries (ReflexEngine PRIVATE imgui)
target_link_libraries (ReflexEngine PRIVATE lua)
target_link_libraries (ReflexEngine PRIVATE reactphysics3d)
target_link_libraries (ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/raknet/Lib/DLL_vc9_DLL_Release_x64.lib)
target_link_libraries (ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/raknet/Lib/LibStatic_vc9_LibStatic_Release_x64.lib)
target_link_libraries (ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/irrklang/lib/irrKlang.lib)
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/resources
${CMAKE_CURRENT_BINARY_DIR})

target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH})
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/glad/include)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/glfw/include)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/glm)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/stb_image)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/assimp/include)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/imgui)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/reactphysics3d/include)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/irrklang)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/slikenet/Source)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/entt/single_include)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/catch2/src)
target_include_directories(ReflexEngine PRIVATE ${CMAKE_PREFIX_PATH}/lua/src)

target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH})
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/glad/include)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/glfw/include)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/glm)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/stb_image)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/assimp/include)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/imgui)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/reactphysics3d/include)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/irrklang)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/slikenet/Source)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/entt/single_include)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/catch2/src)
target_include_directories(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/lua/src)

target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH})
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/glad/include)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/glfw/include)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/glm)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/stb_image)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/assimp/include)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/imgui)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/reactphysics3d/include)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/irrklang)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/slikenet/Source)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/entt/single_include)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/catch2/src)
target_include_directories(ReflexEngineTest PRIVATE ${CMAKE_PREFIX_PATH}/lua/src)
target_include_directories(ReflexEngineTest PRIVATE ${PROJECT_SOURCE_DIR}/src)

target_link_libraries(ReflexEngineSrc PRIVATE glfw)
target_link_libraries(ReflexEngineSrc PRIVATE glm)
target_link_libraries(ReflexEngineSrc PRIVATE glad)
target_link_libraries(ReflexEngineSrc PRIVATE imgui)
target_link_libraries(ReflexEngineSrc PRIVATE lua)
target_link_libraries(ReflexEngineSrc PRIVATE reactphysics3d)
target_link_libraries(ReflexEngineSrc PRIVATE EnTT)
target_link_libraries(ReflexEngineSrc PRIVATE ${PROJECT_SOURCE_DIR}/lib/assimp-vc143-mt.lib)
target_link_libraries(ReflexEngineSrc PRIVATE ${PROJECT_SOURCE_DIR}/lib/RakNet_DLL_Release_x64.lib)
target_link_libraries(ReflexEngineSrc PRIVATE ${CMAKE_PREFIX_PATH}/irrklang/lib/irrKlang.lib)

target_link_libraries(ReflexEngine PRIVATE ReflexEngineSrc)

target_link_libraries(ReflexEngineTest PRIVATE Catch2::Catch2WithMain)
target_link_libraries(ReflexEngineTest PRIVATE ReflexEngineSrc)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_PREFIX_PATH}/catch2/extras)

include(CTest)
include(Catch)
catch_discover_tests(ReflexEngineTest)
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contribution

## Contribution guidelines

* Follow these [`Git` best practices](https://programmerfriend.com/git-best-practices/).
* Follow this [`Git` branching model](https://nvie.com/posts/a-successful-git-branching-model/).
* Follow the [`C++` Core Guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).
* Use `CppCheck` and `clang-tidy` to analyze your code.
* Use `clang-format` to format your code.

## Setting up `clang-format`

### Visual Studio

1. Open `Visual Studio`.
2. On the navigation bar, click `Extensions -> Manage Extensions...`.
3. Install the extension `Clang Power Tools`.
4. Restart `Visual Studio` after installation.
5. Click on `Tools` from the `Clang Power Tools` menu.
![clang-format settings](https://clangpowertools.com/assets/blog/get-started-with-clang-power-tools/SettingsToolbar.png)
6. If you do not have `LLVM` installed, go to the `LLVM` tab and install any version.
7. After installation, navigate to `Format` tab and turn on `Format on save`.
8. Your code will now be formatted on save.

## Steps for GitFlow workflow

* To merge changes to branch:
* Create a separate branch, give it a relevant name.
* Push your changes to the branch.
* Ensure that it can successfully build and run.
* Major code additions must include some unit tests unless determined otherwise by the team
* Create a pull request to the `develop` branch, **not `master`**.
* Include information regarding the changes.
* Request a review from a reviewer.
* To review a pull request:
* Checkout the pull request branch locally.
* Ensure that it can successfully build and run.
* Ensure that the unit tests all successfully complete.
* Go through each file and mark it viewed after finish reviewing.
* Comment any issues you find.
* Finish review and submit as "`Approved`" if there are no issues.
* Merge the pull request and delete the branch.
* To create an issue:
* Create an issue giving detailed information about the issue.
* Give an example of a minimal reproduction of the issue.
* Mention any fixes or workarounds you have used.
* Refer to a pull request if possible, whether it is a fix or the commit with the issue.
* Close the issue once it is resolved.

## Steps for unit testing

* Create your `.cpp` in the `test` directory.
* Add your `.cpp` source file to `test/CMakeLists.txt`.
* Implement your unit test. (You can use `ShaderTest.cpp` as an example, or look at the reference guide for `Catch2`).
* Build and run on target `ReflexEngineTest`.
4 changes: 2 additions & 2 deletions cmake/imgui/LICENSE.txt → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)
MIT License

Copyright (c) 2014-2020 Omar Cornut
Copyright (c) 2022 Reflex Bullet Entertainment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
# ReflexEngine
# ReflexEngine

![reflex-logo](https://i.imgur.com/TXfAfwS.png)

## Table of Contents

* [Cloning the repository](#cloning)
* [Building](#building)
* [Visual Studio](#vs)
* [VSCode](#vscode)
* [Contributing](#contributing)
* [License](#license)

## Cloning the repository

```bash
git clone https://github.com/dante1130/ReflexEngine
git submodule update --init --recursive
```

## Building

### Visual Studio

#### Install build tools

* [Visual Studio](https://visualstudio.microsoft.com/downloads/)
* Install the component "`C++ CMake tools for Windows`".

#### Building ReflexEngine in Visual Studio

1. Open `Visual Studio` as Administrator.
2. Choose the option “`Continue without code`”.
3. Navigate to the top left and select `File -> Open -> CMake`.
4. Navigate to the root directory of `ReflexEngine`.
5. Open `CMakeLists.txt`.
6. Navigate to `Project` on the navigation bar and click “`Generate cache for ReflexEngine`”.
7. Once the output window says “`CMake generation finished`”, ensure you are targeting `ReflexEngine.exe` and you are on the `Release` build as shown in the image below.
8. Press on `ReflexEngine.exe` play button to run the project. If it is your first time running the engine, you will need to build it, but it will do it automatically once you press `ReflexEngine.exe`. It can be done manually by going build-> then on rebuild ReflexEngine.

### VSCode

#### Install extensions

* [VSCode](https://code.visualstudio.com/download)
* Install the extension [CMake tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools).

#### Building ReflexEngine in VSCode

* Open `VSCode`.
* Navigate to the top left and select `File -> Open folder...`.
* Select to open to the root directory of `ReflexEngine`.
* Open command palette. (Ctrl+Shift+P)
* `CMake: Select a kit` -> Your compiler of choice (`Clang` or `MSVC`)
* `CMake: Select variant` -> `Release` or `RelWithDebInfo`
* `CMake: Set build target` -> `ReflexEngine`
* `CMake: Build`
* `CMake: Run without debugging`

## Contributing

Please refer to the [contributing guide](CONTRIBUTING.md).

## License

This project is licensed under the [MIT license](LICENSE.md).
17 changes: 11 additions & 6 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cmake_minimum_required (VERSION 3.17)
cmake_minimum_required(VERSION 3.17)

function (target_ignore_warnings target scope)
get_target_property(lib_include_dirs ${target} INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(${target} SYSTEM ${scope} ${lib_include_dirs})
function(target_ignore_warnings target scope)
get_target_property(lib_include_dirs ${target} INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(${target} SYSTEM ${scope} ${lib_include_dirs})
endfunction()

# Set to not build docs, tests and examples
option(ASSIMP_BUILD_TESTS OFF)
option(ASSIMP_BUILD_TESTS OFF)
option(ASSIMP_BUILD_ASSIMP_TOOLS OFF)
option(GLFW_BUILD_DOCS OFF)
option(GLFW_BUILD_TESTS OFF)
Expand All @@ -19,10 +19,13 @@ option(RP3D_DOUBLE_PRECISION_ENABLED OFF)

# Disable compiler warnings.
add_compile_options(

# Clang
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-everything>

# GCC
$<$<CXX_COMPILER_ID:GNU>:-w>

# Visual Studio
$<$<CXX_COMPILER_ID:MSVC>:/W0>
)
Expand All @@ -34,11 +37,13 @@ add_subdirectory(glfw)
add_subdirectory(imgui)
add_subdirectory(lua)
add_subdirectory(reactphysics3d)
add_subdirectory(raknet)
add_subdirectory(entt)
add_subdirectory(catch2)

target_ignore_warnings(glm INTERFACE)
target_ignore_warnings(glad INTERFACE)
target_ignore_warnings(glfw INTERFACE)
target_ignore_warnings(imgui INTERFACE)
target_ignore_warnings(lua INTERFACE)
target_ignore_warnings(reactphysics3d INTERFACE)
target_ignore_warnings(EnTT INTERFACE)
1 change: 1 addition & 0 deletions cmake/catch2
Submodule catch2 added at 47d56f
1 change: 1 addition & 0 deletions cmake/entt
Submodule entt added at 2f5134
1 change: 1 addition & 0 deletions cmake/imgui
Submodule imgui added at 39a63e
20 changes: 0 additions & 20 deletions cmake/imgui/.editorconfig

This file was deleted.

Loading