Skip to content

Avi225/particle_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Particle Simulation

Simple particle simulation made in C++ with SDL2
Including quad-tree optimalization and realistic energy transfer simulation
Report Bug · Request Feature

preview.mp4

Instructions

  • Use W, S, A and D to move around
  • Use Q and E to zoom in and out
  • Hold LSHIFT to speed up the movement and zooming
  • Drag LMB to place an accelerated particle
  • Hold F to spawn particles at cursor
  • Use SCROLLWHEEL to increase/decrease the amount of spawned particles
  • Press SPACEBAR to pause/resume simulation
  • Press F11 to toggle Fullscreen
  • While the simulation is paused, press Z to show debug properties of particles within the hovered quadrant

Building

On Windows

  1. Prerequisites
  2. Clone this repository
    • git clone https://github.com/Avi225/particle_simulation
  3. Enter the cloned repository
    • cd particle_simulation
  4. Create a build folder
    • mkdir build
  5. Enter the build folder
    • cd build
  6. Run CMake configuration
    • cmake -G "Visual Studio 17 2022" ..
  7. Build the project
    • cmake --build . --config Release
  8. The executable is located in build/Release
  9. Copy the res directory into the executable directory
  10. You may need to copy the required SDL3 DLLs into the executable directory, these should be located at:
    • SDL3.dll - build/_deps/sdl3-build/Release
    • SDL3_ttf.dll - build/_deps/sdl_ttf-build/Release
    • SDL3_image.dll - build/_deps/sdl_image-build/Release

Support

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.

Goals for v0.3.0

  • Unified logging ✓
  • Better comments
  • New control scheme

Goals for future releases

  • Expanded GUI system
  • Obstacle implementation
  • Optimalization

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

A simple particle simulation made in C++ with SDL2

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors