Simple particle simulation made in C++ with SDL2
Including quad-tree optimalization and realistic energy transfer simulation
Report Bug
·
Request Feature
preview.mp4
- Use
W,S,AandDto move around - Use
QandEto zoom in and out - Hold
LSHIFTto speed up the movement and zooming - Drag
LMBto place an accelerated particle - Hold
Fto spawn particles at cursor - Use
SCROLLWHEELto increase/decrease the amount of spawned particles - Press
SPACEBARto pause/resume simulation - Press
F11to toggle Fullscreen - While the simulation is paused, press
Zto show debug properties of particles within the hovered quadrant
- Prerequisites
- Git
- CMake
- Build Tools for Visual Studio 2022 (Desktop development with C++)
- NASM
- Perl
- Make sure Git, CMake, NASM and Perl are included in your system's
PATHenvironmental variable
- Clone this repository
git clone https://github.com/Avi225/particle_simulation
- Enter the cloned repository
cd particle_simulation
- Create a build folder
mkdir build
- Enter the build folder
cd build
- Run CMake configuration
cmake -G "Visual Studio 17 2022" ..
- Build the project
cmake --build . --config Release
- The executable is located in
build/Release - Copy the
resdirectory into the executable directory - You may need to copy the required SDL3 DLLs into the executable directory, these should be located at:
SDL3.dll-build/_deps/sdl3-build/ReleaseSDL3_ttf.dll-build/_deps/sdl_ttf-build/ReleaseSDL3_image.dll-build/_deps/sdl_image-build/Release
If you got stuck at any point building the software, encountered a bug or have any other questions feel free to open a Github issue or send me a message.
- Unified logging ✓
- Better comments
- New control scheme
- Expanded GUI system
- Obstacle implementation
- Optimalization
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
