View Single Post
Flynn
Senior Member
Join Date: Sep 2009
Old 09-14-2009 , 16:59   Re: Set Player's max HP on spawn (TF2)
Reply With Quote #30

@narris

Touche on given point.

However (trying not to go off-topic too much, but that's not going to work ), game code has to be pretty efficient to run on most machines (the bigger the machine base, bigger potential income). No game would seriously be maintained after 20 years (although I've seen this county's finances running on DoS and a copy of excel for backup - not cool). And typically, said game would be worked upon by a team who have their own specific 'modules' to construct.

Once released it'd either be patched up for faults or a new one written. Games have a different requirement of code to say, a spreadsheet or database program. They don't have to render full blown graphics, they can afford some loss of efficiency.

Readability is a must yes, but you do not need to sacrifice efficiency to make it readable. Only 'idiomatic C' that is supposed to be the most efficient way is the most unreadable. But I consider that shaving off a hair in order to lose weight.

Ever had to write a well named, but super-lengthy g_pPlayerRemainingHealth[player] over a dozen times and you'll see why it gets shortened to 'i' or 'arr'.

Additional Edit: When you have a stupidly short deadline, suddenly comments take a lot less priority. I'd imagine if I did work on a team I'd change my approach to match.
Flynn is offline
Send a message via MSN to Flynn Send a message via Skype™ to Flynn