I came across this article today Dodgy Coder – Coding tricks of game developers.
Some of the things mentioned are genius like number 6. You wouldn’t like me when I’m angry – Nick Waanders
The solution took maybe an hour. A fellow programmer took four pictures of my face — one really happy, one normal, one a bit angry, and one where I am pulling my hair out. I put this image in the corner of the screen, and it was linked to the frame rate. If the game ran at over 30fps, I was really happy, if it ran below 20, I was angry.
After this change, the whole FPS issue transformed from, “Ah, the programmers will fix it.” to, “Hmm, if I put this model in, Nick is going to be angry! I’d better optimize this a little first.”
Others are scary and I would hope no sane developer would even attempt it like 1. The programming antihero – Noel Llopis
he explained to me that he had put aside those two megabytes of memory early in the development cycle. He knew from experience that it was always impossible to cut content down to memory budgets, and that many projects had come close to failing because of it. So now, as a regular practice, he always put aside a nice block of memory to free up when it’s really needed.
But my personal favourite is 4. Collateral damage – Jim Van Verth (@cthulhim)
Because the camera was using velocity and acceleration and was collidable, I derived it from our PhysicalObject class, which had those characteristics. It also had another characteristic: PhysicalObjects could take damage. The air strikes did enough damage in a large enough radius that they were quite literally “killing” the camera.
Check out the article Dodgy Coder – Coding tricks of game developers and also The Promise of HTML5 which shows some of the awesome abilities of the HTML5 Canvas element with WebGL.