Commit graph

13280 commits

Author SHA1 Message Date
Eidolon
f0d7d8467f Refactor timing code even more
System layer is greatly simplified and framecap
logic has been moved internally. I_Sleep now
takes a sleep duration and I_SleepDuration
generically implements a precise sleep with spin
loop.
2022-05-01 00:32:46 -05:00
Eidolon
7d7564b7f9 Disable sprite offset interpolation (for now) 2022-04-30 21:56:42 -05:00
Eidolon
48d8c83540 Ensure view is not interpolated on first frame 2022-04-30 19:10:07 -05:00
Eidolon
c0865e4faa Ensure mobj interpolators reset on level load 2022-04-30 17:59:32 -05:00
Eidolon
e79654a33a Completely refactor timing system
Time is now tracked internally in the game using I_GetPreciseTime
and I_UpdateTime. I_Time now pulls from this internal timer. The
system code no longer needs to keep track of time itself.

This significantly improves frame and tic timing in interp mode,
resulting in a much smoother image with essentially no judder at
any framerate.
2022-04-30 16:33:23 -05:00
Eidolon
dcbe929baa Make renderisnewtic is false between tics
I know what I'm doing! I swear
2022-04-30 13:53:56 -05:00
Eidolon
a41d042812 Rename drawerlib deltaTime to getDeltaTime 2022-04-30 01:57:46 -05:00
Eidolon
82310e0ae2 Add Lua HUD drawlists
Buffers draw calls between tics to ensure hooks
run at the originally intended rate.
2022-04-30 01:55:10 -05:00
Eidolon
56261d3e1e Fix offset copies for SpawnMobjFromMobj
THANKS SAL
2022-04-29 17:19:09 -05:00
Eidolon
1259f1be40 Interpolate spritescale/offset x/y 2022-04-29 14:21:30 -05:00
Eidolon
8f43b5afd0 Fix Mario block item placement 2022-04-28 22:32:35 -05:00
Eidolon
42ebf163e6 Don't interpolate mobj state if frac = 1.0 2022-04-28 21:07:06 -05:00
Sally Coolatta
7c41564362 Fix multiplayer character select 2022-04-28 20:44:22 -05:00
Eidolon
5d4f7f2ad2 Copy interp state in P_SpawnMobjFromMobj 2022-04-28 20:39:37 -05:00
Eidolon
1aebf41e82 Interp shadow scales 2022-04-28 20:14:04 -05:00
Eidolon
687d98eb4a Fix interp scale crash for hires sprites 2022-04-28 20:07:07 -05:00
Eidolon
50b0c29db9 Disable angle interp on fresh mobjs 2022-04-28 18:46:02 -05:00
Eidolon
34eebcb4b8 Reset interp scale when Lua sets .scale 2022-04-28 18:36:10 -05:00
Eidolon
0f2e200fa1 Merge branch 'worms' into 'uncappedrevengeance'
Fix interp scaling crashing software

See merge request ShaderWraith/SRB2!2
2022-04-28 23:16:48 +00:00
katsy
5a7a63c2cc Fix interp scaling crashing software 2022-04-28 17:21:45 -05:00
Sally Coolatta
d2282c98cc Precalculate refresh rate
Slower PCs can have issue querying mode over and over. This might kinda suck for windowed mode if you have different refresh rate displays but oh well
2022-04-27 21:47:19 -05:00
Eidolon
51553e7f75 Interpolate mobj scale 2022-04-27 21:39:47 -05:00
Sally Coolatta
f6c1e49b27 Fix boss1 laser in interp 2022-04-27 21:07:55 -05:00
Sally Coolatta
71ee468bf3 Fix cutscenes in interp 2022-04-27 20:41:38 -05:00
Eidolon
813ed81a37 Reset old_z in MT_LOCKON think
Fixes interpolation artifacting due to spawn pos.
2022-04-27 19:52:11 -05:00
Sally Coolatta
f66cedf1fc Force interpolation when timescale != 1.0 2022-04-27 18:37:45 -05:00
Sally Coolatta
a76968c6d9 Enable timescale outside of DEVELOP builds
It has NETVAR, so it should be fine -- put an end to useful debugging features excluded in multiplayer!
2022-04-27 18:37:45 -05:00
Sally Coolatta
bb6d4d10b5 Add timescale cvar
Slow the game down to debug animations / interpolation problems! Speed it up if you need to get somewhere quickly while mapping!
2022-04-27 18:37:45 -05:00
Sally Coolatta
f2a19b29d9 Put interpdebug stuff in perfstats instead 2022-04-27 18:37:45 -05:00
Sally Coolatta
c83d1be21f Add interpdebug 2022-04-27 18:37:45 -05:00
Eidolon
0503c853cc Reset Metal fume interp state on appear 2022-04-27 18:19:00 -05:00
Eidolon
c3923adc3f Make Lua TeleportMove call MoveOrigin 2022-04-27 17:08:40 -05:00
Sally Coolatta
eb6b1f375a Allow dedicated to use precise sleep timing again
Instead of only using one old sleep, just enforce framerate cap to match TICRATE.
2022-04-27 16:33:05 -05:00
Sally Coolatta
c3340959de Fix I_FrameCapSleep not respecting cpusleep
Jonathan Joestar bruh
2022-04-27 16:26:41 -05:00
Sally Coolatta
9b4e485686 Fix frame pacing when game lags behind
The frame timestamp should've been made at the start of the frame, not the end.
2022-04-27 16:06:03 -05:00
Eidolon
833777d773 Revert "Remove unnecessary precipmobj thinker hack"
This reverts commit 0e38208620d19ec2ab690740438ac2fc7862a49e.
2022-04-26 20:56:36 -05:00
Eidolon
aec527cb4c Clamp cechotimer to 0
Fixes issues with cechos staying on-screen and glitching out
(NiGHTS items for example).
2022-04-26 20:56:35 -05:00
Eidolon
a4ea2c2708 Use old sleep in dedicated mode 2022-04-26 20:56:35 -05:00
Eidolon
c79df7d58e Interpolate afterimages further back 2022-04-26 20:56:35 -05:00
Eidolon
f418c6476f Add drawerlib deltaTime function 2022-04-26 20:56:35 -05:00
Eidolon
4095ef599b Delta time choose player menu animations 2022-04-26 20:56:35 -05:00
Monster Iestyn
d719e081dc Adjust 1up monitor icon z offsets
Fixes interpolation issues with 1up monitors.
2022-04-26 20:56:35 -05:00
Sally Coolatta
400c6e0891 Move intro ticking out of the drawer 2022-04-26 20:56:35 -05:00
Eidolon
9276637db0 Revert "Reset overlays interp states each TryRunTics"
This reverts commit a71a216faa20e8751b3bd0157354e8d748940c92.
2022-04-26 20:56:35 -05:00
Sally Coolatta
fa12c51fcf Fix a bunch of ticking in hu_ drawing functions 2022-04-26 20:56:35 -05:00
Sally Coolatta
48b3ea31c4 Bring back shadows on polyobjects
Also optimizes the method used so rings can show their shadows too. Using just the subsector is a tad bit imprecise admittedly but any more precise methods get really laggy.
2022-04-26 20:56:35 -05:00
Eidolon
8597f3876c Move intermission emerald bounce to ticker 2022-04-26 20:56:35 -05:00
Sally Coolatta
f34a61156c Papersprite angle interpolation
Makes the ending signpost smooth
2022-04-26 20:56:35 -05:00
Eidolon
7dd7cccd79 Use interp tracer pos for GL linkdraw 2022-04-26 20:56:34 -05:00
Sally Coolatta
f330374c1f Interpolate model interpolation (lol) 2022-04-26 20:56:34 -05:00