Commit graph

600 commits

Author SHA1 Message Date
Sally Coolatta
ebb34ff9d4 Lap based power level 2022-08-14 06:00:37 -04:00
James R
1800970ed9 Death: respawn from where you died and take an invisible lightsnake 2022-06-09 22:49:30 -07:00
Sal
ea96a33e41 Merge branch 'bot-rubberband-edit' into 'master'
Drastically simplified bot rubberbanding

See merge request KartKrew/Kart!604
2022-05-27 06:49:51 +00:00
Sally Coolatta
8815b065b3 Merge branch 'master' into bot-rubberband-edit 2022-05-25 23:29:04 -04:00
Sally Coolatta
bc3a82b610 Merge branch 'master' into slope-lighting 2022-05-25 04:04:38 -04:00
James R
dac2f4495e Merge branch 'hyu' 2022-05-25 00:43:32 -07:00
Sally Coolatta
dc890caef3 Add slope lighting
Makes slopes at a great enough steepness able to match the contrast of walls.

COMING SOON: Directional lighting & contrast modifier, as options for map header.
2022-05-24 22:23:04 -04:00
Sally Coolatta
a896d73334 Precalculate bot controller & rubberbanding
These both require a couple loops to preform each, which probably adds up over multiple bots. Let's just precalculate them at the start of bot ticcmd.
2022-05-24 15:28:36 -04:00
AJ Martinez
3bc5fac430 Adjust steering lock after successful DI 2022-05-23 16:47:27 -05:00
Sally Coolatta
c8718b25ff REMOVE hyubgone + all of the other bullshit we did to try and make it show up less 2022-05-22 21:17:14 -04:00
Sally Coolatta
644b9e1acd Merge branch 'master' into hyu 2022-05-22 20:27:14 -04:00
Sally Coolatta
83b5bfef59 Super Circuit hit confirms
After getting hit, you'll hear the person who hit you's hit confirm from any distance
2022-05-22 03:26:32 -04:00
Sally Coolatta
7891b10328 Merge branch 'master' into hyu 2022-05-21 22:38:15 -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
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
James R
11f97049b1 Merge remote-tracking branch 'origin/master' into uncapped-absolution 2022-05-11 17:09:59 -07:00
Sally Coolatta
9ab0e028d4 Tripwire leniency
1 full second after entering a tripwire state, you can still go through tripwires
2022-05-08 01:03:11 -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
SinnamonLat
464e4a338a wip: ebrake visuals 2022-05-03 03:35:01 +02:00
James R
38ab22f022 Netsave player.hoverhyudoro 2022-05-01 14:04:25 -07:00
toaster
b9864c9294 BATTLE SYNC
* Fix majority of Battle resyncs.
    * Change how Paperitem spawners work. Instead of rerolling the RNG if a map spot is already used, maintain a list of available spots...
    * Correct over-the-network type of player->spheredigestion.
    * Remove the condition that prevented the spheres' spawnpoints from being sent over the network, which meant they were only respawning on the host's end...
* Fix itemroulette on Battle playerarrow. (Rarely seen these days but still possible to observe as spectator for Break the Targets)
* Change draw order of Position Faces and Tab Rankings to allow for players' numbers to draw on top of the big out-of-bumpers X.
2022-03-23 00:34:23 +00:00
toaster
c67b52f85d move the old "can't load the level" error to its proper place, added specific error messages for all the times that unarchiving Lua banks can fail
# Conflicts:
#	src/d_clisrv.c
2022-03-18 13:07:47 +00:00
toaster
f073218532 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into boss
# Conflicts:
#	src/m_menu.c
2022-03-18 09:07:13 +00:00
James R
821fd41d70 Merge branch 'c99-pedantic' into 'master'
Switch compiler mode C90 to C99; enforce stricter standard conformance

See merge request KartKrew/Kart!554
2022-03-18 02:41:57 +00:00
toaster
8de92e8dca Merge branch 'master' into boss
# Conflicts:
#	src/k_bot.c
2022-03-17 16:58:42 +00:00
toaster
05c1d61ae1 Add pmomz and stairjank to net archive (plus re-organise slightly). 2022-03-14 20:13:32 +00:00
toaster
fcb6a4e1ab Disable the vanilla-sourced "keepbody" (rejointimeout) feature. 2022-03-14 16:33:03 +00:00
toaster
31db72256d Merge branch 'master' into boss
# Conflicts:
#	src/y_inter.c
2022-03-12 19:24:23 +00:00
toaster
5f3bf3e8a2 A first-pass attempt at the "digestion" hidden stat for Battle - pushing just in case I fall asleep before we can explore this, and/or end up busy in the next few days.
* At the start of the first bar, everyone digests spheres at 1 per second, same as before.
* This actually only starts counting down from the most recent moment your spheres becomes nonzero, which is a very, VERY tiny buff to prevent their instant depletion.
* At around 40 spheres:
    * Chao digests them at 1 sphere per *tic*. Might be slightly too punishing.
    * Mecha Sonic digests them at 1 sphere per... 33 tics, or barely faster than before. Might be slightly not punishing enough.
    * Everyone else is linearily in between.
2022-03-06 22:23:40 +00:00
James R
2887385122 pedantic: ignore enums signed overflow 2022-02-20 03:25:46 -08:00
toaster
6d851f2bc8 P_LoadLevel is a mess, but attempt to fix a few things that shouldn't be happening with resyncs, including #209. Untested. 2022-02-14 15:43:56 +00:00
James R
d06355018d Track skybox within player struct
TODO: Lua

Splitscreen and change viewpoint uses the proper skyboxes!
2022-01-17 22:46:01 -08:00
toaster
867b0516e6 Terrain pointers were not getting properly relinked on netsave load, now they are. Thanks Sal for taking a moment out of your day to rubber duck with me 2022-01-16 23:53:14 +00:00
Sally Coolatta
ef5a4f01d4 Merge branch 'master' into terrain-lump 2022-01-04 12:34:47 -05:00
Sally Coolatta
cc250afd45 P_InitAngle, to fix angle interpolation on spawning objects 2021-12-24 12:45:51 -05:00
Sally Coolatta
b1ffaa99f8 Sync mobj->terrain
This should be enough I think to sync terrain up. The data structures can't change after the files have been loaded, so it should be good. Needs proper online testing though
2021-12-09 13:20:35 -05:00
James R
2a74ee07f1 Update underwater physics
- Reduce steering effect and remove increased friction.
- Strafe into turns and tilt the inside wheels up.
2021-12-05 20:12:48 -08:00
James R
696ca049d8 Apply momentum based squash and stretch to every object
Also netsave.
2021-11-28 22:43:48 -08:00
James R
8e20ca4c04 TRIPWIRE
Set a sidedef's midtexture to "TRIPWIRE" to turn that line
into a tripwire.

Players can't drive through a tripwire and will bounce
back at high speed if they're in one of the following
states:

1. Invincibility / Grow
2. Sneakers
3. Flame Shield dash
4. >200% on the speedometer

Hitting a tripwire plays a sound, sends you into hitlag,
then plays another sound when the hitlag is over. The
sounds used depend on whether you can drive through the
tripwire.
2021-11-28 03:03:43 -08:00
James R
17b3cd205e Merge branch 'snapify-hitlag' into 'master'
Snap da sentinel like hitlag

See merge request KartKrew/Kart!458
2021-11-28 00:29:29 +00:00
James R
9d485e17e7 Merge branch 'karma-gate' into 'master'
Elimination timer for karma bombs during overtime

See merge request KartKrew/Kart!459
2021-11-28 00:20:52 +00:00
Sally Coolatta
cb5ea8b335 Add basic damage hitlag effects
- Invert high contrast greyscale colorization effect for damage hitlag
- Jitter is now also exclusive to damage-related hitlag
- Since jitter is now just tied to a flag, removed the old trick momentum hack
2021-11-27 13:38:45 -05:00
James R
059058476e Elimination timer for karma bombs during overtime
Every hit on another player while you are alive awards you
five seconds of karma bomb time during overtime. When this
timer is empty, you will DIE.
2021-11-26 21:55:32 -08:00
James R
1958f3f61c Sync respawn.airtimer
Oops!
2021-11-26 12:55:23 -08:00
lachablock
debfb41423 Merge remote-tracking branch 'origin/master' into capsules 2021-06-14 12:20:53 +10:00
lachablock
b78db12b0d Add item capsules 2021-06-14 12:20:39 +10:00
Latapostrophe
d10f4ea128 More suitable data types + lua push 2021-04-23 00:14:36 +02:00
Latapostrophe
29e11a0378 changes to the delay, boost when doing upwards trick 2021-04-22 15:11:15 +02:00
lachablock
aeaf6c94f5 Give purple & rainbow driftboosts a 30% speed boost 2021-04-21 14:40:13 +10:00
lachablock
5e327e09c6 Merge master (resolve structgunch conflicts) 2021-04-20 16:09:59 +10:00