Component-based 2d engine