Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wait... why wasn't the sprite responsible for rendering itself from the beginning?

  sprite.render(context);
or some such...


Because that's roughly the worst way to render sprites, in terms of performance :)

You want sprites to be an array, and render that in one go.


ssssshhhhhhh

(contrived example for making a point... visiting a draw() method with a solid renderer interface is the answer we usually use)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: