From 2e0a1b7dcae94337a184a04ea4990193ba4a3192 Mon Sep 17 00:00:00 2001 From: Bam4d Date: Thu, 8 Dec 2022 19:21:50 +0000 Subject: [PATCH 1/6] added highlight shader for Block2D envs --- ...rvability_in_global_observer_highlight.png | Bin 0 -> 3845 bytes .../default/block/triangle-textured.frag | 10 +++++++-- .../default/block/triangle-textured.vert | 5 ++++- src/Griddly/Core/GDY/GDYFactory.cpp | 2 ++ src/Griddly/Core/Observers/BlockObserver.cpp | 10 +++++++++ .../Core/Observers/Vulkan/VulkanObserver.hpp | 3 ++- .../Core/Observers/BlockObserverTest.cpp | 19 ++++++++++++++++++ 7 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 render_player_observability_in_global_observer_highlight.png diff --git a/render_player_observability_in_global_observer_highlight.png b/render_player_observability_in_global_observer_highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..135583f616cbfe732909bc5d95b0dba11ddc3e51 GIT binary patch literal 3845 zcmbuCeLT~9|Hn6Tv%_W+Wt*5)?z)c7>?Wt!Y|Pe9Zsz8a6m5v56jG6!thqhEF~y}& zT4x-(Q7UzDk|qwTlQL9t>Ben2MT#_8xjy5Z>$-k_{QmeoE{_NA@5AGB`@VU;-k&_4 z4+m+8GlW1ONbV+ZJ$ z-PrT==wDy(o%hwRu}UXoJZ&2isDG$;&g0GJ45L(ICh~)I`DHnFO!Tp@_Q=~RpU=XZ zLW=HGrb4KX^|q1|h-FN64>)U~xsIHw6yC!kMJik*1*yFNl2oS8_Q?31K{PH_#qJ59+R-y|4rnlRT~8<$lP+U^&MC9rdPolV2jqkLzn=-!}nj8#Q1 zgY{WX(GcgYcfh~Hi(KZ6;x~Kec0SG|87NnV_bT36z^5@aE7Rp;gIro$CUyA`tX^Q4 zdB%yc-uH{0xV_70dxg)xyvSbkqNq4=$&GRsLoB;R>vWMy@LbjFgwsLDv5^!LNj79F zffyo|*q&0Mt*`21pB4E;`nOzhOQ&e`{nXIYq+je#_x&UdOBpy9Y9^f=$E)w(x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)8P^bESLwL02bk9o5=`qy6?uUl%r0o_V>CDjF;yI%xztKU3m?B?4vi+b$vbY zS~3I5Pox9iOe~4Wf&X4alt$407ezjUv`3idI4bIpmudVyns67~i9BMxnGwSzkE)M9 z29GL17Z{aAYq2+>#8^$v{J`o%|1hP@HeGxs68&c@VXF()ehPziiYCgf{Kizn6^WH~ szut6C1E^@V2d&AV$)Xn>7QG08lz4^Sj^AoT1J7Fs*VBh}$(?`npZa8-bN~PV literal 0 HcmV?d00001 diff --git a/resources/shaders/default/block/triangle-textured.frag b/resources/shaders/default/block/triangle-textured.frag index 26772c15c..b03e6915d 100644 --- a/resources/shaders/default/block/triangle-textured.frag +++ b/resources/shaders/default/block/triangle-textured.frag @@ -5,8 +5,9 @@ layout(binding=0)uniform sampler2DArray samplerArray; layout(location=0)in vec4 inColor; layout(location=1)in vec3 inFragTextureCoords; layout(location=2)in vec4 playerColor; +layout(location=3)flat in int objectTypeId; // Deprecated -layout(location=3)flat in int highlightPlayers; +layout(location=4)flat in int highlightPlayers; layout(location=0)out vec4 outFragColor; @@ -96,7 +97,12 @@ void main() outFragColor=texture(samplerArray,inFragTextureCoords)*inColor; } - if(environmentData.globalObserverAvatarMode==3){ + if(environmentData.globalObserverAvatarMode==4){ + if(isInPlayerView()&&objectTypeId==1000){ + float highlight=.3; + outFragColor=vec4(min(1.,outFragColor.x+highlight),min(1.,outFragColor.y+highlight),min(1.,outFragColor.z+highlight),outFragColor.w); + } + }else if(environmentData.globalObserverAvatarMode==3){ if(!isInPlayerView()){ outFragColor=vec4(0); } diff --git a/resources/shaders/default/block/triangle-textured.vert b/resources/shaders/default/block/triangle-textured.vert index f01cfdfc0..78b7ab60d 100644 --- a/resources/shaders/default/block/triangle-textured.vert +++ b/resources/shaders/default/block/triangle-textured.vert @@ -6,9 +6,10 @@ layout(location = 1) in vec2 inFragTextureCoords; layout(location = 0) out vec4 outColor; layout(location = 1) out vec3 outFragTextureCoords; layout(location = 2) out vec4 outPlayerColor; +layout(location = 3) out int outObjectTypeId; // Deprecated -layout(location = 3) out int outHighlightPlayers; +layout(location = 4) out int outHighlightPlayers; out gl_PerVertex { vec4 gl_Position; @@ -71,6 +72,8 @@ void main() { ObjectData object = objectDataBuffer.variables[pushConsts.idx]; PlayerInfo objectPlayerInfo = playerInfoBuffer.variables[object.playerId - 1]; + outObjectTypeId = object.objectType; + outFragTextureCoords = vec3( inFragTextureCoords.x * object.textureMultiply.x, inFragTextureCoords.y * object.textureMultiply.y, diff --git a/src/Griddly/Core/GDY/GDYFactory.cpp b/src/Griddly/Core/GDY/GDYFactory.cpp index d7814af1e..9f244cc31 100644 --- a/src/Griddly/Core/GDY/GDYFactory.cpp +++ b/src/Griddly/Core/GDY/GDYFactory.cpp @@ -482,6 +482,8 @@ void GDYFactory::parseNamedObserverShaderConfig(VulkanObserverConfig& config, YA config.globalObserverAvatarMode = GlobalObserverAvatarMode::DARKEN_INVISIBLE; } else if (avatarMode == "REMOVE") { config.globalObserverAvatarMode = GlobalObserverAvatarMode::REMOVE_INVISIBLE; + } else if (avatarMode == "HIGHLIGHT") { + config.globalObserverAvatarMode = GlobalObserverAvatarMode::HIGHLIGHT_VISIBLE; } else { std::string error = fmt::format("No avatar mode called {0} exists.", avatarMode); throwParserError(error); diff --git a/src/Griddly/Core/Observers/BlockObserver.cpp b/src/Griddly/Core/Observers/BlockObserver.cpp index 62754eff3..7caa52900 100644 --- a/src/Griddly/Core/Observers/BlockObserver.cpp +++ b/src/Griddly/Core/Observers/BlockObserver.cpp @@ -32,6 +32,16 @@ void BlockObserver::updateObjectSSBOData(PartialObservableGrid& observableGrid, const auto& objects = grid_->getObjects(); const auto& objectIds = grid_->getObjectIds(); + vk::ObjectDataSSBO backgroundTiling; + backgroundTiling.modelMatrix = glm::translate(backgroundTiling.modelMatrix, glm::vec3(gridWidth_ / 2.0 - config_.gridXOffset, gridHeight_ / 2.0 - config_.gridYOffset, 0.0)); + backgroundTiling.modelMatrix = glm::scale(backgroundTiling.modelMatrix, glm::vec3(gridWidth_, gridHeight_, 1.0)); + backgroundTiling.gridPosition = {0, 0, -10, 0}; + backgroundTiling.color = glm::vec4(0.0, 0.0, 0.0, 1.0); + backgroundTiling.textureMultiply = {gridWidth_, gridHeight_}; + backgroundTiling.textureIndex = device_->getSpriteArrayLayer("square"); + backgroundTiling.objectTypeId = 1000; + frameSSBOData_.objectSSBOData.push_back({backgroundTiling}); + for (auto& object : objects) { auto location = object->getLocation(); diff --git a/src/Griddly/Core/Observers/Vulkan/VulkanObserver.hpp b/src/Griddly/Core/Observers/Vulkan/VulkanObserver.hpp index 98f2c85cc..371daa056 100644 --- a/src/Griddly/Core/Observers/Vulkan/VulkanObserver.hpp +++ b/src/Griddly/Core/Observers/Vulkan/VulkanObserver.hpp @@ -25,7 +25,8 @@ enum class GlobalObserverAvatarMode { NONE, GRAYSCALE_INVISIBLE, DARKEN_INVISIBLE, - REMOVE_INVISIBLE + REMOVE_INVISIBLE, + HIGHLIGHT_VISIBLE, }; struct VulkanObserverConfig : ObserverConfig { diff --git a/tests/src/Griddly/Core/Observers/BlockObserverTest.cpp b/tests/src/Griddly/Core/Observers/BlockObserverTest.cpp index 01341ebf6..d19db520a 100644 --- a/tests/src/Griddly/Core/Observers/BlockObserverTest.cpp +++ b/tests/src/Griddly/Core/Observers/BlockObserverTest.cpp @@ -660,6 +660,25 @@ TEST(BlockObserverTest, render_player_observability_in_global_observer_remove) { runBlockObserverMultiAgentTest(config, {3, 200, 200}, {1, 4, 4 * 200}, "tests/resources/observer/block/render_player_observability_in_global_observer_remove.png"); } +TEST(BlockObserverTest, render_player_observability_in_global_observer_highlight) { + BlockObserverConfig config = { + 0, + 0, + 0, + 0, + false, + false}; + + config.shaderVariableConfig = { + {"_steps"}, + {}, + }; + + config.globalObserverAvatarMode = GlobalObserverAvatarMode::HIGHLIGHT_VISIBLE; + + runBlockObserverMultiAgentTest(config, {3, 200, 200}, {1, 4, 4 * 200}, "tests/resources/observer/block/render_player_observability_in_global_observer_highlight.png", true); +} + TEST(BlockObserverTest, multiPlayer_Outline_Player1) { BlockObserverConfig config = {5, 5, 0, 0}; config.playerId = 1; From 2a70526d9470fac01a3707e340bac9ed9513b920 Mon Sep 17 00:00:00 2001 From: Bam4d Date: Fri, 9 Dec 2022 18:25:15 +0000 Subject: [PATCH 2/6] updating docs --- .../Actions/items/Trigger/Offset/index.rst | 2 +- .../items/Trigger/Offset/items/index.rst | 4 +-- .../Custom Shaders/Global Lighting/index.rst | 1 + .../Custom Shaders/Health Bars/index.rst | 1 + .../Custom Shaders/Object Lighting/index.rst | 2 ++ docs/tutorials/Custom Shaders/index.rst | 1 + .../shaders/triangle-textured.vert | 1 + .../shaders/triangle-textured.vert | 1 + .../shaders/triangle-textured.frag | 1 + .../shaders/triangle-textured.vert | 1 + ...rvability_in_global_observer_highlight.png | Bin 3845 -> 0 bytes resources/gdy-schema.json | 34 ++++++++++++++++-- resources/images/block_shapes/fill.png | Bin 0 -> 4690 bytes .../default/block/triangle-textured.frag | 15 +++++--- .../default/block/triangle-textured.vert | 6 ++-- .../default/isometric/triangle-textured.frag | 13 +++++-- .../default/isometric/triangle-textured.vert | 1 + .../default/sprite/triangle-textured.frag | 11 +++++- .../default/sprite/triangle-textured.vert | 1 + src/Griddly/Core/GDY/GDYFactory.cpp | 5 +++ src/Griddly/Core/GDY/YAMLUtils.hpp | 14 ++++++++ src/Griddly/Core/Observers/BlockObserver.cpp | 5 +-- src/Griddly/Core/Observers/BlockObserver.hpp | 1 + .../Core/Observers/Vulkan/VulkanDevice.hpp | 1 + .../Core/Observers/Vulkan/VulkanObserver.cpp | 1 + .../Core/Observers/Vulkan/VulkanObserver.hpp | 1 + ...rvability_in_global_observer_greyscale.png | Bin 3286 -> 3488 bytes ...rvability_in_global_observer_highlight.png | Bin 0 -> 3441 bytes ...rvability_in_global_observer_highlight.png | Bin 0 -> 7705 bytes .../shaders/lighting/triangle-textured.frag | 1 + .../shaders/lighting/triangle-textured.vert | 1 + ...rvability_in_global_observer_highlight.png | Bin 0 -> 14334 bytes .../health_bars/triangle-textured.vert | 1 + .../Core/Observers/BlockObserverTest.cpp | 2 +- .../Observers/IsometricSpriteObserverTest.cpp | 21 +++++++++++ .../Core/Observers/SpriteObserverTest.cpp | 21 +++++++++++ 36 files changed, 151 insertions(+), 20 deletions(-) delete mode 100644 render_player_observability_in_global_observer_highlight.png create mode 100644 resources/images/block_shapes/fill.png create mode 100644 tests/resources/observer/block/render_player_observability_in_global_observer_highlight.png create mode 100644 tests/resources/observer/isometric/render_player_observability_in_global_observer_highlight.png create mode 100644 tests/resources/observer/sprite/render_player_observability_in_global_observer_highlight.png diff --git a/docs/reference/GDY/Actions/items/Trigger/Offset/index.rst b/docs/reference/GDY/Actions/items/Trigger/Offset/index.rst index 105d64b47..c6a7ad2be 100644 --- a/docs/reference/GDY/Actions/items/Trigger/Offset/index.rst +++ b/docs/reference/GDY/Actions/items/Trigger/Offset/index.rst @@ -25,7 +25,7 @@ Offset * - **Type** - **Description** - * - :ref:`Offset Coordinate<#/properties/Objects/items/properties/Observers/properties/Isometric/properties/Offset/item>` + * - :ref:`Offset Coordinate<#/properties/Objects/items/properties/Trigger/properties/Offset/item>` - Offset Coordinate diff --git a/docs/reference/GDY/Actions/items/Trigger/Offset/items/index.rst b/docs/reference/GDY/Actions/items/Trigger/Offset/items/index.rst index 56c7115d8..dbcfde9d8 100644 --- a/docs/reference/GDY/Actions/items/Trigger/Offset/items/index.rst +++ b/docs/reference/GDY/Actions/items/Trigger/Offset/items/index.rst @@ -1,6 +1,6 @@ -.. _#/properties/Objects/items/properties/Observers/properties/Isometric/properties/Offset/item: +.. _#/properties/Objects/items/properties/Trigger/properties/Offset/item: -.. #/properties/Objects/items/properties/Observers/properties/Isometric/properties/Offset/item +.. #/properties/Objects/items/properties/Trigger/properties/Offset/item Offset Coordinate ================= diff --git a/docs/tutorials/Custom Shaders/Global Lighting/index.rst b/docs/tutorials/Custom Shaders/Global Lighting/index.rst index 005bdccb8..7e76f72f1 100644 --- a/docs/tutorials/Custom Shaders/Global Lighting/index.rst +++ b/docs/tutorials/Custom Shaders/Global Lighting/index.rst @@ -145,6 +145,7 @@ We calculate the lighting level in the vertex shader (so we don't need to calcul layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/docs/tutorials/Custom Shaders/Health Bars/index.rst b/docs/tutorials/Custom Shaders/Health Bars/index.rst index 22cd24ae7..731fcb27c 100644 --- a/docs/tutorials/Custom Shaders/Health Bars/index.rst +++ b/docs/tutorials/Custom Shaders/Health Bars/index.rst @@ -193,6 +193,7 @@ How this ties in with the explanation of the normalized health calculations can layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/docs/tutorials/Custom Shaders/Object Lighting/index.rst b/docs/tutorials/Custom Shaders/Object Lighting/index.rst index 15b3ce73f..ad753b71d 100644 --- a/docs/tutorials/Custom Shaders/Object Lighting/index.rst +++ b/docs/tutorials/Custom Shaders/Object Lighting/index.rst @@ -183,6 +183,7 @@ Vertex layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; @@ -264,6 +265,7 @@ Fragment layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/docs/tutorials/Custom Shaders/index.rst b/docs/tutorials/Custom Shaders/index.rst index 7ab369ec3..fbb6ac295 100644 --- a/docs/tutorials/Custom Shaders/index.rst +++ b/docs/tutorials/Custom Shaders/index.rst @@ -77,6 +77,7 @@ The full shader layout is shown below.: layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/python/examples/Custom Shaders/Global Lighting/shaders/triangle-textured.vert b/python/examples/Custom Shaders/Global Lighting/shaders/triangle-textured.vert index f4179ee6d..d588b772d 100644 --- a/python/examples/Custom Shaders/Global Lighting/shaders/triangle-textured.vert +++ b/python/examples/Custom Shaders/Global Lighting/shaders/triangle-textured.vert @@ -36,6 +36,7 @@ struct ObjectData{ layout(std140,binding=1)uniform EnvironmentData{ mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/python/examples/Custom Shaders/Health Bars/shaders/triangle-textured.vert b/python/examples/Custom Shaders/Health Bars/shaders/triangle-textured.vert index c534e66a8..47ad8a9e3 100644 --- a/python/examples/Custom Shaders/Health Bars/shaders/triangle-textured.vert +++ b/python/examples/Custom Shaders/Health Bars/shaders/triangle-textured.vert @@ -36,6 +36,7 @@ struct ObjectData{ layout(std140,binding=1)uniform EnvironmentData{ mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/python/examples/Custom Shaders/Object Lighting/shaders/triangle-textured.frag b/python/examples/Custom Shaders/Object Lighting/shaders/triangle-textured.frag index 5a9944d75..98b506a4c 100644 --- a/python/examples/Custom Shaders/Object Lighting/shaders/triangle-textured.frag +++ b/python/examples/Custom Shaders/Object Lighting/shaders/triangle-textured.frag @@ -34,6 +34,7 @@ struct ObjectData{ layout(std140,binding=1)uniform EnvironmentData{ mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/python/examples/Custom Shaders/Object Lighting/shaders/triangle-textured.vert b/python/examples/Custom Shaders/Object Lighting/shaders/triangle-textured.vert index 0d70ffa05..415650602 100644 --- a/python/examples/Custom Shaders/Object Lighting/shaders/triangle-textured.vert +++ b/python/examples/Custom Shaders/Object Lighting/shaders/triangle-textured.vert @@ -24,6 +24,7 @@ struct ObjectData{ layout(std140,binding=1)uniform EnvironmentData{ mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/render_player_observability_in_global_observer_highlight.png b/render_player_observability_in_global_observer_highlight.png deleted file mode 100644 index 135583f616cbfe732909bc5d95b0dba11ddc3e51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3845 zcmbuCeLT~9|Hn6Tv%_W+Wt*5)?z)c7>?Wt!Y|Pe9Zsz8a6m5v56jG6!thqhEF~y}& zT4x-(Q7UzDk|qwTlQL9t>Ben2MT#_8xjy5Z>$-k_{QmeoE{_NA@5AGB`@VU;-k&_4 z4+m+8GlW1ONbV+ZJ$ z-PrT==wDy(o%hwRu}UXoJZ&2isDG$;&g0GJ45L(ICh~)I`DHnFO!Tp@_Q=~RpU=XZ zLW=HGrb4KX^|q1|h-FN64>)U~xsIHw6yC!kMJik*1*yFNl2oS8_Q?31K{PH_#qJ59+R-y|4rnlRT~8<$lP+U^&MC9rdPolV2jqkLzn=-!}nj8#Q1 zgY{WX(GcgYcfh~Hi(KZ6;x~Kec0SG|87NnV_bT36z^5@aE7Rp;gIro$CUyA`tX^Q4 zdB%yc-uH{0xV_70dxg)xyvSbkqNq4=$&GRsLoB;R>vWMy@LbjFgwsLDv5^!LNj79F zffyo|*q&0Mt*`21pB4E;`nOzhOQ&e`{nXIYq+je#_x&UdOBpy9Y9^f=$E)w(xF#nw=Z_h>XA+c4fGP$Mg`1~d?FBdH% z(t1*TKMT)ekRm7u3T-^|)4HArsSD9WGC6Md!3(zXl@a0|?TZ{7&qxjCSpK>g97Y%% zF_(;Hv)dQQqI3fRI)y?&bfZsxBO#!z!cE#p#inNV0YuHhL-=$n!rmo~asp9-X8dNR z(P+-l4<2~$REf$DcE7~Tep?ZfQ|^qiSQ4oWAvoB~KaZa9L~_Uc`HyqlsF zmcl~bOBu_Vp^Z0p&G+_vT`(}1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y-schema.json b/resources/gdy-schema.json index 49a4e377d..9b1d1c7b9 100644 --- a/resources/gdy-schema.json +++ b/resources/gdy-schema.json @@ -185,6 +185,21 @@ "default": "NONE", "enum": ["NONE", "GRAYSCALE", "DARKEN", "REMOVE"], "description": "The type of trigger to use." + }, + "ObserverAvatarHighlightColor": { + "$id": "#/properties/Environment/properties/Observers/properties/Shader/properties/ObserverAvatarHighlightColor", + "type": "array", + "title": "Color", + "description": "The color of the highlighting to use", + "additionalItems": false, + "minItems": 3, + "maxItems": 3, + "items": { + "$id": "#/properties/Objects/items/properties/Observers/properties/BackgroundColor/item", + "type": "number", + "title": "Color value", + "description": "A float value for RGB" + } } } }, @@ -210,6 +225,21 @@ } ] }, + "BackgroundColor": { + "$id": "#/properties/Environment/properties/Observers/properties/BackgroundColor", + "type": "array", + "title": "Color", + "description": "The color of the background of the game", + "additionalItems": false, + "minItems": 3, + "maxItems": 3, + "items": { + "$id": "#/properties/Objects/items/properties/Observers/properties/BackgroundColor/item", + "type": "number", + "title": "Color value", + "description": "A float value for RGB" + } + }, "BackgroundTile": { "$id": "#/properties/Environment/properties/Observers/properties/BackgroundTile", "type": "string", @@ -666,7 +696,7 @@ "type": "boolean", "title": "Relative", "description": "If the Offset of the collision detector should be relative to the direction that the object is facing." - }, + }, "Offset": { "$id": "#/properties/Actions/items/properties/Trigger/properties/Offset", "type": "array", @@ -676,7 +706,7 @@ "maxItems": 2, "minItems": 2, "items": { - "$id": "#/properties/Objects/items/properties/Observers/properties/Isometric/properties/Offset/item", + "$id": "#/properties/Objects/items/properties/Trigger/properties/Offset/item", "title": "Offset Coordinate", "description": "Coordinate for rendering offset of isometric tiles", "type": "integer" diff --git a/resources/images/block_shapes/fill.png b/resources/images/block_shapes/fill.png new file mode 100644 index 0000000000000000000000000000000000000000..f4502b636a7a61c33dbcf78b756d5e137ecb94dc GIT binary patch literal 4690 zcmeHKYg7~077hrAs0HeShlnw#C^V1BizE;b5*|^56j1P0naoVW0GY%jkbq)EL;*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Q`?TLLrmIX0q9I;6c}?69(8sC-hz0rs`5G<)8=?OTpB@RS&X415$>|v zfO6PuB^~0kQ92jl@#sRxk4NV!g{U6~V#5fG^@EZTdIL-#7zqWy892a!Sqe<4L=n0G zK+(B8h)owNFdkjNXAAuNI2;x#RP=+Gt;2yT;gtTfBB4+KB@l2B1XXhA5X?g8T$rPz z!zk=W7s40@!CXEH@i-PJ6cL4KbZQtZC$5H77*k8AECVFrqTnc*n8s$X-dmzlV1p6_ zh-tHMBGvSMAQo3+F$S1q6XN@^_$)5Z4`Op5h%b2WG#At9ff7kfh{fRa;*!fE0>uDg zVN$06z!Cv!5lM6yY|!XpHJTJLjhqsdjI_v`8qm8a5x5?Bq?3y8(|ioJr1!0N3#8zd zAu81(TM>-(Ceg!b7-~rb;(CXWM3_)vV1M@s>a89Bo5e!dC`YJJD(Nf)Qvik$0Uah+ zo~MAh94^e_3;4o;=z5LPV1#v8unJTPssRGBR70I=p>o=Hqc%`w_?6)SACq3H2#C1zP0!V zGXUtpBp<}@AYFrWeGmg5? zQ_KvPQhLbm&g!o=0n0FL#5_HPGJF(ySy76%y8`1-gG?Se^udT>PSAw5ka^j_G0xV<{gnqecb%^ltjqA0S^ LNa^8_gq42*DvjzM literal 0 HcmV?d00001 diff --git a/resources/shaders/default/block/triangle-textured.frag b/resources/shaders/default/block/triangle-textured.frag index b03e6915d..758b8e147 100644 --- a/resources/shaders/default/block/triangle-textured.frag +++ b/resources/shaders/default/block/triangle-textured.frag @@ -5,9 +5,8 @@ layout(binding=0)uniform sampler2DArray samplerArray; layout(location=0)in vec4 inColor; layout(location=1)in vec3 inFragTextureCoords; layout(location=2)in vec4 playerColor; -layout(location=3)flat in int objectTypeId; // Deprecated -layout(location=4)flat in int highlightPlayers; +layout(location=3)flat in int highlightPlayers; layout(location=0)out vec4 outFragColor; @@ -28,6 +27,7 @@ struct ObjectData{ layout(std140,binding=1)uniform EnvironmentData{ mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; @@ -98,9 +98,14 @@ void main() } if(environmentData.globalObserverAvatarMode==4){ - if(isInPlayerView()&&objectTypeId==1000){ - float highlight=.3; - outFragColor=vec4(min(1.,outFragColor.x+highlight),min(1.,outFragColor.y+highlight),min(1.,outFragColor.z+highlight),outFragColor.w); + if(isInPlayerView()){ + + // outFragColor=vec4(mix(outFragColor.rgb,environmentData.globalObserverAvatarHighlightColor.rgb,0.7),1.); + outFragColor=vec4( + min(1.,outFragColor.x+environmentData.globalObserverAvatarHighlightColor.x), + min(1.,outFragColor.y+environmentData.globalObserverAvatarHighlightColor.y), + min(1.,outFragColor.z+environmentData.globalObserverAvatarHighlightColor.z), + outFragColor.w); } }else if(environmentData.globalObserverAvatarMode==3){ if(!isInPlayerView()){ diff --git a/resources/shaders/default/block/triangle-textured.vert b/resources/shaders/default/block/triangle-textured.vert index 78b7ab60d..dd01e7f3f 100644 --- a/resources/shaders/default/block/triangle-textured.vert +++ b/resources/shaders/default/block/triangle-textured.vert @@ -6,10 +6,9 @@ layout(location = 1) in vec2 inFragTextureCoords; layout(location = 0) out vec4 outColor; layout(location = 1) out vec3 outFragTextureCoords; layout(location = 2) out vec4 outPlayerColor; -layout(location = 3) out int outObjectTypeId; // Deprecated -layout(location = 4) out int outHighlightPlayers; +layout(location = 3) out int outHighlightPlayers; out gl_PerVertex { vec4 gl_Position; @@ -37,6 +36,7 @@ struct ObjectData { layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; @@ -72,8 +72,6 @@ void main() { ObjectData object = objectDataBuffer.variables[pushConsts.idx]; PlayerInfo objectPlayerInfo = playerInfoBuffer.variables[object.playerId - 1]; - outObjectTypeId = object.objectType; - outFragTextureCoords = vec3( inFragTextureCoords.x * object.textureMultiply.x, inFragTextureCoords.y * object.textureMultiply.y, diff --git a/resources/shaders/default/isometric/triangle-textured.frag b/resources/shaders/default/isometric/triangle-textured.frag index e3ee6571f..b716a8926 100644 --- a/resources/shaders/default/isometric/triangle-textured.frag +++ b/resources/shaders/default/isometric/triangle-textured.frag @@ -17,7 +17,7 @@ struct PlayerInfo{ vec4 playerObservableGrid; }; -struct ObjectData { +struct ObjectData{ mat4 modelMatrix; vec4 color; vec4 gridPosition; @@ -30,6 +30,7 @@ struct ObjectData { layout(std140,binding=1)uniform EnvironmentData{ mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; @@ -79,7 +80,15 @@ void main() outFragColor=texture(samplerArray,inFragTextureCoords)*inColor; } - if(inIsInView == 0){ + if(inIsInView==1){ + if(environmentData.globalObserverAvatarMode==4){ + outFragColor=vec4( + min(1.,outFragColor.x+environmentData.globalObserverAvatarHighlightColor.x), + min(1.,outFragColor.y+environmentData.globalObserverAvatarHighlightColor.y), + min(1.,outFragColor.z+environmentData.globalObserverAvatarHighlightColor.z), + outFragColor.w); + } + }else{ if(environmentData.globalObserverAvatarMode==3){ outFragColor=vec4(0); }else if(environmentData.globalObserverAvatarMode==2){ diff --git a/resources/shaders/default/isometric/triangle-textured.vert b/resources/shaders/default/isometric/triangle-textured.vert index 505daf79d..216dc211b 100644 --- a/resources/shaders/default/isometric/triangle-textured.vert +++ b/resources/shaders/default/isometric/triangle-textured.vert @@ -38,6 +38,7 @@ struct ObjectData { layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/resources/shaders/default/sprite/triangle-textured.frag b/resources/shaders/default/sprite/triangle-textured.frag index 56b513976..25524cd35 100644 --- a/resources/shaders/default/sprite/triangle-textured.frag +++ b/resources/shaders/default/sprite/triangle-textured.frag @@ -28,6 +28,7 @@ struct ObjectData{ layout(std140,binding=1)uniform EnvironmentData{ mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; @@ -97,7 +98,15 @@ void main() outFragColor=texture(samplerArray,inFragTextureCoords)*inColor; } - if(environmentData.globalObserverAvatarMode==3){ + if(environmentData.globalObserverAvatarMode==4){ + if(isInPlayerView()){ + outFragColor=vec4( + min(1.,outFragColor.x+environmentData.globalObserverAvatarHighlightColor.x), + min(1.,outFragColor.y+environmentData.globalObserverAvatarHighlightColor.y), + min(1.,outFragColor.z+environmentData.globalObserverAvatarHighlightColor.z), + outFragColor.w); + } + }else if(environmentData.globalObserverAvatarMode==3){ if(!isInPlayerView()){ outFragColor=vec4(0); } diff --git a/resources/shaders/default/sprite/triangle-textured.vert b/resources/shaders/default/sprite/triangle-textured.vert index 6adf5039d..13845423d 100644 --- a/resources/shaders/default/sprite/triangle-textured.vert +++ b/resources/shaders/default/sprite/triangle-textured.vert @@ -35,6 +35,7 @@ struct ObjectData { layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/src/Griddly/Core/GDY/GDYFactory.cpp b/src/Griddly/Core/GDY/GDYFactory.cpp index 9f244cc31..3d767ddc3 100644 --- a/src/Griddly/Core/GDY/GDYFactory.cpp +++ b/src/Griddly/Core/GDY/GDYFactory.cpp @@ -383,6 +383,9 @@ BlockObserverConfig GDYFactory::parseNamedBlockObserverConfig(std::string observ config.highlightPlayers = resolveObserverConfigValue("HighlightPlayers", observerConfigNode, playerCount_ > 1, !isGlobalObserver); config.rotateAvatarImage = resolveObserverConfigValue("RotateAvatarImage", observerConfigNode, config.rotateAvatarImage, !isGlobalObserver); + auto backgroundColorNode = observerConfigNode["BackgroundColor"]; + config.backgroundColor = parseColorNode(observerConfigNode["BackgroundColor"]); + if (objectNames_.size() == 0) { return config; } @@ -473,6 +476,8 @@ void GDYFactory::parseNamedObserverShaderConfig(VulkanObserverConfig& config, YA return; } + config.globalObserverAvatarHighlightColor = parseColorNode(shaderConfigNode["ObserverAvatarHighlightColor"]); + auto globalObserverAvatarMode = shaderConfigNode["ObserverAvatarMode"]; if (globalObserverAvatarMode.IsDefined()) { auto avatarMode = globalObserverAvatarMode.as(); diff --git a/src/Griddly/Core/GDY/YAMLUtils.hpp b/src/Griddly/Core/GDY/YAMLUtils.hpp index acc8a416a..cd9024b98 100644 --- a/src/Griddly/Core/GDY/YAMLUtils.hpp +++ b/src/Griddly/Core/GDY/YAMLUtils.hpp @@ -53,4 +53,18 @@ inline YAML::iterator validateCommandPairNode(YAML::Node& commandPairNodeList) { return commandPairNodeList.begin(); } +inline glm::vec3 parseColorNode(YAML::Node colorNode) { + if (colorNode.IsDefined()) { + if (!colorNode.IsSequence() || colorNode.size() != 3) { + auto error = fmt::format("Color node misconfigured, must contain 3 values but only contains.", colorNode.size()); + throwParserError(error); + } else { + return glm::vec3{ + colorNode[0].as(0), + colorNode[1].as(0), + colorNode[2].as(0)}; + } + } +} + } // namespace griddly \ No newline at end of file diff --git a/src/Griddly/Core/Observers/BlockObserver.cpp b/src/Griddly/Core/Observers/BlockObserver.cpp index 7caa52900..402cab63e 100644 --- a/src/Griddly/Core/Observers/BlockObserver.cpp +++ b/src/Griddly/Core/Observers/BlockObserver.cpp @@ -12,6 +12,7 @@ const std::map BlockObserver::blockSpriteDefiniti {"square", {{"block_shapes/square.png"}}}, {"pentagon", {{"block_shapes/pentagon.png"}}}, {"hexagon", {{"block_shapes/hexagon.png"}}}, + {"fill", {{"block_shapes/fill.png"}}}, }; BlockObserver::BlockObserver(std::shared_ptr grid, BlockObserverConfig& config) @@ -36,9 +37,9 @@ void BlockObserver::updateObjectSSBOData(PartialObservableGrid& observableGrid, backgroundTiling.modelMatrix = glm::translate(backgroundTiling.modelMatrix, glm::vec3(gridWidth_ / 2.0 - config_.gridXOffset, gridHeight_ / 2.0 - config_.gridYOffset, 0.0)); backgroundTiling.modelMatrix = glm::scale(backgroundTiling.modelMatrix, glm::vec3(gridWidth_, gridHeight_, 1.0)); backgroundTiling.gridPosition = {0, 0, -10, 0}; - backgroundTiling.color = glm::vec4(0.0, 0.0, 0.0, 1.0); + backgroundTiling.color = glm::vec4(config_.backgroundColor, 1.0); backgroundTiling.textureMultiply = {gridWidth_, gridHeight_}; - backgroundTiling.textureIndex = device_->getSpriteArrayLayer("square"); + backgroundTiling.textureIndex = device_->getSpriteArrayLayer("fill"); backgroundTiling.objectTypeId = 1000; frameSSBOData_.objectSSBOData.push_back({backgroundTiling}); diff --git a/src/Griddly/Core/Observers/BlockObserver.hpp b/src/Griddly/Core/Observers/BlockObserver.hpp index 25532fe7e..9d1164668 100644 --- a/src/Griddly/Core/Observers/BlockObserver.hpp +++ b/src/Griddly/Core/Observers/BlockObserver.hpp @@ -17,6 +17,7 @@ struct BlockDefinition { struct BlockObserverConfig : public SpriteObserverConfig { std::map blockDefinitions; + glm::vec3 backgroundColor{}; }; class BlockObserver : public SpriteObserver { diff --git a/src/Griddly/Core/Observers/Vulkan/VulkanDevice.hpp b/src/Griddly/Core/Observers/Vulkan/VulkanDevice.hpp index 9ff0c59f9..a5c85dc06 100644 --- a/src/Griddly/Core/Observers/Vulkan/VulkanDevice.hpp +++ b/src/Griddly/Core/Observers/Vulkan/VulkanDevice.hpp @@ -91,6 +91,7 @@ struct VulkanPipeline { struct EnvironmentUniform { glm::mat4 projectionMatrix{1.0}; glm::mat4 viewMatrix{1.0}; + glm::vec4 globalObserverAvatarHighlightColor; glm::vec2 gridDims; uint32_t playerCount; diff --git a/src/Griddly/Core/Observers/Vulkan/VulkanObserver.cpp b/src/Griddly/Core/Observers/Vulkan/VulkanObserver.cpp index e07a381d5..e3ba64a28 100644 --- a/src/Griddly/Core/Observers/Vulkan/VulkanObserver.cpp +++ b/src/Griddly/Core/Observers/Vulkan/VulkanObserver.cpp @@ -101,6 +101,7 @@ vk::PersistentSSBOData VulkanObserver::updatePersistentShaderBuffers() { spdlog::debug("Highlighting players {0}", config_.highlightPlayers ? "true" : "false"); + persistentSSBOData.environmentUniform.globalObserverAvatarHighlightColor = glm::vec4(config_.globalObserverAvatarHighlightColor, 1.0); persistentSSBOData.environmentUniform.globalObserverAvatarMode = static_cast(config_.globalObserverAvatarMode); persistentSSBOData.environmentUniform.viewMatrix = getViewMatrix(); persistentSSBOData.environmentUniform.gridDims = glm::vec2{gridWidth_, gridHeight_}; diff --git a/src/Griddly/Core/Observers/Vulkan/VulkanObserver.hpp b/src/Griddly/Core/Observers/Vulkan/VulkanObserver.hpp index 371daa056..d4e8bfdfe 100644 --- a/src/Griddly/Core/Observers/Vulkan/VulkanObserver.hpp +++ b/src/Griddly/Core/Observers/Vulkan/VulkanObserver.hpp @@ -36,6 +36,7 @@ struct VulkanObserverConfig : ObserverConfig { bool highlightPlayers = false; std::vector playerColors{}; glm::ivec2 tileSize = {24, 24}; + glm::vec3 globalObserverAvatarHighlightColor{0.3, 0.3, 0.3}; GlobalObserverAvatarMode globalObserverAvatarMode = GlobalObserverAvatarMode::NONE; }; diff --git a/tests/resources/observer/block/render_player_observability_in_global_observer_greyscale.png b/tests/resources/observer/block/render_player_observability_in_global_observer_greyscale.png index 53c130aa1bb8f7a38b96d3f9569f02dd2888c19e..73cca4a225b81d2fa9504a9784f10bd345347b79 100644 GIT binary patch delta 2882 zcmZ{mXg?LJ|NY$g~+S)x`&z!w{;vx^!-*;$W596&^!!&%p$gj17zvcP5r0L4s_eKpTuQ-0v zblem-uhX8EXnmsOZU>S%fj_)PnCIb!)%_mI`B-UPCHsTGZw&4%(pca>iL6s$?+=p7#YhJp2v$wA6&@9^&0anAdYf4%UdaA7)wMCT;!t^Qa( zrBCyspwJKsHcAaha9s?HF|W4mY|O-dodio3I)d%TS-84`?_{oBIW$6i;q^B(qT;9y zLOr0{arrY{*obQJ^jw9N-D8&a*_1w(xtoXZh@6<5l+E1z&8oRY9mtMPiasuVm@@eo z9Z{g!f(np*CZ(3FJvC8k=IuNB`e{0+nv{o+KWA-gi)uUQ^8=RV^7n13ptd&IQ3b*- zN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?n@WGJaAEL^X{q~FC}qUm5N#r zOUMn1so2=9zLKN&6PEWnMQ>FpI;}^mGZ|q68>~LLJg2L+x%kJFJ|>YTE3gHebcUEO zN;$QX>!|nLQ&kXWs(wAWgKC=AAc;2@ya_g-+q)y*dpss77=FHoN%5BtZRChY?;C;&!n2HOOKOr-%M3 zDl<)eOk!8=&@;G4dD4I^uS1rH^buOk(r@&{ztxrN^Pbq!uyM3vI!2^kM@89)=2M$Q zd!mL)ZiSDa*zOT3&jZbjN`Vn6q}{#dh)@$x`Y`FJQV(nLbz80mgktUA$5?W6Cokk;8i zoc_>9X2`-fg!Mj!nAChoW5Dq*W>l8K-HuhioeP4~knd7}B)Q6Yg9-02iXWCVoZ0L5 z8H_m6!XK`%iR-p~-Ebi({KGTL&$Z`RG0&$cz^#Xaq=MXUWTh|Uq|X*6!)XU=I_=OC zb%?`h4pH8%5h}uQ)ZAn&oPIPd=SS(^JR~o!dZQU}1r M*DH{7#Z!>>C)N=$4gdfE diff --git a/tests/resources/observer/block/render_player_observability_in_global_observer_highlight.png b/tests/resources/observer/block/render_player_observability_in_global_observer_highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..96b5b7d15fef71f143015f0527c6899540f14d9d GIT binary patch literal 3441 zcmb`KdsNcd7RPy|ND%l)0Uv;q=x7!xR;DOELdh&EZ=sdqV+b|NOiNQs!%!Pc$}+|B z5#G}7G?QhGGnSE>q3I+>=GcptmO5n*$BY;s_xyC4`e*LCYu)bD&mC_QIr6MRS5pq&AGg%^rH4F7ffhakRy%Ejtp}J$k^OoijuUIT7_LKD8 z++lU4d8gX_QQOhtiiR@%!_kRAw)~f5ONo#u$=^=AV)KC60t&vbCT(Cd@_Hd zG5T7_fx%!fWRagO`#nK%imM;kY3%G{kcjagF+*H_TJcX>ONUg{fvlNa($e|o`YK~+ zea{XLrI~e6n&Q;NAtf00;w7b7;U1gwv^uqZ1Aa+_PlPsqPq$yGjhvQgi{dydg`-3e z4|X<=YXm+CSATOpLY}76-;^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In6L(Zyw#Kn-Gn9=59u&JA>5mE%nXybA|%7+is z;3-8AZpaCqhxQ8H9e@VJhI}W+n=|2xIZB;__u1rxkGd~8*SXd;TZDc256q}2dPrRg)kQ@S1_yk&D{6{#-ZPnD?2lH4Kl<3aqV8;7zq;kY5I;TxCs zi+CgjU!glPz;`0exK2pp+z^mW$eSa<_ag}i__RA9a1e#!thnRf^Fwff$`E7Bx zqgAyi7XJH<<=t!gbaG)N4k#J;F}dU-+xSoyKO?ua&l2eHOSCgS5w7&?s|B|kt0Ykj zPv2hCS+iI8nkNNC+ZN=9`n75eP6&ZcVshE@@-~KNbFb;psX2gV0G-3{e5&U(2J!0T zc?b=a!}4Fh^-#R+3%+GKMJM1hF1U<#d6YH&mxFXj&q0jet`9q<>$GDNs^$Po`CR zOxFN=I}1n|v9dwy@@e^eV?WTEk=uX&mTsy~NHfdSX&&S#Go5omUCUuc*^=X6>F?r; zbo$0l5@mWEsRn{+LtCMmL}T0;41N7I3; z0{o}3Sr}LnLWAIHexlOPES>(uFNHIXOKQ3aY&UpU+Cyvrf|)4RT^;B&?XAdsAB!*w$skexjD<>bc6=ah1Ef=4XW;Fz?+h!CkwYsqb;MHVnXqX zLGJASdoI(T9#FHCyN%}URG#>f<^DRAJxv;l_<;3SOw3#as`ZVVE= z=`MjLHVBN!As;9RS99#23TppT+jU=crrN(fLzq_@FiF$@wJdW5D@S+k}zR>Db>wT+yxT609 DH=-W^ literal 0 HcmV?d00001 diff --git a/tests/resources/observer/isometric/shaders/lighting/triangle-textured.frag b/tests/resources/observer/isometric/shaders/lighting/triangle-textured.frag index 9179464a2..a8ff057fe 100644 --- a/tests/resources/observer/isometric/shaders/lighting/triangle-textured.frag +++ b/tests/resources/observer/isometric/shaders/lighting/triangle-textured.frag @@ -34,6 +34,7 @@ struct ObjectData { layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/tests/resources/observer/isometric/shaders/lighting/triangle-textured.vert b/tests/resources/observer/isometric/shaders/lighting/triangle-textured.vert index d6b461009..554038f35 100644 --- a/tests/resources/observer/isometric/shaders/lighting/triangle-textured.vert +++ b/tests/resources/observer/isometric/shaders/lighting/triangle-textured.vert @@ -37,6 +37,7 @@ struct ObjectData { layout(std140, binding = 1) uniform EnvironmentData { mat4 projectionMatrix; mat4 viewMatrix; + vec4 globalObserverAvatarHighlightColor; vec2 gridDims; int playerCount; int playerId; diff --git a/tests/resources/observer/sprite/render_player_observability_in_global_observer_highlight.png b/tests/resources/observer/sprite/render_player_observability_in_global_observer_highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..ecc9594bc806f05300fc80256eaea363cbdb0eb5 GIT binary patch literal 14334 zcmYj&dpwi<8~^5JbC`3nIgKcaG8;MDq)-W!ik=?kEO}~44v}qElTuEVQ&>@{r-M*b z4r9*eP)W*$NQud5Y3})H9cekTgtZ$&#;lsjSn52dq5j`OWgScbBxNmBU~E=*RL=TB--d zp@Q`ltfx*pg$bf&Ox#diZb~nxB*Ln-4_aWIixGn^)&6C9Rl%KVW%`ai)B|*?6ivLI zJTZE30gZOuYkH|s@%A(J51QFBGDpoXK_u@n#j0H9e(+$P@e||iLV`l8*U}j9o0~AV z1_!}w1aSy1P}IRTW_Pgu?QUl`cC^9viP8-^+xV+feoQKR2x!J4ja30@#vxOE-1|hS zj#|-TK3yiSn2eE}&^_yL6mdE_q|8S*n}*krE)G#dAWrYxLTL$vg{YskLm6-Cg?LNbu|GaZAQO^>rC$)h{}GR7%EugS#k=f zGpHC0EqC|+155Qg24WBm#ClBBQZ-uq0t^+b{>1L%?4_cL zsG>b5>*(DvXyZR!Ju@$+|F7++|E{IE&qNaDfJQ&`3m; zz&!Kd!FZ)fe{jvET}#-I~nf4SF)x=_SskdP3+%AjA)$fc*qgxRR;m#B)1 zctnm7TAt3+kYIJqFSJt0)I9je)m8qIDWlXt4j@?Sb5@E#_SX=J5cC!@cu6zI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q#hpVyI;vV@~x~xd1zxudb)owtUHr|V3DTLgWKTm4OkzPptoWKTnC%Lil$5k_+Tf{jCpuj4>Pjv_e^X>pB&86!|$s7q7VBpz9ln0Vkl<9j_7 zM?kjuR}EETNKS3Kgimz&H$SOE7#+LSR#>E@QB_iS#wZaah=6Ue&7JLJV=24*pV;O3 zZ+~7Vg4`(`?soxx|K%K;6GsnpN2OU=(J!71L3pkO0nb$8db)Zj!j1YIVoAj)>8W12 zozXw^#V?`Xf?&V))rhc>6s?M~G78|DVZ=GZOtaHMMX;BZjLWK#o4M-je$m215Os&O zb3^IJv`g!PUNk^c1)B zc~hXYy5-dt^}$9SBD(7RWwBY!T2~t%!uRl~7PSg#93uhP(p&|4quo}icna*8ZPFTw zwdDq^kF=wOioWKVu4-y@m+>*ujCS+|4kCN+Jtr-k2FJ-H)^{ z+C*n4IZuTAbWeU?MOiz=a~Qb4XQKTqMNdA0T8D7gC=BHW#44Uhl-kD9--z7yNKD}4M4UGX$`i2k%dFi!atDT4 zkG~`P$U3@MuVIFkRQuiZ5V+A{dbpG)wh%ZmfTKb0m{}*uwd Date: Sat, 10 Dec 2022 15:05:16 +0000 Subject: [PATCH 3/6] fixing bug and adding a test for highlight color, also added ninja to builds to try make them a bit speedier --- azure-pipelines.yml | 10 +++++----- src/Griddly/Core/GDY/YAMLUtils.hpp | 6 ++++-- tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp | 9 +++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f04576d47..5d1ded7ac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,7 +39,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING=$(py.pythonLocation) + cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING=$(py.pythonLocation) cmake --build . --config Release displayName: Build - bash: | @@ -157,7 +157,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING="$(py.pythonLocation)" + cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING="$(py.pythonLocation)" cmake --build . --config Release displayName: Build - bash: | @@ -221,7 +221,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING="$(py.pythonLocation)" + cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING="$(py.pythonLocation)" cmake --build . --target python_griddly --config Release displayName: Build - script: | @@ -272,7 +272,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING=$(py.pythonLocation) + cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING=$(py.pythonLocation) cmake --build . --config Release displayName: Build - bash: | @@ -334,7 +334,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING=$(py.pythonLocation) + cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING=$(py.pythonLocation) cmake --build . --config Release displayName: Build - script: | diff --git a/src/Griddly/Core/GDY/YAMLUtils.hpp b/src/Griddly/Core/GDY/YAMLUtils.hpp index cd9024b98..632a48bda 100644 --- a/src/Griddly/Core/GDY/YAMLUtils.hpp +++ b/src/Griddly/Core/GDY/YAMLUtils.hpp @@ -56,7 +56,7 @@ inline YAML::iterator validateCommandPairNode(YAML::Node& commandPairNodeList) { inline glm::vec3 parseColorNode(YAML::Node colorNode) { if (colorNode.IsDefined()) { if (!colorNode.IsSequence() || colorNode.size() != 3) { - auto error = fmt::format("Color node misconfigured, must contain 3 values but only contains.", colorNode.size()); + auto error = fmt::format("Color node misconfigured, must contain 3 values but contains {0}.", colorNode.size()); throwParserError(error); } else { return glm::vec3{ @@ -64,7 +64,9 @@ inline glm::vec3 parseColorNode(YAML::Node colorNode) { colorNode[1].as(0), colorNode[2].as(0)}; } - } + } + + return glm::vec3{}; } } // namespace griddly \ No newline at end of file diff --git a/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp b/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp index 96ce0a5e0..c36691185 100644 --- a/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp +++ b/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp @@ -234,6 +234,11 @@ TEST(GDYFactoryTest, loadEnvironment_ObserverShaderOptions) { Type: ISOMETRIC Shader: ObserverAvatarMode: REMOVE + BlockHighlighted: + Type: BLOCK_2D + Shader: + ObserverAvatarMode: HIGHLIGHT + ObserverAvatarHightlightColor: [0.3, 0.2, 0.1] )"; @@ -249,6 +254,10 @@ TEST(GDYFactoryTest, loadEnvironment_ObserverShaderOptions) { auto isometricObserverConfig = gdyFactory->generateConfigForObserver("Isometric"); ASSERT_EQ(isometricObserverConfig.globalObserverAvatarMode, GlobalObserverAvatarMode::REMOVE_INVISIBLE); + + auto blockHightlightedObserverConfig = gdyFactory->generateConfigForObserver("BlockHighlighted"); + ASSERT_EQ(isometricObserverConfig.globalObserverAvatarMode, GlobalObserverAvatarMode::HIGHLIGHT_VISIBLE); + ASSERT_THAT(isometricObserverConfig.globalObserverAvatarHighlightColor, ElementsAre(0.3,0.2,0.1)); } TEST(GDYFactoryTest, loadEnvironment_NamedObservers) { From fd6017ce793a1fd17f7dd19638357db641909f9a Mon Sep 17 00:00:00 2001 From: Bam4d Date: Sat, 10 Dec 2022 15:29:05 +0000 Subject: [PATCH 4/6] remove Ninja because its not installed on azure, fixing tests --- azure-pipelines.yml | 10 +++++----- tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp | 15 +++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5d1ded7ac..f04576d47 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,7 +39,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING=$(py.pythonLocation) + cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING=$(py.pythonLocation) cmake --build . --config Release displayName: Build - bash: | @@ -157,7 +157,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING="$(py.pythonLocation)" + cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING="$(py.pythonLocation)" cmake --build . --config Release displayName: Build - bash: | @@ -221,7 +221,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING="$(py.pythonLocation)" + cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING="$(py.pythonLocation)" cmake --build . --target python_griddly --config Release displayName: Build - script: | @@ -272,7 +272,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING=$(py.pythonLocation) + cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING=$(py.pythonLocation) cmake --build . --config Release displayName: Build - bash: | @@ -334,7 +334,7 @@ jobs: displayName: Install Conan - bash: | set -ex - cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -DPython_ROOT_DIR:STRING=$(py.pythonLocation) + cmake . -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR:STRING=$(py.pythonLocation) cmake --build . --config Release displayName: Build - script: | diff --git a/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp b/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp index c36691185..641122ef6 100644 --- a/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp +++ b/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp @@ -238,7 +238,7 @@ TEST(GDYFactoryTest, loadEnvironment_ObserverShaderOptions) { Type: BLOCK_2D Shader: ObserverAvatarMode: HIGHLIGHT - ObserverAvatarHightlightColor: [0.3, 0.2, 0.1] + ObserverAvatarHighlightColor: [0.3, 0.2, 0.1] )"; @@ -255,9 +255,9 @@ TEST(GDYFactoryTest, loadEnvironment_ObserverShaderOptions) { auto isometricObserverConfig = gdyFactory->generateConfigForObserver("Isometric"); ASSERT_EQ(isometricObserverConfig.globalObserverAvatarMode, GlobalObserverAvatarMode::REMOVE_INVISIBLE); - auto blockHightlightedObserverConfig = gdyFactory->generateConfigForObserver("BlockHighlighted"); - ASSERT_EQ(isometricObserverConfig.globalObserverAvatarMode, GlobalObserverAvatarMode::HIGHLIGHT_VISIBLE); - ASSERT_THAT(isometricObserverConfig.globalObserverAvatarHighlightColor, ElementsAre(0.3,0.2,0.1)); + auto blockHightlightedObserverConfig = gdyFactory->generateConfigForObserver("BlockHighlighted"); + ASSERT_EQ(blockHightlightedObserverConfig.globalObserverAvatarMode, GlobalObserverAvatarMode::HIGHLIGHT_VISIBLE); + ASSERT_EQ(blockHightlightedObserverConfig.globalObserverAvatarHighlightColor, glm::vec3(0.3, 0.2, 0.1)); } TEST(GDYFactoryTest, loadEnvironment_NamedObservers) { @@ -746,7 +746,7 @@ TEST(GDYFactoryTest, loadEnvironment_MultiPlayerHighlight) { } TEST(GDYFactoryTest, loadEnvironment_termination_v1) { - //auto mockObjectGeneratorPtr = std::shared_ptr(new MockObjectGenerator()); + // auto mockObjectGeneratorPtr = std::shared_ptr(new MockObjectGenerator()); auto mockTerminationGeneratorPtr = std::make_shared(); auto gdyFactory = std::shared_ptr(new GDYFactory(nullptr, mockTerminationGeneratorPtr, {})); auto yamlString = R"( @@ -777,7 +777,7 @@ TEST(GDYFactoryTest, loadEnvironment_termination_v1) { } TEST(GDYFactoryTest, loadEnvironment_termination_v2) { - //auto mockObjectGeneratorPtr = std::shared_ptr(new MockObjectGenerator()); + // auto mockObjectGeneratorPtr = std::shared_ptr(new MockObjectGenerator()); auto mockTerminationGeneratorPtr = std::make_shared(); auto gdyFactory = std::shared_ptr(new GDYFactory(nullptr, mockTerminationGeneratorPtr, {})); auto yamlString = R"( @@ -904,7 +904,6 @@ void expectOpposingDefinitionNOP(ActionBehaviourType behaviourType, uint32_t beh .Times(1); } - void testBehaviourDefinition(std::string yamlString, ActionBehaviourDefinition expectedBehaviourDefinition, bool expectNOP) { auto mockObjectGeneratorPtr = std::make_shared(); auto mockTerminationGeneratorPtr = std::make_shared(); @@ -1746,7 +1745,7 @@ TEST(GDYFactoryTest, action_no_triggers) { auto mockTerminationGeneratorPtr = std::make_shared(); auto gdyFactory = std::shared_ptr(new GDYFactory(mockObjectGeneratorPtr, mockTerminationGeneratorPtr, {})); - auto objectsNode = loadFromStringAndGetNode(yamlString, "Objects"); + auto objectsNode = loadFromStringAndGetNode(yamlString, "Objects"); gdyFactory->loadObjects(objectsNode); auto actionsNode = loadFromStringAndGetNode(std::string(yamlString), "Actions"); From 18af5ae5e3b5b88c1772c71fb23e87763671d962 Mon Sep 17 00:00:00 2001 From: Bam4d Date: Sat, 10 Dec 2022 15:31:28 +0000 Subject: [PATCH 5/6] test for block background color --- tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp b/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp index 641122ef6..4116b0ebe 100644 --- a/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp +++ b/tests/src/Griddly/Core/GDY/GDYFactoryTest.cpp @@ -407,6 +407,7 @@ TEST(GDYFactoryTest, loadEnvironment_BlockObserverConfig) { Description: Test Description Observers: Block2D: + BackgroundColor: [0.3,0.3,0.3] TileSize: 24 )"; @@ -421,6 +422,7 @@ TEST(GDYFactoryTest, loadEnvironment_BlockObserverConfig) { auto config = gdyFactory->generateConfigForObserver("Block2D"); ASSERT_EQ(config.tileSize, glm::ivec2(24, 24)); + ASSERT_EQ(config.backgroundColor, glm::vec3(0.3, 0.3, 0.3)); ASSERT_EQ(config.gridXOffset, 0); ASSERT_EQ(config.gridYOffset, 0); From dbe583683aeb99976f40922bc325d04e7cd51229 Mon Sep 17 00:00:00 2001 From: Bam4d Date: Sat, 10 Dec 2022 16:09:53 +0000 Subject: [PATCH 6/6] bumping version number to 1.6.2 --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- CMakeLists.txt | 2 +- bindings/python.cpp | 2 +- docs/conf.py | 2 +- js/griddlyjs-app/package.json | 2 +- python/setup.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 11f93dcb5..4eb29721d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,7 +24,7 @@ If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. mac/linux/windows] - - Version [e.g. 1.6.1] + - Version [e.g. 1.6.2] **Additional context** Add any other context about the problem here. diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b3cc49bc..81e29f758 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.18.0) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") -project(Griddly VERSION 1.6.1) +project(Griddly VERSION 1.6.2) string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE) diff --git a/bindings/python.cpp b/bindings/python.cpp index 060b153a5..f5d4e0742 100644 --- a/bindings/python.cpp +++ b/bindings/python.cpp @@ -12,7 +12,7 @@ namespace griddly { PYBIND11_MODULE(python_griddly, m) { m.doc() = "Griddly python bindings"; - m.attr("version") = "1.6.1"; + m.attr("version") = "1.6.2"; #ifndef NDEBUG spdlog::set_level(spdlog::level::debug); diff --git a/docs/conf.py b/docs/conf.py index 1b88ac720..c3ce9bb8e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'Chris Bamford' # The full version, including alpha/beta/rc tags -release = '1.6.1' +release = '1.6.2' # -- General configuration --------------------------------------------------- diff --git a/js/griddlyjs-app/package.json b/js/griddlyjs-app/package.json index 07110e47e..4f09ebe1c 100644 --- a/js/griddlyjs-app/package.json +++ b/js/griddlyjs-app/package.json @@ -1,6 +1,6 @@ { "name": "griddlyjs-app", - "version": "1.6.1", + "version": "1.6.2", "private": true, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.1.1", diff --git a/python/setup.py b/python/setup.py index bbfad7fa0..3cac66739 100644 --- a/python/setup.py +++ b/python/setup.py @@ -71,7 +71,7 @@ def griddly_package_data(config='Debug'): setup( name='griddly', - version="1.6.1", + version="1.6.2", author_email="chrisbam4d@gmail.com", description="Griddly Python Libraries", long_description=long_description,