I've been writing a collaborative (non-gaming) project with a colleague for about two years now, and while we agree on some things, we definitely have a clash on coding styles. I would typically write variable names perhaps 5 - 10 characters (and include a small comment descriptor explaining exactly what it is) whereas he would write the longer 'sentences' explaining what is what. So for example, I would write the following :
int i; // Loop counter over all particles int Npart = 16; // No. of gas particles in loop float rpart[3]; // Position of current particle in loop // Compute forces for all particles for (i=0; i<Npart; i++) { rpart[0] = ... ... }
whereas he would write something like
int number_of_particles = 16; // Compute forces on all particles for (int iparticle=0; iparticle<number_of_particles; iparticle++) { float position_of_current_particle[3]; position_of_current_particle[0] = ... ... }
The big problem I have with the long 'sentence' style names is that even small trivial parts of code (e.g. adding two variables together in a third summation variable) suddenly become way too long to read comfortably and I simply can't glance over the code to get an overview of what is happening because I can't even see where the variables begin and end easily (maybe using camelCase here would be help instead of snake_case??). So I end up going through some parts of his code and 'trimming' the variable names down to size so it's not so verbose. Another aspect of it that we disagree is that I declare all my variables either at the top of the subroutine (with a comment next to it) or at the beginning of the current code block (e.g. if/else or for loop) whereas he declares all variables inline just before he needs them. I guess if the code is 'self-documenting', it doesn't really matter where they are declared, but I am a bit of a neat-freak when it comes to coding so like to keep things together :-)
I prefer his version. And for the reason you said (where variables begin or end) I use CamelCase, and I always separate most operators with spaces on both sides.
CurrParticlePos[ i ] = PrevParticlePos[ i ] + WhateverElse[ ( i + 1 ) * 3 ]; // maybe no spaces around the [ operator I honestly can't remember...
I also avoid using too long formulas, I make temporary variables instead.
I also use some abbreviations, most of them are obvious for me, a habit I can change if I even have to. For example Prev, Curr, Pos, Accel, Init. Most of them is whitspread I think, but maybe I also have some specific ones too.