Commit graph

237 commits

Author SHA1 Message Date
toaster
2bab452268 Add R_RelativeTeleportViewInterpolation
Adjusts pview_old for relative teleport to attempt a contigious motion
2022-10-27 13:38:13 +01:00
toaster
284ae5fab8 Fix an interpolation issue with the Signpost
Because its z was being set but its old z wasn't being overwritten, at high enough refresh rates you can see it appear above its starting position for a single frame.

Done by modifying old_z instead of using P_SetOrigin for consistency of avoiding CheckPosition.
2022-08-04 15:57:44 +01:00
toaster
4f58842804 Merge branch 'next' into public_next
# Conflicts:
#	src/i_tcp.c
2022-07-09 20:31:49 +01:00
Eidolon
8f354ad9c1 Implement Uncapped (squashed)
Co-Authored-By: Sally Coolatta <tehrealsalt@gmail.com>
Co-Authored-By: James R <justsomejames2@gmail.com>
Co-Authored-By: Monster Iestyn <iestynjealous@ntlworld.com>
Co-Authored-By: katsy <katmint@live.com>

Place Frame Interpolation in "Experimental" video options header

This seems like an appropriate way to describe the feature for now.

Add smooth level platter under interpolation, `renderdeltatics`

`renderdeltatics` can be used as a standard delta time in any place,
allowing for smooth menus. It will always be equal to `realtics`
when frame interpolation is turned off, producing consistent
framerate behavior everywhere it is used.

Add smooth rendering to save select screen

Add smooth rendering to Record/NiGHTS Attack, F_SkyScroll

Ensure viewsector is accurate to viewx/viewy

This fixes a potential crash in OpenGL when changing between levels.

Ensure + commands get executed before map start

Always have precise_t defined

Fix misc dropshadow issues

Reset view interpolation on level load

Remove unnecessary precipmobj thinker hack

Add reset interpolation state functions

Reset precip interpolation on snap to ceil

Reset mobj interp state on TeleportMove

Only swap view interp state if a tick is run

Run anti-lag chasecam at tic frequency

Fixes jittery and unstable chasecam in high latency netgames

Homogenize mobj interpolations

Add sector plane level interpolations

Add SectorScroll interpolator

Add SideScroll interpolator

Add Polyobj interpolator

Intialize interpolator list at a better time

Delete interpolators associated with thinkers

Interpolate mobj angles and player drawangle

Interpolate HWR_DrawModel

Add functions to handle interpolation

Much less code duplication

P_InitAngle, to fix angle interpolation on spawning objects

Fully fix drop shadows

It used the thing's floorz / ceilingz directly -- that wouldn't account for interpolated coordinates.

Do not speed up underwater/heatwave effect in OpenGL

Closer OpenGL underwater/heatwave effect to Software

Interpolate from time of previous tic

Previously interpolated from last 35th of a second, which
may be offset from game time due to connection lag.

Consider this the proper fix to 54148a0dd0 too.

Calculate FPS stuff even if frame is skipped

I decided ultimately to actually keep the frame skip optimization disabled, because I think it is actually a little bit helpful that you can still get accurate rendering perfstats while paused, however if we decide otherwise then we can have this optimization back without making the game act like it's lagging.

Keep rect in memory

Feel better about this than creating one all da time

Lots of FPS stuff

- Disabled VSync, due to the numerous problems it has.
- Instead, added an FPS cap.
- Frame interpolation is now tied to fpscap != 35.
- By default, the FPS cap is set to the monitor's refresh rate.
- Rewrote the FPS counter.

(This also consolidates several more commits ahead of this
fixing various issues. -eid)

Misc changes after Kart cherry-picks

Fix renderdeltatics with new timing data

Update mobj oldstates before all thinkers

Allow FPS cap values

Adjust how FPS cap is checked to improve FPS stability

Fix precip crash from missing vars

Improve the framerate limiter's timing for extreme stable FPS

Handle the sleep at the end of D_SRB2Loop instead of the start

Simplifies logic in the other parts of the loop, and fixes problems with it frequently waiting too long.

Reset mobj interp state on add

Add mobj interpolator on load netgame

Move mobj interpolators to r_fps

Dynamic slope interpolators

I_GetFrameTime to try and improve frame pace

(It doesn't feel that much better though.)

Move I_FinishUpdate to D_SRB2Loop to sync screen updates with FPS cap, use timestamps in I_FrameCapSleep to simplify the code

Fix plane interpolation light level flickering

Fix flickering plane interpolation for OpenGL in the exact same way

Funny OpenGL renderer being at least 50% copy-pasted Software code :)

P_SetOrigin & P_MoveOrigin to replace P_TeleportMove

Convert P_TeleportMove use to origin funcs

Revert "P_InitAngle, to fix angle interpolation on spawning objects"

This reverts commit a80c98bd164a2748cbbfad9027b34601185d93f5.

Waypoint polyobjects interpolate z & children

Add interpolation to more moving plane types

Adds interpolation to the following:
- Crumbling platforms
- Mario blocks
- Floatbob platforms (this one works really strangely due to two thinkers, maybe double-check this one?)

Reset overlays interp states each TryRunTics

Interpolate model interpolation (lol)

Use interp tracer pos for GL linkdraw

Papersprite angle interpolation

Makes the ending signpost smooth

Move intermission emerald bounce to ticker

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.

Fix a bunch of ticking in hu_ drawing functions

Revert "Reset overlays interp states each TryRunTics"

This reverts commit a71a216faa20e8751b3bd0157354e8d748940c92.

Move intro ticking out of the drawer

Adjust 1up monitor icon z offsets

Fixes interpolation issues with 1up monitors.

Delta time choose player menu animations

Add drawerlib deltaTime function

Interpolate afterimages further back

Use old sleep in dedicated mode

Clamp cechotimer to 0

Fixes issues with cechos staying on-screen and glitching out
(NiGHTS items for example).

Revert "Remove unnecessary precipmobj thinker hack"

This reverts commit 0e38208620d19ec2ab690740438ac2fc7862a49e.

Fix frame pacing when game lags behind

The frame timestamp should've been made at the start of the frame, not the end.

Fix I_FrameCapSleep not respecting cpusleep

Jonathan Joestar bruh

Allow dedicated to use precise sleep timing again

Instead of only using one old sleep, just enforce framerate cap to match TICRATE.

Make Lua TeleportMove call MoveOrigin

Reset Metal fume interp state on appear

Add interpdebug

Put interpdebug stuff in perfstats instead

Add timescale cvar

Slow the game down to debug animations / interpolation problems! Speed it up if you need to get somewhere quickly while mapping!

Enable timescale outside of DEVELOP builds

It has NETVAR, so it should be fine -- put an end to useful debugging features excluded in multiplayer!

Force interpolation when timescale != 1.0

Reset old_z in MT_LOCKON think

Fixes interpolation artifacting due to spawn pos.

Fix cutscenes in interp

Fix boss1 laser in interp

Interpolate mobj scale

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

Fix interp scaling crashing software

Reset interp scale when Lua sets .scale

Disable angle interp on fresh mobjs

Fix interp scale crash for hires sprites

Interp shadow scales

Copy interp state in P_SpawnMobjFromMobj

Fix multiplayer character select

Don't interpolate mobj state if frac = 1.0

Fix Mario block item placement

Interpolate spritescale/offset x/y

Fix offset copies for SpawnMobjFromMobj

THANKS SAL

Add Lua HUD drawlists

Buffers draw calls between tics to ensure hooks
run at the originally intended rate.

Rename drawerlib deltaTime to getDeltaTime

Make renderisnewtic is false between tics

I know what I'm doing! I swear

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.

Ensure mobj interpolators reset on level load

Ensure view is not interpolated on first frame

Disable sprite offset interpolation (for now)

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 17:35:30 -05:00
toaster
71d49bcc3b With Sal's feedback, make nospectategrief get set 20 seconds into the map, not on lap 3 2021-12-15 23:21:43 +00:00
toaster
375a635c8a Merge branch 'spectator-little-things' of https://git.do.srb2.org/KartKrew/Kart-Public.git into public_speclil 2021-12-02 18:07:50 +00:00
JugadorXEI
ab2bbf3b08 validation against mo (guards against delays) 2021-09-07 22:09:03 +02:00
Sally Coolatta
7b6d527bd4 Griefing timer
Spectates/kicks players who aren't making progress, does it even faster if they're going backwards.
2020-09-20 17:03:14 -04:00
FlykeSpice
c09cb6d762 Remove POLYOBJECTS POLYOBJECTS_PLANES #ifdefs(backport from srb2 2.2) 2020-08-20 13:02:13 -04:00
FlykeSpice
00137ef4ea Remove ESLOPE #ifdef(backport from srb2 2.2) 2020-08-20 13:02:13 -04:00
Wolfy
dad80d8db1 Fix the RA only linedef
I forgot some stuff.
2020-05-05 10:25:40 -05:00
Wolfy
5edfa412cd Record attack only linedef exec 2020-04-05 22:37:42 +02:00
Latapostrophe
f15adb64cb fix thrust on spring pads for shrink and the likes 2019-07-13 14:07:57 +02:00
wolfy852
f61f7f4411 Merge remote-tracking branch 'remotes/pub/next' into v1
# Conflicts:
#	src/d_netcmd.c
#	src/r_main.c
#	src/v_video.c
2019-05-12 03:40:02 -05:00
Alam Arias
571e9be7d8 fix up misleading indentation of a if statement 2019-05-09 23:03:32 -04:00
wolfy852
2c363c4e1e Merge remote-tracking branch 'remotes/srb2pub/public_flatsprite' into next
# Conflicts:
#	src/d_netcmd.c
#	src/doomdef.h
#	src/doomstat.h
#	src/f_finale.c
#	src/g_game.c
#	src/hu_stuff.c
#	src/m_menu.c
#	src/p_spec.c
#	src/p_user.c
#	src/r_main.c
#	src/r_things.c
#	src/s_sound.c
#	src/v_video.c
#	src/y_inter.c
2019-05-06 22:40:12 -05:00
TehRealSalt
a187656a8f Fix up more stuff
Now in a mergable state
2019-04-18 12:20:13 -04:00
TehRealSalt
1f61397545 Huge splitscreen refactor
Did not get to finish all refactoring or even compile this, I'll continue later
2019-04-18 03:08:11 -04:00
fickleheart
4b7d2aea84 Move public demo vars to a single struct 2019-03-24 21:32:15 -05:00
mazmazz
2c75d4da69 Fix custom fade source bug for Change Music linedef 2019-03-13 19:53:16 -04:00
Latapostrophe
0e6083cf02 Fix what was discussed, minus the rocksneaker math which is still shady, but let's not break what currently works 2019-03-11 18:53:23 +01:00
Latapostrophe
91ce3617ef Fix respawning in reverse gravity 2019-02-18 14:00:36 +01:00
toaster
ce09566e11 Do a bit more cleanup. Notably, prevent skins setting a bunch of things in preperation for this branch hitting the mainstream.
Also, make SF_RUNONWATER set off majormods. I was under strong pressure to remove it and almost did but honestly it's kind of endearing and I think like one character in Releases uses it..?
2019-01-26 19:13:49 +00:00
TehRealSalt
d3a38a4375 Add disable for music credit showing on the change music linedef 2019-01-09 21:17:10 -05:00
TehRealSalt
de72403fb9 Add MUSICDEF lump for defining custom songs & replacing existing songs
Very rudimentary at the moment, but it's workable
2019-01-09 21:00:45 -05:00
TehRealSalt
72bc1b48f6 Merge branch 'next' into music-credits 2019-01-09 03:08:20 -05:00
TehRealSalt
5e8e08ad95 Misc level init fixes 2019-01-08 20:14:58 -05:00
SeventhSentinel
5d51754936 In-game music credits 2019-01-04 04:44:55 -05:00
mazmazz
1aacfee80c Merge branch 'public-musicplus-le-changemusic' into public-musicplus-core 2019-01-02 03:47:51 -05:00
mazmazz
b7bb570f97 Merge remote-tracking branch 'public-gl/master' into public-musicplus-core 2019-01-01 10:41:40 -05:00
SeventhSentinel
2422501ab9 Add a mapobjectscale global
Should be no different than it was before, now it's just less tedious to type :V
2018-12-12 21:55:59 -05:00
TehRealSalt
d9fa45d850 Back to numstarposts/2 2018-12-02 02:29:47 -05:00
TehRealSalt
5534017954 Merge remote-tracking branch 'srb2public/next' into merge-next 2018-11-29 08:49:50 -05:00
Sal
e88dbedbc4 Merge branch 'mobjdamage-hook' into 'master'
Lua "damage" hooks

See merge request KartKrew/Kart!115
2018-11-29 07:16:22 -05:00
Latapostrophe
5660e3fccd Fixed conflict, swapped trapitem and inflictor, and moved the (void)inflictor;s 2018-11-28 19:41:01 +01:00
toaster
d8955f1f87 LF_SECTIONRACE now has a secondary function!
* Sets the player respawn coords on the finish line, so dying in the short interval between crossing an intermediate finish line and hitting a checkpoint doesn't send you all the way back to the beginning.
2018-11-28 16:33:52 +00:00
Monster Iestyn
cb53bc8afe remove redundant wadfile loop within wadfile loop for ANIMDEFS code 2018-11-27 23:05:33 +00:00
TehRealSalt
e2a9aeb34c Require 3/5ths of checkpoints instead of 1/2
This broke MKSC in a minor way if you skip a specific item set and then take the big cut... I'll let it go anyway since its an improvement everywhere else.
2018-11-27 14:28:11 -05:00
Latapostrophe
0175e5b6a5 Possible fix for lack of mobjdamage and shoulddamage lua functionalities on players. 2018-11-26 21:23:41 +01:00
MonsterIestyn
b53cd70201
Merge branch 'next' into PK3-BackportNext 2018-11-26 18:56:51 +00:00
Monster Iestyn
1b2aea81dc Merge branch 'master' into next 2018-11-25 20:39:17 +00:00
mazmazz
ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
toaster
2b91e42410 Fix a bug where zoomtubes could cause ridiculous acceleration (ie, because PF_SPINNING was applied, causing ridiculously low friction, and then no mechanism was able to remove it) 2018-11-24 18:22:01 +00:00
Nev3r
6f5e3d42ff Merge branch 'PK3-Backport' into 'PK3-BackportNext'
Pk3 backport

See merge request Nev3r/SRB2!1
2018-11-24 06:02:19 -05:00
Nev3r
cb0c31fa9a Final touches
-Backported multiple per-wad/pk3 ANIMDEFS supported now, just like TEXTURES.
-Removed now-unused function.

Signed-off-by: Nev3r <apophycens@gmail.com>
2018-11-24 09:26:52 +01:00
Nev3r
0487558a98 Add missing tweaks
Also remove a test printf.

Signed-off-by: Nev3r <apophycens@gmail.com>
2018-11-23 17:58:45 +01:00
TehRealSalt
e07e89055d Remove drift & pogo spring on hit and a few other places 2018-11-21 19:00:14 -05:00
Sryder
b8477b4067 Squash various warnings
Shadowed declarations
Unsuffixed float constants
There's an unsuffixed float constant I can't fix because the define is outside of SRB2. We could have our own copy of Pi if we really wanted.
2018-11-14 21:53:57 +00:00
TehRealSalt
5c1cc6e1df Merge branch 'master' into all_hardcode 2018-11-02 01:42:34 -04:00
TehRealSalt
0c2a5cf9d3 Merge branch 'master' into more-fixes 2018-11-01 18:10:53 -04:00