I had the task to implement the particle effects system for my team's game project. Initially, the particle effects were relatively simple to create but was difficult to put into our game's engine. The particle system's renderer was separated from the engine's renderer, but it needed the ID3D11Device and ID3D11DeviceContext to render properly. The particle system needed access to those, so I had to put it in the engine. After putting it in the engine, I realized that the gameplay side needed to trigger the particles.
The way to fix this was pretty simple. It involved a way to activate the particles indirectly from the gameplay side. Our team chose to do this by using an event system that triggered the particles with an event. The event system turned out not to be a cure-all for the problems with the particles. The other things that needed to be corrected were the positions of the particle emitters and the current camera position. The positions were added to the event system's parameters and the camera position was updated and added to the particles every frame. With those fixes, we were able to attach particles to anything in the game that we wanted.
Taylor Addington
Top comments (0)