Skip to content

Commit

Permalink
Finished Release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zang3th committed Jul 28, 2024
1 parent aa39dc8 commit 7bbc453
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 28 deletions.
14 changes: 4 additions & 10 deletions Engine/Physics/FluidSimulation/FluidSimulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,8 @@ namespace Engine
*prev_pos = pos * h + h2 - dt * vel;
}

void FluidSimulator::RungeKutta2(const float dt, const float pos, const float h, const float h2,
const float vel, const float dx, const float dy, float* prev_pos) const
{
// void FluidSimulator::RungeKutta2( ... )
// {
/* We wrote the update rule for Forward-Euler above like this: *
* *
* x1 = x0 - dt * f(x0) *
Expand All @@ -390,13 +389,8 @@ namespace Engine
* k2 = f(t_n - h/2, y_n - h/2 * k1) *
* y_n+1 = y_n - h * k2 */

//ToDo: Implement
}

void FluidSimulator::RungeKutta3() const
{
//ToDo: Implement
}
// Currently implemented using multiple steps of forward euler
// }

// ----- Public -----

Expand Down
3 changes: 0 additions & 3 deletions Engine/Physics/FluidSimulation/FluidSimulator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ namespace Engine
void AdvectSmoke(float dt);
void MonitorCFLStability(float dt, float value) const;
void ForwardEuler(float dt, float pos, float h, float h2, float vel, float* prev_pos);
void RungeKutta2(float dt, float pos, float h, float h2,
float vel, float dx, float dy, float* prev_pos) const;
void RungeKutta3() const;

public:
FluidSimulator();
Expand Down
3 changes: 1 addition & 2 deletions Engine/Rendering/Renderer/GridRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,14 @@ namespace Engine
uint32 sampleAmount = width / size;

glm::uvec2 gridPos = pos;
bool success = false;

//Go over the image in sampleAmount steps
for(uint32 x = 0; x < width; x += sampleAmount)
{
for(uint32 y = 0; y < height; y += sampleAmount)
{
glm::uvec3 subsampledColor = {0, 0, 0};
success = textureBuffer->SubsampleArea(x, y, sampleAmount, &subsampledColor);
bool success = textureBuffer->SubsampleArea(x, y, sampleAmount, &subsampledColor);

if(success)
{
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build](https://github.com/Zang3th/SalinityGL/actions/workflows/build.yml/badge.svg?branch=liquefied-2d)](https://github.com/Zang3th/SalinityGL/actions/workflows/build.yml)
[![Static Analysis](https://github.com/Zang3th/SalinityGL/actions/workflows/analyze.yml/badge.svg?branch=liquefied-2d)](https://github.com/Zang3th/SalinityGL/actions/workflows/analyze.yml)
![OS](https://img.shields.io/badge/OS-Linux-blue)
![Release](https://img.shields.io/badge/Release-v0.1.1-blue)
![Release](https://img.shields.io/badge/Release-v0.2.0-blue)

## Introduction

Expand All @@ -23,12 +23,12 @@ SalinityGL is licensed under the [MIT LICENSE](https://github.com/Zang3th/GameEn
├── Apps/ # Demo applications
│ ├── GreenWorld/ # 3D nature scene
│ └── CellSim/ # 3D Cellular Automata System (on hold) ⌛
│ └── Liquefied/ # 2D Eulerian Fluid Simulation (in development) 🔥
│ └── Liquefied/ # 2D Eulerian Fluid Simulation
├── Engine/
│ ├── Application/ # Application and interface stuff
│ ├── Core/ # Utilities and core engine functionalities
│ ├── Debug/ # Logging and error handling
├── Phyics/ # Code for cellular automata and fluid simulation
├── Physics/ # Code for cellular automata and fluid simulation
│ ├── Rendering/ # GL stuff, buffers, renderer ...
│ └── Engine.hpp # Main header for include in the applications
├── Res/ # Assets, sounds and screenshots
Expand All @@ -39,7 +39,7 @@ SalinityGL is licensed under the [MIT LICENSE](https://github.com/Zang3th/GameEn

- Thin OpenGL-Wrapping
- VAO, VBO, IBO, FBO
- Resource management (shaders, textures)
- Resource loading and management (shaders, textures)
- Error handling
- Window creation
- UI
Expand All @@ -57,10 +57,13 @@ SalinityGL is licensed under the [MIT LICENSE](https://github.com/Zang3th/GameEn
- Normal mapping
- Water rendering
- Instanced rendering
- Flexible 2D particle system
- 2D particle system
- Smoke
- Cellular Automata System (very primitive)
- Grid-Rendering
- Dynamic texture subsampling
- Physics
- Cellular Automata System (very primitive)
- Eulerian Fluid Simulation
- File management
- Profiling
- Audio
Expand All @@ -80,7 +83,7 @@ Nature scene with water rendering, normal mapped objects, and a particle system

![CellSim](Res/Screenshots/CellSim/Screenshot_CS_011.png)

### Liquefied (in development)
### Liquefied

2D Eulerian Fluid Simulation on the CPU.

Expand All @@ -94,7 +97,7 @@ The engine and the demo applications are compiled separately. The engine is comp
### What you need

- Linux
- Tested with Ubuntu 16.04 - 22.04
- Tested with Ubuntu 16.04 - 24.04
- C++17 compiler
- Tested Clang and GCC
- CMake 3.20 or newer
Expand Down Expand Up @@ -131,8 +134,8 @@ The engine and the demo applications are compiled separately. The engine is comp

| **Version** | **Date** | **Commit** <br> [Count / ID] | **Lines of code** <br> [Apps / Engine] | **Notes** |
|:------------------------------------------------------------------:|:----------:|:----------------------------:|:--------------------------------------:|:---------------------------------------:|
| [0.1.1](https://github.com/Zang3th/GameEngine/releases/tag/v0.1.1) | 14.01.2023 | [255 / d425a33] | [480 / 4250] | Completion of the *GreenWorld* demo app |
| [0.1.0](https://github.com/Zang3th/GameEngine/releases/tag/v0.1.0) | 11.06.2022 | [229 / 218a55e] | [575 / 4110] | First official release |
| [0.1.1](https://github.com/Zang3th/SalinityGL/releases/tag/v0.1.1) | 14.01.2023 | [255 / d425a33] | [480 / 4250] | Completion of the *GreenWorld* demo app |
| [0.1.0](https://github.com/Zang3th/SalinityGL/releases/tag/v0.1.0) | 11.06.2022 | [229 / 218a55e] | [575 / 4110] | First official release |

- 07/2021 - 09/2021: Rewrite of the engine core
- 01/2020 - 09/2020: Some very early projects (still under Windows)
Expand All @@ -143,9 +146,7 @@ I always work *on and off* on this project, but I try to make more regular relea

### Release preview

- v0.2.0: Completion of the base foundation of the *Liquefied* app
- v0.2.1: Multithreading and visual improvements to the *Liquefied* app
- v0.2.2: Compute Shader implementation of the *Liquefied* app
- v0.2.1: Multithreading and Compute Shader implementation of the *Liquefied* app

### Backlog

Expand Down
Binary file removed Res/Assets/Textures/Liquefied/Test_1C_4Px.png
Binary file not shown.
Binary file removed Res/Assets/Textures/Liquefied/Test_2C_8Px.png
Binary file not shown.
Binary file removed Res/Assets/Textures/Liquefied/Turbine_768.png
Binary file not shown.
4 changes: 4 additions & 0 deletions Scripts/LoC.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

SCRIPT_DIR=$(dirname "$(realpath "$0")")
PROJECT_ROOT=$(realpath "$SCRIPT_DIR/..")
cd "$PROJECT_ROOT" || exit

loc_engine=$(find ./Engine -type f | xargs cat | wc -l)
echo "Lines in ./Engine: $loc_engine"
loc_apps=$(find ./Apps -type f | xargs cat | wc -l)
Expand Down

0 comments on commit 7bbc453

Please sign in to comment.