This topic requires more attention. Several areas are involved in this regard.
rendering
physics
collision
logic
Logic
Lets start with the logic part. Here we could implement a particle system that collects all particles, layer based, that are created by an emitter. A particle system can have multiple emitters of various type. An emitter needs to spawn(place particles in the particle system) material id based. A material id references a type of particle globally, so material ids need to be resolved at application start up, because particles could come from files already defined and others could be placed from within the application.
Material ID
The material id could be used in various ways among the areas of interest. It could be used for rendering or for collision resolve for choosing a new emitter based on the material ids interacting with each other during collision. Maybe also for using a different physics computation if necessary.
Rendering
The rendering should be independent from the particle system. So the mid is used to determine the type of rendering. A material could be rendered using a primitive rendering or a sprite rendering with animation.
Physics
With all particles placed in the particle system, physics could be done easily based on the stored buffer in the particle system where the physics solver performs its action per physics step.
Collision
Collision should be resolved each physics step in order to have precise collision response. How particles interact with the world upon collision in undetermined at the moment.
Totally over engineered.
This topic requires more attention. Several areas are involved in this regard.
Logic
Lets start with the logic part. Here we could implement a particle system that collects all particles, layer based, that are created by an emitter. A particle system can have multiple emitters of various type. An emitter needs to spawn(place particles in the particle system) material id based. A material id references a type of particle globally, so material ids need to be resolved at application start up, because particles could come from files already defined and others could be placed from within the application.
Material ID
The material id could be used in various ways among the areas of interest. It could be used for rendering or for collision resolve for choosing a new emitter based on the material ids interacting with each other during collision. Maybe also for using a different physics computation if necessary.
Rendering
The rendering should be independent from the particle system. So the mid is used to determine the type of rendering. A material could be rendered using a primitive rendering or a sprite rendering with animation.
Physics
With all particles placed in the particle system, physics could be done easily based on the stored buffer in the particle system where the physics solver performs its action per physics step.
Collision
Collision should be resolved each physics step in order to have precise collision response. How particles interact with the world upon collision in undetermined at the moment.