I've just successfully finished my oral exam (damn that sounds dirty).
So my time as an apprentice is officially over, which means I have more time now to focus on my 2D engine.
In this post I want to show you how I implemented the particle system in my engine using the decorator pattern.
First some UML:

The most difficult thing was to cover all the things a particle system must do (e.g. transparency, spreading, collision detection, etc.).
To provide all those contingencies I decided to use the decorator pattern (I just read the book Head First Design Patterns (a really good book), so all that stuff was still in my mind ;) ).
The particle system runs pretty well, although some of the subsystems (especially the transparency) don't work as expected yet.
No comments:
Post a Comment