- Don’t block the user from moving her ship while she fires her laser at the space aliens
- Don’t redraw more of the screen than you have to when the aliens move
- Make sure the sounds start right away when the buttons are pushed
- It’s better to not have a bonus ship go across the screen if its presence makes the game laggy
I love XNA. Really I do. Not because I think writing games is the single most important activity on the planet — although maybe it is — but because I think it’s one of the most educational things a budding programmer can do.
Game development is a great exercise because, even with fancy graphics hardware and super-computer like CPU resources available, it’s so constrained. You always want to get the most out of that hardware because that’s what will make your game great. Real considerations like frame-rate, lag, available textures, are in your face and directly impact the users experience in comparatively easy to understand ways.
Everyone should write a (little) game at least once in their life and I wish more Computer Science students did just that.
Some people have to spend an entire career unlearning callously taught maxims like “You should just let the [compiler|hardware] guys do the optimization”, “Don’t worry about performance, the [.NET|Java] runtime takes care of that for you.”
If you’re in school now, trust me… It ain’t so.
Perhaps more than anything else I could possibly teach a CS student it would be not a datastructure, or a programming language but a basic understanding of the costs of low and medium level operations common in programming today. Maybe that’s why I’m so motivated to talk about performance signatures.