This is a small project that uses the SDL 2 library to display a window with particles that move around in different patterns. It is based on the example project from John Purcell's Cave of Programming C++ Begineer Course
In order to successfully compile and run this project, you will need to have the SDL 2 libraries on your system.
Install the libsdl2-2.0-0 and libsdl2-dev libraries.
MinGW with g++ compiler should be installed on your system.
Download the latest SDL2-devel-2.x.x-mingw from SDL's official page and uncompress on an easy access directory (such as C:\SDL, for example).
From the new directory (C:\SDL), there is a folder named with your desired architecture. Copy that folder's bin content onto your MinGW's bin folder, and the include folder's contents onto MinGW's include
Compile on Linux with g++ *.cpp `sdl2-config --cflags --libs`
Compile on Windows (using MinGW's g++ compiler and assuming SDL root is at C:\) with g++ *.cpp -IC:\SDL\include -LC:\SDL\i686-w64-mingw32\lib -w -Wl,-subsystem,windows -lmingw32 -lSDL2main -lSDL2
Run on a CLI with program arguments: mode number, anything (optional), anything (optional)
Running with no optional arguments it will just display the patterns, with one it will disable clear screen, and with two it will enable box blur
Modes are:
- 1: Flower pattern
- 2: Spiral
- 3: Rectangular explosion
- 4: Circular explosion
- 5: Circular implosion
For example: ./a.out 5 x x