One of the biggest source of bugs in our apps is state: all of that persistent data we keep around in memory. When things change we need to make sure to update all of it at the right times and with the right new parts of the state that changed. Inevitably things get out of sync and our app is in “a bad state”. Today’s article discusses some ways we can prune the “graph” of objects that we create in OOP so that there’s less state to maintain. Read on for some interesting techniques that could help you prevent bugs!
Posts Tagged state
To draw with Flash Player 11’s Stage3D
API, you must set up the state of various GPU resources before finally calling drawTriangles
. Inevitably, you’ll end up calling drawTriangles
multiple times during a single frame to draw your characters, terrain, sky, and so forth. In between these calls you will change the GPU’s state by calling Context3D
‘s set*
functions. This article will show you which of these functions can literally cut your app’s performance in half.