Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/im-rises/particlesystem
Particle system made in C++ with OpenGL
https://github.com/im-rises/particlesystem
cmake cpp engine game-development game-engine gamedev imgui opengl particle-system particles
Last synced: 2 months ago
JSON representation
Particle system made in C++ with OpenGL
- Host: GitHub
- URL: https://github.com/im-rises/particlesystem
- Owner: Im-Rises
- License: mit
- Created: 2022-11-02T19:20:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T21:49:21.000Z (4 months ago)
- Last Synced: 2024-10-11T22:55:17.651Z (3 months ago)
- Topics: cmake, cpp, engine, game-development, game-engine, gamedev, imgui, opengl, particle-system, particles
- Language: C++
- Homepage: https://im-rises.github.io/particle-system-webgl
- Size: 3.56 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ParticleSystem
## Description
This project is a particle system made in C++ using OpenGL and GLFW.
The UI is made using ImGui and allows you to modify some parameters of the particle system and the camera view.
This project has been ported to `WebGL` using `Emscripten`. You can find the source
code [here](https://github.com/Im-Rises/particle-system-webgl). The webgl version can be tested at the link below.## 🚀🚀[you can try the webgl build online by clicking here](https://im-rises.github.io/particle-system-webgl/) 🚀🚀
> **Note**
> This project was made as a learning exercise to learn some OpenGL features.## Features
- [x] Particle system
- [x] ImGui UI
- [x] Camera movement
- [x] Pausing the simulation
- [x] Different settings for the particle system
- [x] Different settings for the camera## Images and Videos
[![Watch the video](https://user-images.githubusercontent.com/59691442/216751976-c06c492d-5dfb-466c-afe9-ec44e94e5db9.png)](https://www.youtube.com/watch?v=h5X1RaElC7Y)
[![Watch the video](https://user-images.githubusercontent.com/59691442/216753254-f3315a71-f073-420e-b4e3-86a024913683.png)](https://www.youtube.com/watch?v=h5X1RaElC7Y)
Click on the images to watch the video.
## Dependencies
- C++ 14
- C++ compiler (MSVC, Mingw, ...)
- CMake
- Glad
- GLFW (3.3.8)
- OpenGl (3.3)
- Dear ImGui (1.88)
- glm (0.9.8.5)
- stb (2.28)## Table of Contents
1. [Description](#description)
2. [Features](#features)
3. [Images and Videos](#images-and-videos)
4. [Dependencies](#dependencies)
5. [Table of Contents](#table-of-contents)
6. [Project Architecture](#project-architecture)
7. [Quickstart](#quickstart)
1. [Windows](#windows)
2. [Linux](#linux)
3. [MacOs](#macos)
8. [Controls](#controls)
9. [Compilation](#compilation)
1. [Windows](#windows)
2. [Linux](#linux)
3. [MacOs](#macos)
10. [GitHub-Actions](#github-actions)
11. [Documentation](#documentation)
12. [Contributors](#contributors)## Project Architecture
Click to expand
~~~
ParticleSystem
├── .github
| ├── labels.yml
| ├── release.yml
│ ├── workflows
│ │ |── cmake.yml
│ │ |── codeql.yml
│ │ |── cpp-cmake-publish.yml
│ │ |── cpp-linter.yml
│ │ |── dependency-review.yml
│ │ |── flawfinder.yml
│ │ |── greetings.yml
│ │ |── label.yml
│ │ |── msvc.yml
│ │ |── stale.yml
├── dependencies
| ├── glad
| ├── glfw
| ├── glm
| ├── imgui
| ├── stb
├── ParticleSystem
| ├── Shader
│ │ |── *
| ├── Texture
│ │ |── *
| ├── Scene
│ │ |── *
| ├── CMakeLists.txt
| ├── InputManager.cpp
| ├── InputManager.h
| ├── main.cpp
| ├── ParticleSystemLauncher.cpp
| ├── ParticleSystemLauncher.h
├── .clang-format
├── .clang-tidy
├── .editorconfig
├── .gitattributes
├── .gitignore
├── CMakelists.txt
├── CMakePresets.json
├── CMakeSettings.json
├── imgui.ini
├── README.md
~~~## Quickstart
To download the app, you can click one of the icons below (depending on your operating system). You can also click the
release section of the GitHub page.Depending on you `operating system` you will need to install some libs, they are installed differently depending on your
system, please follow one of the section below `Windows` or `Linux` or `MacOs`.For the compilation, follow the section `Compilation`.
The controls are described in the section `Controls`.
> **Warning**
> Be sure to put the `imgui.ini` file in the same folder as the executable.
> You can find it in the `root` of the project. If you don't do this, the UI will not be displayed correctly.### Windows
For Windows users you don't need to install the libs. You can just download the app and run it.
```bash
.\ParticleSystem.exe
```### Linux
For Linux users, you need to install the GLFW lib, to do so type one of the following commands:
```bash
sudo apt-get install libglfw3
```or if you're a developer and want to compile the app, please install this version of GLFW:
```bash
sudo apt-get install libglfw3-dev
```Then you can start by double-clicking the executable of typing the following command next to it:
```bash
./ParticleSystem
```### MacOs
For macOS users you will need to install Brew, please follow the instruction in the link below:
Once it is installed, you can type the following command to install GLFW.
```bash
brew install glfw
```Then you can start by double-clicking the executable of typing the following command next to it:
```bash
./ParticleSystem
```## Controls
The speed and some parameters can be modified directly in the ImGui windows.
| Action | Key |
|---------------------|-------------------------------------|
| Translate camera | (WASD) or (↑ ← ↓ →) |
| Pause/Resume | P |
| Move up/down camera | (Space/Shift) or (Page up/down) |
| Rotate camera | Right Mouse Button + Mouse movement |
| Exit app | Escape |> **Note**
> You can the inputs by changing their attribution in the `InputManager.cpp` file,
> if so you'll need to compile the project.## Compilation
To compile the app, the first thing you need to do is install a C++ compiler:
- Visual Studio (MSVC)
- Mingw
- ...You also need to install Cmake:
Once your environment is set up, depending on your operating system you'll need to install some libs before compiling
the project. Refer to the section below `Windows` or `Linux` or `MacOs`.### Windows
Windows users can directly compile the project by typing the following command at the project root folder:
```bash
cmake -B . -DCMAKE_BUILD_TYPE=
```then
```bash
cmake --build . --config
```You need to replace `` by the build type you want to use.
> **Note**
> If you're using Visual Studio, you can install CMake directly from the IDE (Visual Studio Installer).
> Then you need to open the Project as a CMake Project, not a Visual Studio Project!> **Warning**
> The project is set up to be built using CMake and vc2019 for Windows. If you want to modify the
> compiler for vc2022 or other you will need to change the CMakeLists.txt .lib linking file accordingly to your vc20**
> version.### Linux
Linux's users need to install some libs before compiling the project:
First thing to do is to install CMake, type the following command to install it.
```bash
sudo apt-get install cmake
```You also need to install the GLFW lib. Type the following command at the project root.
```bash
sudo apt-get install libglfw3-dev
```You are now able to compile the project. Go to the project root and type the following command:
```bash
cmake -B . -DCMAKE_BUILD_TYPE=Release
```### MacOs
For macOS user, you should install brew package manager by following the instructions in the link below:
Then type the following command to install cmake:
```bash
brew install cmake
```and this one to install GLFW
```bash
brew install glfw
```You are now able to compile the project. Go to the project root and type the following command:
```bash
cmake -B . -DCMAKE_BUILD_TYPE=Release
```## Github-Actions
[![CodeQL](https://github.com/Im-Rises/ParticleSystem/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/Im-Rises/ParticleSystem/actions/workflows/codeql.yml)
[![CMake](https://github.com/Im-Rises/ParticleSystem/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/Im-Rises/ParticleSystem/actions/workflows/cmake.yml)
[![Cpp Cmake Publish](https://github.com/Im-Rises/ParticleSystem/actions/workflows/cpp-cmake-publish.yml/badge.svg?branch=main)](https://github.com/Im-Rises/ParticleSystem/actions/workflows/cpp-cmake-publish.yml)
[![flawfinder](https://github.com/Im-Rises/ParticleSystem/actions/workflows/flawfinder.yml/badge.svg?branch=main)](https://github.com/Im-Rises/ParticleSystem/actions/workflows/flawfinder.yml)
[![Microsoft C++ Code Analysis](https://github.com/Im-Rises/ParticleSystem/actions/workflows/msvc.yml/badge.svg?branch=main)](https://github.com/Im-Rises/ParticleSystem/actions/workflows/msvc.yml)
[![cpp-linter](https://github.com/Im-Rises/ParticleSystem/actions/workflows/cpp-linter.yml/badge.svg?branch=main)](https://github.com/Im-Rises/ParticleSystem/actions/workflows/cpp-linter.yml)The project is set with a set of different scripts:
- CodeQL: This script is used to check the code for security issues.
- CMake: This script is used to build the project.
- Cpp Cmake Publish: This script is used to publish the project on GitHub.
- Flawfinder: This script is used to check the code for security issues.
- Microsoft C++ Code Analysis: This script is used to check the code for security issues.
- Cpp Linter: This script is used to check the code for security issues.## Libraries
glfw:
glm:
glad:
stb (stb_image):
Dear imgui:
OpenGL:
## Documentation
learnopengl (OpenGL tutorial):
opengl-tutorial (OpenGL tutorial):
3dgep:
levelup (Particle Generation):
unrealistic.dev (Change CMake working directory):
## Contributors
Quentin MOREL:
- @Im-Rises
-[![GitHub contributors](https://contrib.rocks/image?repo=Im-Rises/ParticleSystem)](https://github.com/Im-Rises/ParticleSystem/graphs/contributors)