Commit graph

90 commits

Author SHA1 Message Date
James R
9270e53975 Force replays to auto save ifdef TESTERS 2022-06-07 01:22:18 -07:00
Sally Coolatta
b5334e6b42 Move follower code to its own file 2022-05-23 00:23:46 -04:00
toaster
38e6cba181 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into uncapped-absolution
# Conflicts:
#	src/f_finale.c
#	src/sdl/i_video.c
#	src/st_stuff.c
2022-05-21 13:40:20 +01:00
Sally Coolatta
50f26624fd Merge branch 'master' into di 2022-05-21 03:50:04 -04:00
Sally Coolatta
56c23339be Directional Influence
Pretty much just copy+pasted from Snap the Sentinel!!
- Hold left/right to adjust the momentum angle after hitlag, up to 22.5 degrees. (Only angle can be adjusted, so you can't adjust your speed, only your direction.)
- It's relative to your angle, so sometimes you need to use forward/back, or even diagonals (forward/back throws now store full analog data for this to work)
- Bananas flip DI direction, to make them not baby easy mode
- Tumble has x3 DI (so angle adjustments of 67.5!!), and hitlag on each bounce to allow even more control.
2022-05-20 01:45:16 -04:00
Sally Coolatta
852e9b8ce9 Rebrand all console / window stuff 2022-05-19 15:10:47 -04: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
toaster
f794908430 Merge branch 'followtweak' into 'master'
Follower adjustments

Closes #202

See merge request KartKrew/Kart!514
2022-03-12 18:37:15 +00:00
Sally Coolatta
39da886447 Merge branch 'master' into invinc-color-fix 2022-02-16 23:01:23 -05:00
Sally Coolatta
a750fdd810 Invincibility wasn't using K_RainbowColor anymore, what the function was designed for... 2022-02-16 23:01:07 -05:00
toaster
e7108cfde1 Resolve the replay crash issue :mike:
(Also no longer mess around with moving flags into booleans per my comment)
2022-01-23 21:35:29 +00:00
Sally Coolatta
38e741af76 Merge branch 'master' into grow-shrink-shoe-polish 2022-01-18 02:57:08 -05:00
Sally Coolatta
c606e1e96b Force shrink can be toggled individually online
In preparation for a "make yourself small by default" cheat on the char select like SMK.
2022-01-09 04:08:26 -05:00
toaster
316cd61d9f * Fix follower colour being limited to UINT8.
* Fix follower colour not being set in offline mode (based on Steel's fix but no UINT8).
2022-01-04 22:41:35 +00:00
James R
fa691c0ee4 Create folder with branch name when saving replays 2021-12-18 22:31:33 -08:00
James R
5145011251 Add some missing G_SetGametype calls
Fixes timelimit not being reset when switching gametypes
on the vote screen.
2021-12-14 18:11:08 -08:00
Sal
a326e180ca Merge branch 'replayfixes' into 'master'
Replay fixes mark whatever

See merge request KartKrew/Kart!463
2021-11-30 02:28:57 +00:00
toaster
9e12195840 Fix two more minor issues with reading and writing replays.
* DXD_PLAYSTATE and DXD_WEAPONPREF no longer conflict when both are read during the same tic. (VERY rare bug, but was possible)
* Fixed G_WriteDemoTiccmd not considering the sign of forwardmove properly. (Of basically no consequence r/n, but could bite us down the line if not caught)
2021-11-29 19:45:01 +00:00
Sally Coolatta
c43f8da5e6 P_SetOrigin & P_MoveOrigin to replace P_TeleportMove 2021-11-29 08:20:27 -05:00
toaster
3141ca0221 Replay fixes mark whatever
Not a pancaea for EVERYTHING, just a bunch of good stuff.

* Some issues with spectators not == true because the assignment wasn't casted.
* Netgame status (or rather its inverse) is recorded in netreplays now, to allow for power levels controlling spawn position.
* Fixed tally screen for replays to not scream infinitely at you.
* P_IsLocalPlayer now uses display players in replays.
* A bunch of good testing prints that helped me find these problems, commented out for now just in case we need them again soonish.
2021-11-28 20:03:49 +00:00
toaster
fa8bffabfc Have replay recording of "hits" use the reference count system, so that it doesn't potentially access free'd memory.
(This is not THE replay fix, but it is A replay fix.)
2021-11-21 13:35:08 +00:00
toaster
7fab92d73b Kickstartaccel demo fix
An absolute dogshit clown-level code blunder from me, now corrected.
2021-05-10 14:21:13 +01:00
Sally Coolatta
dcee9269dd FLAGS IS NOT LATENCY
UH OH STINKY COPY PASTE!!!!
2021-04-21 20:51:57 -04:00
toaster
00972a83d2 remove the prefix since everything seems to function 2021-04-17 11:30:08 +01:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01:00
Sally Coolatta
8bb1fa57d4 Merge branch 'master' into 22-merge-again 2021-04-05 01:11:26 -04:00
toaster
d302693946 Fix replays, which were broken because all the player struct info was being clobbered IMMEDIATELY after reading it from the demo :mothpensive: 2021-04-03 19:48:50 +01:00
toaster
40cbc30bff Mammoth commit, sorry.
All my work thus far on solving the drawflag/renderflag/additive/subtractive conundrum.

Outstandng problems:
* Bad additive/subtractive tables means that they appear opaque except under certain conditions.
* No support for FOFs, Polyobjects, or linedefs in OpenGL yet.
* All OpenGL support mostly done blind, may or may not function in practice.

If nothing else, the hard engineering problems are solved and it's just bug hammering...
2021-03-31 22:46:23 +01:00
Sally Coolatta
0be122189f Remove turn easing code
Vanilla holdover lots of people complain about & tbh just doesn't need to exist
2021-03-01 12:39:42 -05:00
Sally Coolatta
420a6ccccb Fix Dehacked loading 2021-02-28 22:39:47 -05:00
Sally Coolatta
9d7ec0ab8f Merge SRB2 next
Probably doesn't compile yet, but I got rid of all of the conflicts for anyone who wants to take a stab at it.
2021-02-27 05:18:36 -05:00
toaster
879c821d18 Demo-sync weaponpref data, which just includes kickstartaccel right now. 2021-02-22 12:58:03 +00:00
toaster
08d087c6b5 Acceleration Kickstart, my little hobby project.
It's no secret that holding down a button a lot can fuck with your wrists and fingers. It's too late for me to be damageless, but I can at least create an option to reduce further harm.

This accessibility feature, when enabled (kickstartaccel and kickstartaccel2/3/4 in the console) behaves with the following properties:
* Hold accelerate for 1 second to lock it down.
* Press again to release.
* Short holds/presses do nothing (good for POSITION).
* Continue holding it during the releasing press to re-lock it.
* A small triangular UI element is added next to the speedometer sticker, which displays the current state of the acceleration kickstart for visual feedback. (NO SPLITS SUPPORT YET)

In addition:
* Add PF_ACCELDOWN and PF_BRAKEDOWN, and BT_REALACCELERATE (which ACCELDOWN tracks). Even if this feature never gets merged, BT_REALACCELERATE is required because sneakers and boosters force it on too (extending this is how I implemented it).
* Fix the dehacked playerflag list being out of shape.
* I replaced some existing flags during development of this branch, so their old uses have been whittled away.
2021-02-20 23:10:18 +00:00
James R
c302d5b5d4 That moment when you see HAVE_BLUA crawl back from the grave
This would mean MapChange hasn't been firing for demos ...since 2.2.5.
2020-12-10 00:36:14 -08:00
toaster
762dfd3063 When resuming from a rewind, don't:
* run wipes again
* run titlecards again
* stop the music
2020-11-28 12:31:16 +00:00
toaster
495e4896dc Fixed Chengi's sprite2 bug, and started on (but haven't nailed down) the rewind crash. 2020-11-28 11:45:25 +00:00
toaster
c2447154ec Bracketing fix for Sryder. 2020-11-28 11:32:29 +00:00
toaster
f72108c4fa A whole bunch of cleanup to get most record attack/replay stuff reasonably functional.
* Fix the screen being stuck black at the very start of start record attack.
* Bump up the demoversion to 7, because I want all previous v2 demos to be guaranteed kaput (it was previously 4, but 7 is a nice number).
* Fix a ton MORE shitcausing misalignments in the replay system, this time specifically focused on getting ghosts functional.
* Plug a few holes in the "best lap" record implementation that allowed for stupidly easy records due to the way v2's finish lines work.
* Make a few follower-related things sane, to prevent spurious console prints that were getting in the way of my test prints.
2020-11-27 20:30:28 +00:00
toaster
9c0edb097f Fix demos doing incomprehensibly nasty bullshit; now they only desync for a handful of easier-to-hammer-down cases. 2020-11-27 17:59:57 +00:00
Riku Salminen
3b48adc98a Made height/spinheight and height change values in replays more accurate 2020-11-09 17:01:20 +02:00
Sally Coolatta
601451bead This RNG thing was removed, so it doesn't need to be in demo code anymore either 2020-10-31 02:39:30 -04:00
Sally Coolatta
afbbfc9b1f Fix cvars
My wrist burns...
2020-10-24 21:32:07 -04:00
Sally Coolatta
7c2bd0d1c2 Merge remote-tracking branch 'srb2/next' into the-scary-22-merge 2020-10-24 20:50:58 -04:00
Steel Titanium
3f50b92ee2 Fix G_GhostTicker crashing trying to read netvars as ghost data
Also fixed possible issue with incorrectly reading the demo pointer due to the wrong type being passed to sizeof in G_ConsGhostTic
2020-10-19 20:20:08 -04:00
James R
a82f568fc3 Merge branch 'next' into 'next'
Updated 16 bit momentum values to 32 bit in demos, changed demo version

See merge request STJr/SRB2!1157
2020-10-08 21:56:30 -04:00
Sally Coolatta
2f6962c103 Correct player angle when respawning from crushing 2020-09-26 03:12:22 -04:00
Sally Coolatta
285ec3e08c Player death uses damage types
- Fixed last place elimination not working (again)
- Replaces squishing from level geometry with good old fashioned crush death
2020-09-25 16:31:10 -04:00
Riku Salminen
487a409760 Wrote 3 lines in 1, as Zwip-Zwap Zapony suggested 2020-09-23 22:37:06 +03:00
Riku Salminen
8e7e76fad9 Update g_demo.c, Remove old comments of fractional loss of one byte 2020-09-23 15:29:03 -04:00
Riku Salminen
376582c750 Updated 16 bit momentum values to 32 bit in demos, changed demo version 2020-09-23 21:26:51 +03:00