Compass
Posted: Mon Oct 03, 2011 4:40 pm
Affects: Commands
Summary: A compass to find your way through the woods!
Suggestion: There are two ways to do this, either via command-line, or via GUI. The first would be a simple /compass command that would tell the player which direction they are facing. The second would be a rotating graphical compass that could be turned on/off via cgdraw command.
Implementation: Command-line: /compass queries players yaw direction and, based on the angle, feeds back something along the lines of /rpnotify <player> You are facing ^2North by North-West.
GUI: Same calculation of yawangle as above that sends an update based on a configureable server-side cvar once every X server frames, ideally on the 20th for one refresh per second. Fastest refresh could be set at a higher framecount to reduce packet size (and potential crashes/boots).
Of course, if this is all doable client-side then such crashes could be easily avoidable, and end up being a very smooth compass.
Role-play wise, due to the client-only reporting of direction, it could be played out manually (/me looks down to check the compass on his datapad), or more subtly for characters with a good sense of direction and navigation.
References: RPMod documentation.
Summary: A compass to find your way through the woods!
Suggestion: There are two ways to do this, either via command-line, or via GUI. The first would be a simple /compass command that would tell the player which direction they are facing. The second would be a rotating graphical compass that could be turned on/off via cgdraw command.
Implementation: Command-line: /compass queries players yaw direction and, based on the angle, feeds back something along the lines of /rpnotify <player> You are facing ^2North by North-West.
GUI: Same calculation of yawangle as above that sends an update based on a configureable server-side cvar once every X server frames, ideally on the 20th for one refresh per second. Fastest refresh could be set at a higher framecount to reduce packet size (and potential crashes/boots).
Of course, if this is all doable client-side then such crashes could be easily avoidable, and end up being a very smooth compass.
Role-play wise, due to the client-only reporting of direction, it could be played out manually (/me looks down to check the compass on his datapad), or more subtly for characters with a good sense of direction and navigation.
References: RPMod documentation.