Commit graph

200 commits

Author SHA1 Message Date
Eidolon
ea45def97b Add dynslope demoversion compat check 2025-08-20 18:54:06 -05:00
Eidolon
a1f007c40c Merge public master 2025-08-20 18:36:13 -05:00
Nep2Disk
97a72350af Fix inconsistent sector special detection on dynslopes 2025-08-20 23:35:46 +00:00
Ashnal
cc79808aba New MFE_DONTSLOPELAUNCH flag
Makes mobj immune to slope launching
Also 32 bit eflags woo
2025-07-31 18:37:38 -04:00
Antonio Martinez
63b55c0abd oni fuckup vol69 2025-06-21 23:55:28 -04:00
Antonio Martinez
d4c8fac82d Straight slowdown attempt 2: use momentum angle 2025-06-21 19:23:39 -04:00
Eidolon
820fa9b647 Allow GL-specific memoized map properties in all comp modes 2025-03-12 22:16:10 -05:00
Eidolon
cb7f437e60 Merge public master 2025-02-13 15:48:11 -06:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
Eidolon
cdd3bad813 Add level pool allocator and use it for mobj, precip, thinkers
This should substantially reduce the number of malloc/free calls made to
create and destroy mobjs, especially during level load and net
save/load.

memory_resource standard header is not available on the OSX deployment
target we are using, so I had to write my own fixed size pool allocator.
2024-10-30 09:08:04 -05:00
Sally Coolatta
87a223d5e2 New ice slope physics
Make them stronger by the same factor as acceleration is weakened. This feels a lot more natural, since your top speed tends to be higher on ice, which was making them feel strangely easier to climb ... even though driving on ice is hard mode (even in real life)

Also fixes an oversight where P_SpawnFriction was using the outdated movefactor constants from SRB2 instead of the ones from SRB2Kart that the rest of the codebase was using, by unifying it into one function.
2024-08-24 22:19:08 -04:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
AJ Martinez
6c8db5bc0e Use gamespeed multiplier checks for "hard" difficulty behavior (4th Gear compatibility) 2024-03-11 17:54:25 -07:00
AJ Martinez
1d157c4e3c Don't use Easy slope assist in tutorials 2024-01-11 20:57:54 -07:00
AJ Martinez
bc8c870172 Hill-climb assist for Easy/Battle 2024-01-10 01:46:55 -07:00
Sally Coolatta
a4911b0821 Add equation slopes to writetextmap 2023-08-27 15:49:05 -04:00
Sally Coolatta
f02e6dbe3c Final thing args code cleanup
- Fix the last few bugs I could find with thing args
- Move version update code
- Rename internal variables to `thing_[string]args` to make older code merge issues more obvious
2023-08-22 02:14:09 -04:00
Sally Coolatta
ccad5bba12 Small bird slope improvements
- Bird slopes can be made from UDMF sectors
- Group is now argument 3 on the line/sector action and argument 1 on the anchor, instead of using tags.
- The terminology no longer swaps between "tag" and "paramater" -- it's just called "group" now.
2023-06-14 07:58:41 -04:00
Sally Coolatta
9d80323a3a Read-only mapthing_t
Map things are writeable in Lua, which I am pretty certain is a mistake because mapthings are not sent over the network at all. I considered making them net-synced (it would be relatively easy), but it also aligns with another, more "philosophical" issue: Doom generally copies over properties from mapthing_t into mobj_t, and then only refers to it again when needing to respawn an object -- mapthing_t is not really intended to be referred to very often at runtime. At best it's slightly annoying since some objects rely on a spawnpoint for behavior changes, at worst it may make ACS more confusing in the future since Thing and Mobj tags are mixed together or less useful since they wouldn't be able to modify behaviors of objects that are based on args.

So I decided to solve these two issues at the same time; just treat mapthing_t as something to copy values from, like OG Doom does it. This basically just means that special and args are also part of the mobj now instead of the mapthing, which should fill any desire to edit this stuff from Lua, and reduces the number of instances where objects need to check for their spawnpoint to function properly.
2023-05-25 14:40:55 -04:00
Sally Coolatta
383bf4b604 Fix deleted line for uphill/downhill multiplier 2023-03-11 18:07:04 -05:00
Sally Coolatta
5639113ed8 Slope thrust changes
- Slope thrust is scaled with game speed. Makes Easy more reasonable, and Hard goofier.
- Slope upward/downward thrust multiplier is applied to all objects equally, instead of only players.
2023-03-11 04:59:47 -05:00
James R
f29e5d8270 Always quantize momentum on slopes, even if no physics
Lets no physics slopes launch. Travel time will be
affected by 3D surface area instead of just 2D surface.
2023-02-16 19:23:45 -08:00
MascaraSnake
915bf83172 Fix equation slopes overflow 2023-01-27 23:14:21 +00:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
Sally Coolatta
79f6d0643b Launch / step-down changes
- Launch / wall-transfer off of no-physics slopes
- Prevent step down when trying to move upwards
- E-brake enables launching again
- Removed old comment talking about slope nerf
2022-09-10 14:46:12 -04:00
Sally Coolatta
bc538a066f Fast falling
E-Brake in the air for x4 gravity, at the cost of a tiny bounce on landing.
2022-09-04 21:21:25 -04:00
Sally Coolatta
d5c384bf02 Fix even slope lighting being inconsistent 2022-05-27 18:34:52 -04:00
Sally Coolatta
f05ac93633 Fix the two big problems with the lighting
- FULLY fix light offset still being applied on full bright walls
- Fix ceiling lighting being reversed
2022-05-25 16:16:20 -04:00
Sally Coolatta
ec02e75f0d Implement directional lighting
(Sloped ceilings are reversed and not sure what to do about it)
2022-05-25 02:51:08 -04:00
Sally Coolatta
b6ed17d9fc Allow adjusting map contrast 2022-05-24 23:04:48 -04: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
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
a6690e02fa Revert "Add flag to line slopes for copying their slopes to the other side."
This reverts commit 7f969705b4.
2022-03-27 20:46:07 +01:00
SteelT
002e07dceb Merge branch 'mergeladder' into 'master'
Merge Ladder

See merge request KartKrew/Kart!558
2022-03-22 03:34:08 +00:00
Sally Coolatta
995ebae2bd Unnerf wall transfer speed
(Sorry Ramp Park...)
2022-03-20 23:50:42 -04:00
toaster
7f969705b4 Add flag to line slopes for copying their slopes to the other side.
# Conflicts:
#	extras/conf/SRB2Kart2.cfg
2022-03-18 18:30:40 +00:00
Nev3r
9992d36bf3 Add slope equation constant parsing functionality. 2022-03-18 17:53:53 +00:00
toaster
dd8acd4c61 Initialize slopes before the map loads.
# Conflicts:
#	src/p_setup.c
#	src/p_slopes.h
2022-03-18 17:53:45 +00:00
toaster
487103bc47 Remove TAG_ITER_DECLARECOUNTER and the level field on the iterator macros.
Declare the position counters inside the for loops instead; RIP C90.

# Conflicts:
#	src/p_mobj.c
#	src/p_spec.c
2022-03-18 16:43:03 +00:00
Sally Coolatta
150faf9de6 Add terrain pointer to mobj_t 2021-12-09 00:56:05 -05:00
James R
696ca049d8 Apply momentum based squash and stretch to every object
Also netsave.
2021-11-28 22:43:48 -08:00
Sally Coolatta
48c8843feb Merge branch 'master' into stair-janking 2021-04-21 21:44:23 -04:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01:00
James R
b3293aa122 Don't stair jank on really small steps
Also don't do it off slope launches.
2021-04-11 02:07:23 -07: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
LJ Sonic
85cd429d1d Revert "Replace all instances of P_AproxDistance with FixedHypot"
This reverts commit 498ff708bb.
2021-02-13 17:45:20 +01:00
James R
498ff708bb Replace all instances of P_AproxDistance with FixedHypot 2020-12-12 14:53:54 -08:00
Nev3r
003f46c18e Add a level parameter to the iterators to account for nesting, and thus avoid variable shadowing. 2020-11-12 13:48:14 +01:00
Nev3r
c22dbe1d2e rename TAG_ITER_C to TAG_ITER_DECLARECOUNTER and remove the semicolon from the macro. 2020-11-10 12:22:55 +01:00
Sally Coolatta
9dd43d4e4e Remove modeltilt, use roll & pitch instead
Broken currently, about half of the slopes you can go into have the wrong tilt
2020-10-28 18:36:26 -04:00