Applying the Strategy Pattern

Let’s look at the following problem: We are designing a drawing application. We want some objects to be automatically scaled to fit inside parent objects. For example: when you make a page wider, images can decide to scale up (because there’s more space). Or if you make a parent box narrower image needs to scale down.

READ MORE...

Flexible particle system - Emitter and Generators

In our particle system we have already a basic foundation: the container and the framework. Now we need some modules that can actually wake particles. In this post I will describe the emitter module and generators. The Series Initial Particle Demo Introduction Particle Container 1 - problems Particle Container 2 - implementation Generators & Emitters (this post) Updaters Renderer Introduction to Optimization Tools Optimizations Code Optimizations Renderer Optimizations Summary Introduction Basic design:

READ MORE...