From 2f9f55eafc1290457bbe7fc810387ce89cf1f002 Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Thu, 29 Feb 2024 18:50:26 +0100 Subject: [PATCH 1/7] large selection bug fixed --- source/Base/Resources.h | 2 +- source/EngineGpuKernels/Math.cuh | 3 +++ vcpkg.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Base/Resources.h b/source/Base/Resources.h index eb32b7b2d..fdd2bb3d9 100644 --- a/source/Base/Resources.h +++ b/source/Base/Resources.h @@ -2,7 +2,7 @@ namespace Const { - std::string const ProgramVersion = "4.8.0"; + std::string const ProgramVersion = "4.8.1"; std::string const DiscordLink = "https://discord.gg/7bjyZdXXQ2"; std::string const BasePath = "resources/"; diff --git a/source/EngineGpuKernels/Math.cuh b/source/EngineGpuKernels/Math.cuh index 052ed1493..4ad9b74dd 100644 --- a/source/EngineGpuKernels/Math.cuh +++ b/source/EngineGpuKernels/Math.cuh @@ -193,6 +193,9 @@ __inline__ __device__ void Math::angleCorrection(int &angle) __inline__ __device__ bool Math::isInBetweenModulo(float value1, float value2, float candidate, float size) { + if (value2 - value1 >= size) { + return true; + } auto valueMod1 = modulo(value1, size); auto valueMod2 = modulo(value2, size); auto candidateMod = modulo(candidate, size); diff --git a/vcpkg.json b/vcpkg.json index 77db1f95c..a072b0009 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "alien", - "version": "4.8.0", + "version": "4.8.1", "dependencies": [ { "name": "glew", From feb028ab558a65d78c48dd9ed3a6faff74b7ea61 Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Sat, 9 Mar 2024 08:19:32 +0100 Subject: [PATCH 2/7] Update ubuntu-ci.yml --- .github/workflows/ubuntu-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 2aeab6a5c..f7f8f7e99 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -28,7 +28,7 @@ jobs: sudo apt-get update -qq sudo apt-get install -y --no-install-recommends libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libgl1-mesa-dev libglu-dev - - uses: Jimver/cuda-toolkit@v0.2.10 + - uses: Jimver/cuda-toolkit@v0.2.14 id: cuda-toolkit with: cuda: '11.7.1' From 204344bdb1b6ea1df5540ec69403d6677466395e Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Sat, 9 Mar 2024 17:47:14 +0100 Subject: [PATCH 3/7] tooltips in temporal control window extended --- source/Gui/TemporalControlWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Gui/TemporalControlWindow.cpp b/source/Gui/TemporalControlWindow.cpp index 19351a28c..f2bd6ed72 100644 --- a/source/Gui/TemporalControlWindow.cpp +++ b/source/Gui/TemporalControlWindow.cpp @@ -169,7 +169,7 @@ void _TemporalControlWindow::processStepForwardButton() void _TemporalControlWindow::processCreateFlashbackButton() { auto result = AlienImGui::ToolbarButton(ICON_FA_CAMERA); - AlienImGui::Tooltip("Create flashback"); + AlienImGui::Tooltip("Create flashback: It saves the content of the current world to memory."); if (result) { delayedExecution([this] { onSnapshot(); }); @@ -181,7 +181,7 @@ void _TemporalControlWindow::processLoadFlashbackButton() { ImGui::BeginDisabled(!_snapshot); auto result = AlienImGui::ToolbarButton(ICON_FA_UNDO); - AlienImGui::Tooltip("Load flashback"); + AlienImGui::Tooltip("Load flashback: It loads the saved world from memory."); if (result) { delayedExecution([this] { applySnapshot(*_snapshot); }); _simController->removeSelection(); From 43e59508b5998c09839619eb82bf30a5ab931432 Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Sat, 9 Mar 2024 18:17:54 +0100 Subject: [PATCH 4/7] typo --- source/Gui/TemporalControlWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Gui/TemporalControlWindow.cpp b/source/Gui/TemporalControlWindow.cpp index f2bd6ed72..3e9969a5b 100644 --- a/source/Gui/TemporalControlWindow.cpp +++ b/source/Gui/TemporalControlWindow.cpp @@ -169,7 +169,7 @@ void _TemporalControlWindow::processStepForwardButton() void _TemporalControlWindow::processCreateFlashbackButton() { auto result = AlienImGui::ToolbarButton(ICON_FA_CAMERA); - AlienImGui::Tooltip("Create flashback: It saves the content of the current world to memory."); + AlienImGui::Tooltip("Create flashback: It saves the content of the current world to the memory."); if (result) { delayedExecution([this] { onSnapshot(); }); @@ -181,7 +181,7 @@ void _TemporalControlWindow::processLoadFlashbackButton() { ImGui::BeginDisabled(!_snapshot); auto result = AlienImGui::ToolbarButton(ICON_FA_UNDO); - AlienImGui::Tooltip("Load flashback: It loads the saved world from memory."); + AlienImGui::Tooltip("Load flashback: It loads the saved world from the memory."); if (result) { delayedExecution([this] { applySnapshot(*_snapshot); }); _simController->removeSelection(); From cfe148bc82be6424b588d5193e2c799a1ced102a Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Wed, 13 Mar 2024 21:23:11 +0100 Subject: [PATCH 5/7] the dying state of cells can spread to cells under construction even if they belong to other an other creature --- source/EngineGpuKernels/CellProcessor.cuh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/EngineGpuKernels/CellProcessor.cuh b/source/EngineGpuKernels/CellProcessor.cuh index 3cd639a0a..0876c8956 100644 --- a/source/EngineGpuKernels/CellProcessor.cuh +++ b/source/EngineGpuKernels/CellProcessor.cuh @@ -607,6 +607,8 @@ __inline__ __device__ void CellProcessor::livingStateTransition(SimulationData& auto const& connectedCell = cell->connections[i].cell; if (connectedCell->creatureId == cell->creatureId) { atomicExch(&connectedCell->livingState, LivingState_Dying); + } else { + atomicCAS(&connectedCell->livingState, LivingState_UnderConstruction, LivingState_Dying); } } } From 4ce7b7677ee3719f3f76c81361b51b3bc9d898d1 Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Sat, 16 Mar 2024 17:04:25 +0100 Subject: [PATCH 6/7] infinite construction fixed --- source/EngineGpuKernels/ConstructorProcessor.cuh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/EngineGpuKernels/ConstructorProcessor.cuh b/source/EngineGpuKernels/ConstructorProcessor.cuh index 2e57dcd21..75c319073 100644 --- a/source/EngineGpuKernels/ConstructorProcessor.cuh +++ b/source/EngineGpuKernels/ConstructorProcessor.cuh @@ -191,9 +191,14 @@ __inline__ __device__ ConstructorProcessor::ConstructionData ConstructorProcesso ConstructionData result; result.genomeHeader = GenomeDecoder::readGenomeHeader(constructor); - result.lastConstructionCell = getLastConstructedCell(cell); - if (!result.lastConstructionCell) { + result.hasInfiniteRepetitions = GenomeDecoder::hasInfiniteRepetitions(constructor); + if (!GenomeDecoder::hasInfiniteRepetitions(constructor) && constructor.genomeCurrentNodeIndex == 0 && constructor.genomeCurrentRepetition == 0) { + result.lastConstructionCell = nullptr; + } else { + result.lastConstructionCell = getLastConstructedCell(cell); + } + if (!result.lastConstructionCell) { //finished => reset indices constructor.genomeCurrentNodeIndex = 0; constructor.genomeCurrentRepetition = 0; @@ -209,7 +214,6 @@ __inline__ __device__ ConstructorProcessor::ConstructionData ConstructorProcesso result.genomeCurrentBytePosition = GenomeDecoder::getNodeAddress(constructor.genome, constructor.genomeSize, constructor.genomeCurrentNodeIndex); result.isLastNode = GenomeDecoder::isLastNode(constructor); result.isLastNodeOfLastRepetition = result.isLastNode && GenomeDecoder::isLastRepetition(constructor); - result.hasInfiniteRepetitions = GenomeDecoder::hasInfiniteRepetitions(constructor); CudaShapeGenerator shapeGenerator; auto shape = result.genomeHeader.shape % ConstructionShape_Count; @@ -300,9 +304,6 @@ ConstructorProcessor::tryConstructCell(SimulationData& data, SimulationStatistic __inline__ __device__ Cell* ConstructorProcessor::getLastConstructedCell(Cell* hostCell) { auto const& constructor = hostCell->cellFunctionData.constructor; - if (constructor.genomeCurrentNodeIndex == 0) { - return nullptr; - } if (constructor.lastConstructedCellId != 0) { for (int i = 0; i < hostCell->numConnections; ++i) { auto const& connectedCell = hostCell->connections[i].cell; From 1e72f49df87cb1c856da21a8d5c9a121a2285006 Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Sat, 16 Mar 2024 19:01:35 +0100 Subject: [PATCH 7/7] RELEASE-NOTES.md updated --- RELEASE-NOTES.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 466ab1147..dd7b7f04a 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,5 +1,13 @@ # Release notes +## [4.8.1] - 2024-03-16 +### Changed +- engine: the dying state of cells can spread to cells under construction even if they belong to other an other creature + +### Fixed +- engine: construction with infinite repetitions fixed +- gui: selection of large sections in edit mode fixed + ## [4.8.0] - 2024-02-25 ### Added - gui/simulation view: borderless rendering (world is rendered periodically) + parameter to (de)activate