| |
|
|
||||
![]() |
||||||
| |
|
|||||
|
What
Your Mother Never Told You Over-general Designs In game
programming, you almost never get handed a complete set of requirements.
One way of dealing with this is to attempt to write a very general system
that will cope with a very wide range of needs. Though lecturers are very
fond of such top-down, abstract systems as examples, I've found that the
design of the system has to be aware of the specifics of how it will be
used, or the code that relies on it ends up working around the system
rather than being helped by it. The heart of the problem is that there's
always a choice of which abstractions best model the problem, and until
you know the problem well, picking the right abstractions is impossible. "Keep It Simple, Stupid!" The real competition in games these days is no longer in the graphical technology, but in the content. To give the artists and designers as much time as possible to get all that great content in, we need to get a version of the game they can use very early on in the project. This kind of rapid development isn't common in games; in the past the priority has been on writing extremely efficient code, with the time taken to write it not as important. Now the emphasis is increasingly on getting something working at all, and then worrying about efficiency where it's important. This doesn't mean you can be careless writing code, of course, just that the varying times that different ways of coding something would take are now much more important than in the past. It's hard to adjust to writing very naïve code where needed when every instinct is to always have efficiency as your highest priority. Premature
Optimization Is the Root of All Evil Lying
Comments Conclusion I've tried to apply the optimization mantra to my coding process and look at what problems consume most of my coding time. They are pretty mundane, even obvious, but if I can save even a little time by focusing on them, it'll mean we can get the game out faster. I know this is a bit of a pipe dream, but have you ever thought how nice it would be to actually implement something from the "if we have time" wish list? As long as I'm bugged by how much cooler the games I've worked on could have been if we'd only had a little more time, I'll keep trying to figure out how to improve my coding. Resources Web Sites http://www.refactoring.com has lots more ideas on how to rescue code that's in trouble. http://www.extremeprogramming.org details an interesting approach to software design that's refreshingly grounded in practice. Will give you lots of ideas you can try adding to your current process. http://www.muckyfoot.com/downloads/tom.shtml has an excellent presentation from the Windows Game Developer Conference that takes a level-headed look at the emerging technology of subdivision surfaces and how they can actually be used to improve games. http://mindprod.com/unmain.html is both a very funny and a very scary guide to writing unmaintainable code Books Gamma, Erich, and others. Design Patterns. Reading, Mass.: Addison-Wesley, 1995 (ISBN 0201633612). Lakos, John S. Large-scale C++ Software Design. Reading, Mass.: Addison-Wesley, 1996 (ISBN 0201633620). McConnell, Steve C. Code Complete: A Practical Handbook of Software Construction. Redmond, Wash.: Microsoft Press, 1993 (ISBN 1556154844). McConnell, Steve C. Rapid Development: Taming Wild Software Schedules. Redmond, Wash.: Microsoft Press, 1996 (ISBN 1556159005). McConnell, Steve C. Software Project Survival Guide. Redmond, Wash.: Microsoft Press, 1997 (ISBN 1572316217). McConnell, Steve C. After the Gold Rush: Creating a True Profession of Software Engineering. Redmond, Wash.: Microsoft Press, 1997 (ISBN 0735608776). Meyers, Scott. More Effective C++: 35 New Ways to Improve Your Programs and Designs. Reading, Mass.: Addison-Wesley, 1995 (ISBN: 020163371X). Sutter,
Herb. Exceptional C++: 47 Engineering Puzzles, Programming Problems, and
Solutions. Reading, Mass.: Addison-Wesley, 1999 (ISBN: 0201615622). Discuss this article in Gamasutra's discussion forums ________________________________________________________
|
||||||||||||||||
|
|