Portable architecture for magic-like effects in 2d games.