Modify the client side POV movement prediction to a more generic scheme, add several modes. Short of moving the gi.Pmove code into a client side DLL, this is the only way to overcome certain limitations that various mods are facing.
Benefits:
Implementation of forces and effects, movements, power ups and modes exploiting full 6 DoF, better and different underwater movement, inventive new physics simulations would be possible.
Despite appearances, Q2 is not a full 3D game. It makes various simplifications based on the assumption that player and entity movement is basically restricted to a 2D XY plane projection, and that UP vector orientation corresponds with the Z axis.
This bias originates from DOOM, and was expressed e.g. in the John Romero statement "Quake has gravity - down is down".
In consequence, certain mods, e.g. 6 DoF zero gravity games (Descent-like) are not possible without shutting down the client side prediction. As the per refresh frame processing of user input for movement/rotation is done within this gi.Pmove mechanism, this procssing is also lost, and has to be blocked.
Benefits are a learning experience for Trinity, forcing id to remove the old bias. It also opens the door for various ambitious mods that rely, one way or the other, on changing the definition and behavior of gravity.
Problems:
We might fail to forsee the various modes needed for a given mod. This solution is more involved, and less flexible than alternatives (see below).
Feasibility:
From the original exchange with John Carmack:
We can expand client side parameters reasonably easily.
Implementation:
Requires rewrite the gi.Pmove and the related parts of the DLL. While the former has a limited scope, the replacement of Z equals down could draw some sweat. The latter is required because of the interaction of gi.Pmove with the player state as used in the DLL.
It should be noted that any mod taking full advantage of this will have to make a lot of more or less subtle fixes on the monster movement/AI/collision response/ on ground detection/muzzle flash offset handling/ rotation and orientation code/physics of friction, gravity/implementation of Floaters/Flyers ... etc.. The same bias (Z assumption) present in the gi.Pmove implementation will be find in all those places.
short position[3]; short velocity[3]; short accel[3]; short orientation[4]; // quaternion short angular_vel[4]; short angular_acc[4];
short mass; // scales forces to acceleration short inertia; // scales momentums to angular acc. short force[3]; // current forces short momentum[4]; // current momentumThis covers basic physics while still making simplifications. E.g. inertia against rotation is axis independend here. No separation of velocity dependend forces (friction) is done. Also, surface as opposed to air friction has to be sorted out on the server into forces and momentums (no separation of contact vs. non contact forces). This requires that jump is executed by the server and not predicted by the client.
moveleft/moveright movedown/moveup forward/back lookdown/lookup left/rightshould be modified to scale with mass/inertia properly. Basically, user inputs exert up to a maximum force on the player avatar, which moves/rotates accordingly.
roll_cw/roll_ccw
PM_NORMAL PM_SPECTATOR PM_DEAD PM_GIB PM_FREEZEThe most important change is to PM_NORMAL. Currently, this is fixed to a player orientation along Z/gravity pointing down along Z. Instead, it should take into account the current force affecting the player. That means that movement (forward/back, left/right) is not done in XY plane by default, but on the plane the current force points at. The server has to set PMF_ON_GROUND accordingly - ground is not the XY plane by default.
View angle changes (looking up/down, left/right) again have to be interpreted with respect to the plane the force points to (left/right) and the current orientation (up/down).
PMF_DUCKED PMF_JUMP_HELD PMF_ON_GROUND PMF_TIME_WATERJUMP PMF_TIME_LAND PMF_TIME_TELEPORT PMF_TIME_TUBMLE PMF_NO_PREDICTIONIf a player is subject to a momentum, or rotated away from the default orientation (which is always along the current acting force), the normal interpretation of movement/look commands might not make sense. If the player is head over heels (or flat on his back), movement should be ignored.
PM_FREEIn this mode, the force is ignored, and all movement and rotation is interpreted relative to the view coordinate system, instead of a mix of world and view coordinates. This mode is most suitable for Descent-like free movement in space, even in the presence of forces and ballistics.
short max_forwardspeed; short max_sidespeed;The same holds for constraints on angular velocity, forces, etc. The idea is to have all parameters used by the client side prediction under server control during the game, for runtime changes and client specific settings that can not be overridden w/o server consent.
Related Proposals:
Entity extrapolation is the flip side of client side prediction. It makes no sense to have the POV more right, only to have the entities be interpolated in various invalid ways.
This proposal does compete with a Client Side DLL, in which gi.Pmove could be exposed and modified as needed. The latter is the most flexible solution, at the cost of added complexity.
The parameter/constraint addition is a response to the MaxSpeed proposal, which gives an excellent example of the gameplay/gamedesign restrictions resulting from client side prediction.
Submitted 980321, revised 980406, revised 980420, revised 980504, comments to bk@gamers.org.