What should be the comments in the code...
Hi there,
I've read a cool code review of the game Doom for iPhone ported recently by John Carmack. During the reading of this beautiful article I thought 'what a nice commenting of the bottlenecks'. I think such a comments should be in the every part of the code, where you should think more than 30 seconds to understand. Example:
// JDC: E3M8 has a map error that has a couple lines that should // be part of sector 1 instead orphaned off in sector 2. I could // let the non-closed sector carving routine handle this, but it // would result in some pixel cracks. Instead, I merge the lines // to where they should have been. // This is probably not the right solution, because there are // probably a bunch of other cases in the >100 Id maps. extern int gameepisode, gamemap; if ( gameepisode == 3 && gamemap == 8 ) { void IR_MergeSectors( int fromSector, int intoSector ); IR_MergeSectors( 2, 1 ); }
Here is link: Doom Iphone code review
Have a nice reading!
Комментарии
Отправить комментарий