RTCW Study - Spreadscale (updated Feb 10, 2017)

Make sure to bring lots of med packs, our 64 player beach server is intense!

Moderators: RTCW Admins, Super Moderators, vB3 - Administrators

Posts: 9
Joined: Tue Jan 03, 2017 11:48 am

RTCW Study - Spreadscale (updated Feb 10, 2017)

Postby donka » Sun Jan 22, 2017 11:58 am

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. :ar15:

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.

RTCW Admin
User avatar
Posts: 249
Joined: Wed Aug 04, 2010 5:22 am
Location: Tampa, FL

Re: RTCW Study - Spreadscale

Postby EurO » Wed Jan 25, 2017 12:03 am

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!

Posts: 9
Joined: Tue Jan 03, 2017 11:48 am

Re: RTCW Study - Spreadscale

Postby donka » Fri Feb 03, 2017 10:29 am

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

Posts: 9
Joined: Tue Jan 03, 2017 11:48 am

Re: RTCW Study - Spreadscale

Postby donka » Fri Feb 03, 2017 10:45 am

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

RTCW Admin
Posts: 1234
Joined: Mon Feb 17, 2003 8:21 am
Location: State College, PA

Re: RTCW Study - Spreadscale

Postby MAN-AT-ARMS » Fri Feb 03, 2017 7:15 pm

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.

Posts: 9
Joined: Tue Jan 03, 2017 11:48 am

Re: RTCW Study - Spreadscale

Postby donka » Sat Feb 04, 2017 12:58 am

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.

Return to Return To Castle Wolfenstein

Who is online

Users browsing this forum: Bing [Bot] and 41 guests