RTCW Study - Spreadscale (updated Feb 10, 2017)
Moderators: RTCW Admins, Super Moderators, vB3 - Administrators
6 posts
• Page 1 of 1
RTCW Study - Spreadscale (updated Feb 10, 2017)
Hi guys,
I've got hooked on browsing RTCW source code and decided to make a video about the nitty-gritty details that shape the game. I decided to start with the mechanisms that controls spreadscale (recoil) of RTCW guns.
In this video I experiment with shooting guns while trying to explain what makes them shoot more or less accurate. I think it's a great overview for experienced players the sake of completing the puzzles and should be pretty educational for others. Either way I invite the discussion!
https://www.youtube.com/watch?v=gSAL7SE9PWA&hd=1
EDIT: follow-up video
https://www.youtube.com/watch?v=ItxRP5uRHso&hd=1
I've got hooked on browsing RTCW source code and decided to make a video about the nitty-gritty details that shape the game. I decided to start with the mechanisms that controls spreadscale (recoil) of RTCW guns.

In this video I experiment with shooting guns while trying to explain what makes them shoot more or less accurate. I think it's a great overview for experienced players the sake of completing the puzzles and should be pretty educational for others. Either way I invite the discussion!
https://www.youtube.com/watch?v=gSAL7SE9PWA&hd=1
EDIT: follow-up video
https://www.youtube.com/watch?v=ItxRP5uRHso&hd=1
Last edited by donka on Fri Feb 10, 2017 11:03 am, edited 1 time in total.
Re: RTCW Study - Spreadscale
Good narrative and I like all your HUD mods :) - Is it true though, that a gun's spread and affect on hitboxes is exactly represented in something as transient as a bullet mark on the wall? I kind of thought they were more for graphical effect, and were largely an approximation of where a "bullet" is going after it leaves the "gun". Good video - where are you from? You write English well, also!
Re: RTCW Study - Spreadscale
Thanks Euro,
I'm pretty sure the bullet mark is exact representation where bullet hit the wall. The origin and direction are passed into function below and the hit plain is calculated
This is the function call
CG_ImpactMark( mark, origin, dir, random() * 360, 1,1,1,1, alphaFade, radius, qfalse, INT_MAX );
Here's the function itself. Pretty cumbersome.
https://github.com/iortcw/iortcw/blob/6 ... cg_marks.c
I'm pretty sure the bullet mark is exact representation where bullet hit the wall. The origin and direction are passed into function below and the hit plain is calculated
This is the function call
CG_ImpactMark( mark, origin, dir, random() * 360, 1,1,1,1, alphaFade, radius, qfalse, INT_MAX );
Here's the function itself. Pretty cumbersome.
https://github.com/iortcw/iortcw/blob/6 ... cg_marks.c
Re: RTCW Study - Spreadscale
MAN-AT_ARMS
How would you interpret this code about adding spreadscale? Is it multiplied by 3 when person moves or always?
pm->ps->aimSpreadScaleFloat += 3.0 * aimSpreadScaleAdd;
https://github.com/iortcw/iortcw/blob/9 ... bg_pmove.c
How would you interpret this code about adding spreadscale? Is it multiplied by 3 when person moves or always?
pm->ps->aimSpreadScaleFloat += 3.0 * aimSpreadScaleAdd;
https://github.com/iortcw/iortcw/blob/9 ... bg_pmove.c
- MAN-AT-ARMS
- RTCW Admin
- Posts: 1234
- Joined: Mon Feb 17, 2003 8:21 am
- Location: State College, PA
Re: RTCW Study - Spreadscale
Always.
Basically it boils down like this:
The spread increases for MGs as fire is held down whether you are moving or not. The amount of initial spread is random. Subsequent shots spreads are also random but are scaled based on I guess what you can call weapon heat. The longer fire is held the more the spread is increased. The spread scale is decreased over time of no fire. Crouching cuts this spread scaling in half.
The spread for other guns is not randomized nor is it increased or decreased over time.
Spread is not affected by walking or jumping...just by mouse movement (viewangle) which is why limiting the mouse movement by cvar or otherwise makes shots more accurate. Mouse movement affects the spread of all weapons.
Basically it boils down like this:
The spread increases for MGs as fire is held down whether you are moving or not. The amount of initial spread is random. Subsequent shots spreads are also random but are scaled based on I guess what you can call weapon heat. The longer fire is held the more the spread is increased. The spread scale is decreased over time of no fire. Crouching cuts this spread scaling in half.
The spread for other guns is not randomized nor is it increased or decreased over time.
Spread is not affected by walking or jumping...just by mouse movement (viewangle) which is why limiting the mouse movement by cvar or otherwise makes shots more accurate. Mouse movement affects the spread of all weapons.
Re: RTCW Study - Spreadscale
MAN-AT-ARMS wrote:
Basically it boils down like this...
Yea that's pretty much all i found in the video. I didnt notice where initial spread was multiplied by 3, which ends up to be in 45-72 range, still only 1/8th of mp40 full spread and 1/5th of sten.
6 posts
• Page 1 of 1
Return to Return To Castle Wolfenstein
Who is online
Users browsing this forum: No registered users and 1 guest