-
Notifications
You must be signed in to change notification settings - Fork 2
Introduction
The Particle Fire Simulation Revision is a program that displays colorful display of fire particles upon launch. Users can change the display resolution, limit the frames per second, change the number of particles on the screen and set how fast they change Red, Green, Blue (RGB) -color channel’s value, for more information about usage see Installation and usage-page and to see how the program looks, there is also screenshots of the program made available.
Most of the program was written on the C++ Tutorial for Complete Beginners course on a section called Developing a Program: the Particle Fire Simulation. Section featured 17 lectures ranging from 5 to 30 minutes, where the lecturer went through how to use C++ libraries, in this case Simple DirectMedia Layer, creating a basic program that shows pixels on the screen using that library, creating particles, setting pixel color values on the screen etc. Lecture also included how to make the program object oriented and several algorithms such as blurring the screen using technique called box blur and setting the particles on the screen using Cartesian coordinate system.
Most of the program was written on Debian Linux-operating system through VirtualBox using Brackets as code editor and gcc as compiler. For better understanding of the setup, please read this blog post. When the program was ready it was transferred to Windows-operating system, where Visual Studio was used to edit, test and optimize the code more. First goal was to make the code as readable as possible so user and for that Google C++ Style Guide for the most part. Although not used 100 % through the project, since there are some cases where, because of the scope of the program, it is was clearer to use what C++ Tutorial for Complete Beginners course taught to use. To be more understandable extra effort was made to make sure that the code is well commented.
During the course it was also noticeable that the program was not as well optimized as possible and so, the second goal after understandable code, was to make the program perform much faster. Code optimization sources such as Wikibook on optimizing was used. Third goal is to learn more and that is the reason why this project was uploaded to GitHub for everyone to see, thus any feedback is more than welcome. Please leave a issue if there is something missing or if something could be done better. Fourth and last object was to made good documentation of the program, making sure that everybody can understand what is going on.