Commit graph

60 commits

Author SHA1 Message Date
Sally Coolatta
4961a585a7 Add ceremony to twodee wipedefs tables 2023-03-04 13:49:07 -05:00
Sally Coolatta
f78b3f7794 Fixes for CEREMONY gamestate
- Made titlemap + ceremony code more straight-forward by being able to set gamestate in G_DoLoadLevel directly
- Demos are only recorded on GS_LEVEL (fixes crash for ceremony + titlemaps)
- Added G_GamestateUsesLevel to encapsulate all checks for using level rendering
- Added GS_CEREMONY to wipedefs
- K_PodiumSequence just checks for GS_CEREMONY now (optimization)

The game can now properly go to the podium after GP
2023-03-03 16:09:51 -05:00
Eidolon
f82bdd878d hwr2: remove now-unused software wiggle 2023-02-27 21:46:40 -06:00
Eidolon
83b6c30952 hwr2: add wipe mode to F_RunWipe, fix all wipes 2023-02-27 21:45:59 -06:00
Eidolon
98ce714614 hwr2: integrate avrecorder with RHI and legacy GL 2023-02-27 19:49:45 -06:00
James R
a19b476d3d hwr2: do GIF recording in screenshot pass 2023-02-26 20:28:05 -06:00
Eidolon
1958394635 hwr2: add g_wipeskiprender 1-frame workaround 2023-02-26 18:47:42 -06:00
Eidolon
31ce947659 hwr2: overhaul wipe rendering 2023-02-26 18:47:42 -06:00
Eidolon
d855d96a10 hwr2: Add hardware 2D rendering 2023-02-26 18:47:42 -06:00
toaster
54b9f3b7cc Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into new-menus
# Conflicts:
#	src/Sourcefile
#	src/f_finale.c
#	src/m_menu.c
#	src/y_inter.c
2022-05-22 17:22:49 +01:00
Eidolon
f7ec2f182f Uncapped (squashed v2)
Squashed SRB2 2.2 Public uncapped without UDMF merge

Implement interpolation at the renderer level

Instead of interpolating thinkers, we interpolate mobjs inside the
renderer. Further interpolation is TBI.

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 6ecac4159a 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.

Adjust spawned mobj z by gravity inversion

Only check VERTICALFLIP for old_z calc

Fix Marathon Mode menu for uncapped

Move screenshot code before timing

Only play emerald hunt sounds on new tics

Restore deleted zofs (fixes signpost sparkles etc)

Revert to before screenUpdate boolean was added

Was done this way for the sake of an older version of uncapped's timing; now that the new timing is much better, I decided it should remain as close to pre-uncapped as it can be.

Run UpdateLevelInterpolators in preticker

Fixes KartKrew/Kart-Public#10

Run UpdateMobjInterpolators in preticker

Reset view interp in preticker

Add per-split player view resets
2022-05-06 22:47:39 -05:00
James R
a64263c96d Merge remote-tracking branch 'origin/master' into new-menus 2021-12-03 14:56:48 -08:00
toaster
15741da0a4 Improve some of the efficiency loss in F_DoWipe compared to K.S.'s 2.1 code by seperating out some of the loops. 2021-11-28 20:18:41 +00:00
toaster
b4af07ffed Merge branch 'master' into new-menus
# Conflicts:
#	src/d_main.c
#	src/dehacked.c
#	src/m_menu.c
#	src/v_video.c
#	src/y_inter.c
2021-10-18 01:18:37 +01:00
Latapostrophe
f559f24c07 Encore support, gif fix and slight optimization 2021-05-02 11:38:33 +02:00
Sally Coolatta
2af75a2bd1 Fix merge conflicts 2021-01-11 00:06:34 -05:00
Sally Coolatta
e6a9e5a68e Merge branch 'master' into new-menus 2020-11-08 02:49:28 -05:00
toaster
87c10047a5 A bunch of serious heavy lifting to fix title cards and closely related.
* Fix the title card fade's one-frame invalid memory read.
* Disable a redundant gamestate-activated wipe, which A) horribly broke Encore wipes, B) made normal map transitions take longer than they should, and C) held on the one glitchy title card wipe frame to make the game look more broken than it was.
* Fix Encore wipes being broken by the merge.
* Disable (not remove; may want to use later) the :nick: patch draw attempts from the title card drawer.
* Re-add zonettl support to the title card drawer.
* Move the title card drawer in front of the fade (Looks better for if we showcase 2.2 merge footage before creating a better title card).
2020-09-22 18:27:47 +01:00
Sally Coolatta
0dc21106e5 Lua stuff is done 2020-08-15 07:47:18 -04:00
Sally Coolatta
7b4d84c3f3 Merge remote-tracking branch 'public/master' 2020-08-12 18:55:43 -04:00
Sally Coolatta
0dd19f4f50 Merge branch 'master' into new-menus 2020-05-16 04:37:44 -04:00
James R
9056ca0525 Merge remote-tracking branch 'origin/master' into http-mserv 2020-05-12 17:50:32 -07:00
Sally Coolatta
15d18640de Merge remote-tracking branch 'public/master' into merge-12 2020-05-12 03:16:14 -04:00
Sally Coolatta
b4f8d708a4 Merge branch 'master' into new-menus 2020-05-09 17:04:10 -04:00
James R
29bf51bc99 Make mod update, room list and server list multithreaded
This took fucking ages and it still fails sometimes in edge cases, but I
don't give a FUCK right now.
2020-04-26 19:46:35 -07:00
Ashnal
abc17c9448 Fix dedicated servers not waiting for client wipes.
Now they run wipe logic to wait the same amount of
time that clients do, without actually rendering anything.
Previously, the server would start the new map immediately,
and clients would frameskip up to the server when they were done wiping.
2020-04-21 19:16:31 -05:00
toasterbabe
2fb599661e Introducing pMasterPalette.
Used instead of pLocalPalette when attempting to determine objective truths, such as "the colours of this gif without color profile modification" and "what indicies should this colormap remap to".

Also, made f_wipe.c's paldiv only get calculated once.

(cherry picked from commit d669a4e84a)
2020-03-23 16:45:57 -07:00
James R
d46c6dc384 Kill trailing whitespace 2020-03-21 17:37:33 -07:00
TehRealSalt
2324282569 Merge master 2019-10-03 12:16:24 -04:00
TehRealSalt
37009ac9b0 A few stashed fixes that didn't make it to the branches somehow 2019-10-03 10:31:34 -04:00
TehRealSalt
7f6d825809 Remove unused GENESIS_WIPE define 2019-10-03 01:10:10 -04:00
TehRealSalt
ca83b06d93 Fuckhuge restructuring
- m_menu.c and m_menu.h are dead. Everything has now been moved to k_menudef.c, k_menufunc.c, k_menudraw.c, and k_menu.h.
- Expanded menu_t and menuitem_t to add transitions and tooltips
- Early character select screen
- Removed almost all menu definitions, I'll be reimporting them as they are needed
2019-10-02 11:31:11 -04:00
TehRealSalt
780202668b Only run Encore wiggle in software 2019-08-11 15:35:38 -04:00
TehRealSalt
978c4f7e24 Minor fixes 2019-08-10 09:50:42 -04:00
TehRealSalt
71f35c7f5b Add encore_towhite 2019-08-10 02:07:18 -04:00
TehRealSalt
5da84b78a2 Encore wiggle 2019-08-10 01:59:23 -04:00
TehRealSalt
aad0dbd076 Encore invert fade 2019-08-10 00:54:16 -04:00
TehRealSalt
f188c290e5 Start on new menus 2019-08-09 04:25:22 -04:00
TehRealSalt
274dc434ff Set new fades, fixed crash upon using non-colormapped fade 2019-08-08 01:43:50 -04:00
TehRealSalt
36e4f25cc9 Uses pre-defined colormap lumps now
Works much faster now. I'd like to clean up this code some though
2019-08-07 02:21:04 -04:00
TehRealSalt
94081f469e Genesis wipe stuff
Very unoptimized, lags in anything besides 320x200
2019-08-04 23:42:30 -04:00
Sally Cochenour
4b95aa3da7 why does this trigger ERRORMODE now?! 2019-02-04 22:22:12 -05:00
Sryder
bdee6c7fa0 Fix Connection Timeouts during Wipes
Keep the connection alive with a specific packet to say we haven't timed out
2019-01-30 19:18:51 +00:00
TehRealSalt
4507ee18fd Merge remote-tracking branch 'srb2public/next' into merge-next 2018-11-29 08:49:50 -05:00
mazmazz
c91b2b4456 Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
toaster
fe55d7d9a2 Do Oni's suggested changes to the wipe-based level intro fade. https://cdn.discordapp.com/attachments/270211093761097728/470690865279401994/kart0019.gif 2018-07-22 21:49:17 +01:00
TehRealSalt
f1d21b008d Enhance toaster's awesome intermission work a bit further
- Further divide the 2 screens' functionality; the first screen is purely for match results, the second screen is purely for rank results. (only time/score is on the first page, only rank and rank increase is on the second page, instead of time/score and rank increase being on the first page, then rank increase carries over to the rank page...)
- The page switch now happens at exactly the halfway point of the intermission timer
- It now uses a cool picture of the view buffer, like SRB2 SP, except faded, instead of the previous intermission tile.
- Fixed an issue with the previous commit.
2018-07-19 00:07:13 -04:00
toaster
5f2aed2fd3 * Fix the fades mess, and have the title screen always have a smooth, non-checkered fade from blapck!
* Fix all the bugs with skin not being set properly or kept synchronised with the multiplayer setup in record attack.
* Reduce the amount of flashing on the voting screen.
2018-07-04 22:57:50 +01:00
Sryder13
1d334cab75 Base title screen, gets screen fade working from intro->title for the fade to work 2018-01-15 03:40:25 +00:00
TehRealSalt
4458cfdb9f Tweeeeeaks
- MT_FALLINGROCK bumps you instead of spinning you out! RIP annoying af apples
- Made some Battle-related messages only happen in netgames
- Messed with the timing on the intro
2017-12-28 18:37:25 -05:00