DESTINY 1

Compared with Destiny 2 PC

Destiny 1 is a console build. It has no frame rate setting, no vsync choice, no mouse or keyboard, no resolution change and no field-of-view setting. The Destiny 2 PC build, 86657, has all of them, built on the same engine. This page lists what Destiny 2 PC does for each feature and what the Destiny 1 code has in its place.

Frame pacing

Both games use the same time control engine. See Time and frame pacing for Destiny 1’s. Destiny 2 PC changes four things:

  • The config comes from the display refresh rate, vsync and the frame cap, not a fixed 30 Hz. It is rebuilt when a setting changes.
  • Mode 3, capped, drops the vblank phase. The frame interval is 1000 / cap, in ms.
  • A variable-step flag is on for clients. Each frame runs one update, with the smoothed real frame time as its time step.
  • In the background the game is held to 30 frames a second, with a lower cap.
stepDestiny 2 PCDestiny 1 PS4
configbuilt from the display settingsliterals, built once
rebuild on a setting changeyesnone
clockthe performance counter, in msthe time stamp counter
frame record64 bytes; frame time clamped to 10 s; an average weighted 0.95 / 0.0556 bytes
fixed-clock byte11
variable stepon for clients; the time step is a 120-frame average of min(real dt, 1 / max(10, rate))absent; the time step is fixed

Destiny 2 PC has no render interpolation: its frame record holds no blend factor between two ticks. That rests on absence and is unverified.

Destiny 2 can use a variable step because it counts gameplay time in seconds. Destiny 1 counts it in ticks, so the same change would speed up every timer. See Gameplay time is counted in ticks.

Vsync and presenting

stepDestiny 2 PCDestiny 1 PS4
video settings36 settings, among them vsync_mode 0 to 5 (default 1), window_mode 0 to 3 (default 3) and framerate_cap 30 to 10,000 (default 200)none
presentsync interval 0 with vsync off, else 1 to 4; no tearing flag; runs on the window threada flip from the GPU submission thread
frame latency1; 2 or more in window mode 3the engine stays at most one flip ahead of the GPU
resizeResizeBuffers with one buffer; the game handles Alt+Enter itselfnone

Destiny 1 sets the flip rate to 1 at device start-up. Each flip sets it again from a device field. The writer of that field was not traced.

Without the tearing flag, variable refresh rate works on Destiny 2 PC only in exclusive fullscreen. That is unverified.

Mouse and keyboard

stepDestiny 2 PCDestiny 1 PS4
raw inputa hidden window, Tiger Input Window, takes raw input even without focusno keyboard or mouse library
mouse samplefilled each framethe same slot exists and is cleared each frame, but nothing fills it
device updateone 944-byte double buffer for pads, keyboard and mousea double buffer, pads only
mouse getterpresentpresent, with four callers
PC gatenoneat least one caller takes the mouse path only when a stub returns true; the stub always returns false
keyboarda key message queue plus a poll of 105 keysnot found
cursorclipped while the game has focus and captures itnone

The mouse sample has the same layout in both:

offsetfield
+0x00x movement
+0x04y movement
+0x08wheel, in steps of 120
+0x30held-frame counts for 5 buttons

So Destiny 1 still carries the data path for a mouse. Only the input source is missing.

Resolution

stepDestiny 2 PCDestiny 1 PS4
display modeapplied from the settings, with a mode switchfixed
render targetsall released and rebuilt on a changebuilt once at device start-up
render target sizessize classes from full size down to 1/40, a class 360 high, and a class clamped to 1920 x 1080not compared
render resolutiona percentage, 25 to 200clamped to 320 to 1920 wide and 240 to 1080 high

Destiny 2 PC imports no DPI-awareness call. That is unverified.

Field of view

stepDestiny 2 PCDestiny 1 PS4
default field of viewclamped to 1 to 150 degrees, fallback 1.3439 radiansa matching function exists; the pairing rests on one read
aspect fitHor+: the horizontal field of view is set for 16:9, turned into a vertical one, then back into a horizontal one for the real aspectVert-: the vertical field of view is computed from the horizontal one at the real aspect
field-of-view settingfov_adjustment_offset, 55 to 105, default 85none

Destiny 1 is Vert-. A screen wider than 16:9 keeps its horizontal view and loses vertical view. The lens flares and four other functions also read the aspect ratio.

Other PC features

  • Settings are saved as cvars.xml in AppData\Roaming\Bungie\DestinyPC\prefs.
  • The game takes over Alt+Enter and the Windows key. It also has a keyboard hook, not read.

Not checked

  • Destiny 2 PC: the pump loop body, the window procedure, swap-chain creation, the consumer of the field-of-view setting, gamepad code, key binding consumers, and interpolation outside time control.
  • Destiny 1: the action layer behind input, two of the mouse getter’s callers, the render target rebuild and free paths, the writer of the flip rate field, whether the input block holds a keyboard array, and the UI canvas and letterbox.
  • The Destiny 1 Xbox input and present paths.