aconstlink / natus

[Discontinued] Software Framework for Audio/Visual/Interactive Real-Time Applications
https://aconstlink.de
MIT License
0 stars 0 forks source link

Particle System #257

Closed aconstlink closed 3 years ago

aconstlink commented 3 years ago

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.