benreid24 / BLIB

Small organized collection of common code I have accumulated over the years that has amassed into a proper 2d game engine
1 stars 0 forks source link

Improve particle system #61

Closed benreid24 closed 2 months ago

benreid24 commented 3 years ago

Overview

Classes

ParticleManager: System for a single type of particle. Templated. Owns Emitters, Sinks, Affectors, and the particle storage ParticleSystem: Top level engine system. Owns all ParticleSystem instances Emitter: Template base class that creates particles Sink: Template base class that consumes particles. (Maybe combine with Affector?) Affector: Template base class that modifies particles. Can also erase them Renderer: Base class that creates required components, buffers, etc to enable rendering

Details

User Provided

The framework will be implemented in the engine, but the user will have to define many of the core components:

Rendering

With user provided ECS component, descriptor set (templated, fetches data from ECS component), and pipeline, rendering should be relatively simple. Just need to also provide a drawable component for the draw command. Will probably need to implement instanced rendering support, but that should be trivial if not already supported.