Skip to content

C++ particle simulation using SFML, capable of creating effects particle-based motion influenced by gravity and wind.

License

Notifications You must be signed in to change notification settings

g-brrzzn/ParticleFX-SFML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒจ๏ธ ParticleFX-SFML

A C++ particle simulation using SFML, capable of creating effects like snow, rain, lasers, or any particle-based motion influenced by gravity and wind. Each particle has a unique base speed, adding depth and immersion to the simulation.

๐ŸŽฅ Demonstration

FallCpp.Demo.mp4

๐Ÿ“ฆ Installation

  1. Download and extract SFML

    • Download the SFML SDK (ZIP file) from SFML Download Page
    • Extract it to your preferred location (e.g., D:\libs\SFML-3.0.0)
  2. Configure Visual Studio
    In Project's properties, update the following paths:

    • C/C++ > General > Additional Include Directories โ†’ "<sfml-install-path>/include"
    • Linker > General > Additional Library Directories โ†’ "<sfml-install-path>/lib"
    • Linker > Input > Additional Dependencies โ†’ Add "sfml-graphics.lib", "sfml-window.lib", "sfml-system.lib"
  3. Need help setting up SFML?
    Check out my SFML Visual Studio Template for a preconfigured project: SFML-VS-Template

๐Ÿš€ Usage

  • Modify the simulation parameters for different effects.
  • Adjust gravity (affects Y-axis) and wind (affects X-axis) to create various particle behaviors.
  • Change the RGB color of particles to customize their appearance.
Key Action
Y Increase particle density (+100)
T Decrease particle density (-100)
H Increase gravity (+3.0)
G Decrease gravity (-3.0)
N Increase wind (+3.0)
B Decrease wind (-3.0)
O Activate Snow Mode preset (light gray particles, moderate wind & gravity)
K Activate Rain Mode preset (blue particles, stronger gravity, negative wind)
M Activate Laser Mode preset (red particles, negative gravity, no wind)

๐Ÿ› ๏ธ Requirements

  • C++17
  • SFML 3.0+
  • Visual Studio

About

C++ particle simulation using SFML, capable of creating effects particle-based motion influenced by gravity and wind.

Topics

Resources

License

Stars

Watchers

Forks

Languages