Commit graph

28126 commits

Author SHA1 Message Date
Eidolon
37f70cb0a2 Merge branch 'rhi-refactoring' into 'master'
RHI Refactors

See merge request KartKrew/Kart!2486
2024-11-02 17:29:54 +00:00
Eidolon
d2b3b15213 Restore imgui rendering
Was lost when pass architecture was removed; now it should work again.
2024-10-30 09:08:04 -05:00
Eidolon
fc05db7441 rhi: Use renderpasses as a stack
This way when you pop a render pass, it will restore the previous
renderpass state if there was one. Allows for rendering code to enter
and leave the default render pass without interfering with other drawing
code.
2024-10-30 09:08:04 -05:00
Eidolon
136761cf3b rhi: Remove Pipeline, Uniform/BindingSet, add dynamic state
The pipeline abstraction mimicked Vulkan and d3d12 explicit pipeline state objects
but, like GraphicsContext, was ill-considered for the kinds of drawing
behavior SRB2 uses. Rather than push this complexity into the drawing
code, it will instead be the responsibility of the backend to manage
explicit pipeline objects if necessary.

Now, drawing code must create a Program instance, bind it, and set the
rasterizer state to do the equivalent. Uniform, sampler, and vertex
attribute bindings are significantly simpler to set up now.
2024-10-30 09:08:04 -05:00
Eidolon
4499979458 rhi: Remove RenderPass object
While this has an analog in Vulkan, it is trivial to manage vkRenderPass
on the backend side. We are already having to dynamically manage GL FBOs
for binding framebuffers for drawing in begin_render_pass, so I see
little reason to keep this object around.
2024-10-30 09:08:04 -05:00
Eidolon
bba1d56529 rhi: Remove the old Pass concept
This was already slated to be removed; the old PassManager was a failed
attempt to centralize and pipeline all graphics logic for a frame. Let's
remove it as a step towards simplifying some of this code.
2024-10-30 09:08:04 -05:00
Eidolon
dae2e8ba17 rhi: Remove GraphicsContext
I've come to the conclusion that some aspects of RHI are overengineered
to suit a future where we would theoretically support Vulkan with
minimal implementation effort. In an effort of architectural astronaut
engineering this has had the consequence of making much of the code
interacting with RHI significantly more complex.

The GraphicsContext was originally an opaque object to wrap and
contextualize operations that would eventually be inserted into a Vulkan
CommandBuffer for dispatch. In practice, for the GL backend, this does
nothing but introduce another pointer to pass around across all RHI
code, when it had already been previously accepted that the idea of
recording multiple GraphicsContexts at the same time was infeasible.

Thus, I'm choosing to excise GraphicsContext entirely. This doesn't do
much except remove passing around the context object. This is one of
many changes I would like to make that would simplify RHI-related code
and defer the complexity to the hypothetical future. Vulkan can come at
a later date, and we can solve the problems of Vulkan then. Right now, I
am actually more concerned for supporting a d3d9 renderer to shore up
that Intel 945GM laptop GPU support gap we currently have.
2024-10-30 09:08:04 -05:00
Oni
9c2e4a350a Merge branch 'slope-stepup-fix' into 'master'
Fix slope stepup adjustment to not adjust on flat "slopes"

See merge request KartKrew/Kart!2487
2024-10-29 00:23:14 +00:00
Ashnal
3bab41e7e3 Fix slope stepup adjustment to not adjust on flat "slopes" 2024-10-28 18:43:47 -04:00
Eidolon
2c0642b3d1 Set audio volumes before entering main loop
Fixes an issue where the volumes would be at max before the first wipe
finishes. This is because S_UpdateSounds isn't called during wipes.
2024-10-26 15:46:12 -05:00
Sal
8ff2e13c7d Merge branch 'dump-consistency-for-the-modern-age' into 'master'
DUMPCONSISTENCY for the modern age

See merge request KartKrew/Kart!2483
2024-10-25 17:48:21 +00:00
Sally Coolatta
6bf5662ca8 Delete resynchattempts
All values besides 0 and 1 have been unused for a while. Quite frankly, if the gamestate resend doesn't fix them, a rejoin won't either, so kicking them is just adding extra steps.
2024-10-22 02:57:05 -04:00
Sally Coolatta
45bbb4826a DUMPCONSISTENCY for the modern age
- dumpconsistency cvar is always enabled (rather than a define), but is now a cheat.
- It now dumps on resend, instead of on consistency failure kick. (Those don't even happen on too many resyncs anymore, anyways...)
- It now dumps for both the server & the client that is resyncing, so there's gamestates to compare. The two files are given names with metadata so they can be matched up.

It's not great, but it was easy enough to do and more useable than having 0 tools to inspect resync at all.
2024-10-22 02:22:31 -04:00
Oni
d9bf5d26dd Merge branch 'rqdx' into 'master'
Roundqueue DX

Closes #1411

See merge request KartKrew/Kart!2473
2024-10-20 18:52:35 +00:00
Oni
8ba1e19351 Merge branch 'acs-archive-fixes' into 'master'
ACS archival fixes

See merge request KartKrew/Kart!2480
2024-10-20 18:52:13 +00:00
Eidolon
6a90097b0f Update tracy client to 0.11.1 2024-10-20 13:35:29 -05:00
toaster
40964f5556 Permit partial parameter -c (alias for -clear) on setscore 2024-10-19 13:19:40 +01:00
Eidolon
dac91d5d44 Merge branch 'convert-zone-c' into 'master'
Convert z_zone.c -> z_zone.cpp

See merge request KartKrew/Kart!2481
2024-10-19 02:43:00 +00:00
Eidolon
5257b18ade Convert z_zone.c -> z_zone.cpp 2024-10-18 21:34:02 -05:00
AJ Martinez
be377e523d Merge branch 'convert-r-textures' into 'master'
Convert r_textures.c -> r_textures.cpp

See merge request KartKrew/Kart!2479
2024-10-19 00:05:39 +00:00
AJ Martinez
3c38cabaa2 Merge branch 'vector-fps-storage' into 'master'
Use std::vector for r_fps storage

See merge request KartKrew/Kart!2478
2024-10-19 00:03:14 +00:00
Sally Coolatta
3b898c528e Do not load invalid ACS modules
BEHAVIOR being optional is now handled from our side, because using getModule or loadModule on an invalid file is supposed to be an error condition for the VM.
2024-10-18 11:06:30 -04:00
Sally Coolatta
001ae4a05b Disable ACSVM save debug signatures
Adds a lot of extra time, and I meant to remove this when I confirmed ACS in netgames was working.
2024-10-18 11:06:30 -04:00
Sal
323452df73 Merge branch 'vote-anger-fix' into 'master'
Fix map anger race condition

See merge request KartKrew/Kart!2447
2024-10-18 01:13:42 +00:00
Sal
663ea2b123 Merge branch 'fix-checkpoints' into 'master'
Fix checkpoints desyncing in netgames

See merge request KartKrew/Kart!2474
2024-10-18 01:09:21 +00:00
Sal
067a1007da Merge branch 'more-saveg-fixes' into 'master'
Several netsave fixes / improvements

See merge request KartKrew/Kart!2475
2024-10-18 01:08:07 +00:00
Eidolon
96a39fd45b Convert r_textures.c -> r_textures.cpp 2024-10-16 21:30:23 -05:00
Eidolon
2cad0b0cc0 Use std::vector for r_fps storage
This isn't an optimization for the mobj pointer list, but it is an
optimization for level interpolators, which previously made N
allocations for N non-mobj thinkers. Now those allocations are amortized
according to std::vector's storage.

This could still be further cleaned up to be more C++-ey.
2024-10-16 20:22:01 -05:00
Eidolon
59eb36eb91 Merge branch 'convert-r-fps' into 'master'
Convert r_fps.c -> r_fps.cpp

See merge request KartKrew/Kart!2477
2024-10-16 23:17:51 +00:00
Eidolon
61d3f14621 Convert r_fps.c -> r_fps.cpp 2024-10-16 18:07:39 -05:00
Sally Coolatta
71ec8e3f4e Archive line tag list
Sectors do this, so why don't lines? Are they stupid?
2024-10-13 01:43:48 -04:00
Sally Coolatta
c4cca8c8b7 Attempt to encode less for objects
- Don't encode radius, height, or scale if they are at mapobjectscale
- Don't encode watertop if it is INT32_MAX (its actual initial spawn value)
2024-10-13 01:29:18 -04:00
Sally Coolatta
aae9374b0a Create doomednum lookup for loading mobjthinkers
Cuts off 10% of the time it takes to load mobj thinkers.
2024-10-12 23:02:31 -04:00
Sally Coolatta
4f77c9f228 Reload from spawnsectors/spawnlines/spawnsides
I do not trust memcpy due to the rendering bug even though it appeared to mostly work, so I did it manually. It's still order of magnitudes faster than reloading the level from scratch.
2024-10-12 22:24:12 -04:00
Sally Coolatta
353af883aa Add deep copy functions
Does allocation, a memcpy shallow copy, and a callback to handle memory addresses if desired. Might be reusable for runahead saves.
2024-10-12 12:39:36 -04:00
James R
e68bb676db Fix netsync of race checkpoints and associated map lines
- Use srb2::MobjList to keep checkpoint objects list
  intact after savegame load
- Use std::unordered_map of line tag and vector of line_t
  pointers
  - Use line tag for the key so multiple checkpoints may
    be associated to the same set of lines
2024-10-12 02:27:30 -07:00
Sally Coolatta
e3ccc4f0ea Fix UnArchiveSectors not actually adding tags
It was removing tags and then also removing the new ones, instead of removing tags and adding the new ones. Netsaves are so fucking scuffed.
2024-10-11 20:09:19 -04:00
toaster
ff7bb5cd2b Rework showscores command
Prints a full, ordered table of results, basically equivalent to intermission.
Much closer to the kind of logging one would want for tournament play, rather than the SRB2 leftover this command was holding previously.
2024-10-11 13:46:43 +01:00
toaster
5b4d771f28 D_SetupVote: Fix minor memory issues
memset takes UINT8-based arguments and cannot set UINT16_MAX
2024-10-11 13:46:39 +01:00
toaster
6578cf1b56 Rework the map command suite a little
The following funcs are now a suite with almost-identical argument lists.

- `map` is for immediately going to a map
    - Add `-random`/`-r`
- `queuemap` is for interacting with the live Round Queue
    - Add `-random`/`-r`
        - Performed server-side
    - `-clear` and `-show` now accept partial params `-c` and `-s`
    - Fix minor error with 0-argument print's text
- `showmap` is for printing information
    - Add arbitrary map name/ID input
        - `showmap robo` prints the course `map robo` would resolve to
    - Add `-gametype`/`-gt`/`-g`
        - For compatibility testing
    - Add `-random`/`-r`
        - Combine with `-gametype` for extra guarantees
- `randommap` was deprecated
    - Will only print replacement instructions of `map -random`, and nothing else
2024-10-11 13:46:36 +01:00
toaster
a8d8a10319 G_GetNextMap cleanup
- Lost & Found courses are now part of the intended sequence of `advancemap next`
    - Does not include Test Run, that's admin choice only
- Courses with too-small playerLimits will be skipped for both `advancemap random` and `advancemap next`
    - Resolves KartKrew/Kart#1411
2024-10-11 13:46:33 +01:00
toaster
63aaec65b1 Add roundqueue -show
Reveals the next Round in the queue via server shout message.
Can be used manually, or with automate commands for tournament rulesets that permit foreknowledge of the next Round without requiring the host to work off memory or document.
2024-10-11 13:46:30 +01:00
toaster
512ec6c2eb XD_REQMAPQUEUE --> PT_REQMAPQUEUE
It was technically possible for custom clients to spoil future rounds of a tournament queued while they are connected to a server.
Making it a PT direct packet to the servernode both solves this problem AND reduces irrelevant NetXCmd traffic for clients.
2024-10-11 13:46:26 +01:00
toaster
8bd50ddb65 clearscores is now setscore
- `setscore 0 50` will set the player in slot 0's score to 50 points
- `setscore 0 50 -add` will add 50 points to their score
- `setscore -clear` will clear all players' score, as per the old function
- Command will error if PWR is in use (no roundqueue/`usepwrlv 0`/cheats off in GP)
- The previous cheat `setscore` is renamed to `setroundscore`
2024-10-11 13:40:11 +01:00
Eidolon
f579d25770 Merge branch 'saveg-fixes' into 'master'
p_saveg fixes

See merge request KartKrew/Kart!2472
2024-10-08 00:28:16 +00:00
Antonio Martinez
7d584c1f79 Fix mobjcache memory leak after reloading gamestate
Weird history splice from 711804be
2024-10-07 19:15:51 -05:00
Antonio Martinez
b3086d011d Convert p_saveg to C++ 2024-10-07 19:15:51 -05:00
Sal
39a0724db6 Merge branch 'no-snull' into 'master'
SOC/Lua null struct safety

Closes #1488

See merge request KartKrew/Kart!2469
2024-10-05 15:26:06 +00:00
Sal
7ad44ec693 Merge branch 'fix-overtime-resync' into 'master'
Fix Battle Overtime resync under certain conditions

Closes RingRacers#205 and #1353

See merge request KartKrew/Kart!2468
2024-10-05 15:25:44 +00:00
Sally Coolatta
9cce0811d8 Fix flipped G_SameTeam in K_FindJawzTarget 2024-10-04 19:20:07 -04:00