Commit graph

363 commits

Author SHA1 Message Date
toaster
a4ef43442f Command_CountMobjs_f: Add mobj names to output
Was essential for debugging the previous commit
2025-08-18 20:00:29 +01:00
Eidolon
892a6b8620 Merge public master 2025-08-12 16:49:14 -05:00
Eidolon
255570cfca Dynamically allocate skins
This avoids an issue where the skins array takes up a fixed, but large
amount of memory at runtime. On x86_64 linux, that array is roughly 80
megabytes in memory, most of which is unused when the game is unmodded.
Instead, we treat `skins` as a dynamically resizing array, and it is an
array-of-pointers into separate allocated `skin_t`.

This is based on Lactozilla's skin limit MR for SRB2, but I've rewritten
it because RR has diverged quite a bit.

This was verified to check every access of `skins` by using clangd's
find-all-references function. However, I have only tested plain skins,
not Lua addons, so that could afford some extra checking.
2025-08-12 15:33:00 -05:00
Oni VelocitOni
03d9430bb9 Merge branch 'replay-kms' into 'master'
demo improvements (why)

See merge request kart-krew-dev/ring-racers-internal!2598
2025-06-02 21:30:45 +00:00
eebrozgi
6c790348b3 Rocket sneaker boost type separated from normal sneaker
monkey copypaste
2025-06-02 20:17:46 +03:00
toaster
e4907227fc New simpler rewind code + re-enable in UI
- Built off g_fast_forward to utilise a lot of existing structure
- Only does steps of 5 seconds and therefore isn't precise, but that's better than having to rewatch/fastforward through the entire thing
- No single frame step back or general in-motion rewind preview, but that was all overkill
2025-06-01 00:02:19 +01:00
toaster
09e23e6e18 Rip out all the rewinding code
It was all messy and none of it is called in release builds because it was so crashy in testing
2025-06-01 00:02:19 +01:00
toaster
9e0510d674 Improve Demo end handing
- Demos/Ghosts that end before ticking once are now correctly ignored. (Resolves KartKrew/RingRacers#168)
    - There was code for discovering it on read! It was just placed slightly too early, probably due to the conversion for netreplays! I'm very mad!
- As a preventative measure, demos *recorded* before ticking will simply not save in the first place.
    - This was also a frustratingly easy fix for the amount of headache it's caused us.
- Reduced the amount of copypasted boilerplate by simplifying the places where DEMOMARKER can be written (and therefore read).
    - Previously, like half the write functions tried to guess their own output size and potentially end the demo at any point.
    - At best, this will grant us a few tics of reprireve for large netgames and MAYBE a handful of seconds for time attack, The Mode In Which The Aim Is To Go Fast.
    - Instead, double the size of the deadspace buffer extension and just check to see if we've crossed into that territory.
2025-06-01 00:02:19 +01: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
Sal
653766010d FRIENDCODE (aka, Teamplay) 2024-09-17 01:41:26 +00:00
Ashnal
70ad221aa0 Sneaker Lift 2024-08-25 23:50:10 +00:00
Sally Coolatta
80ac9210c5 PostThinkFrame during run only
It's scary that it wasn't doing this before!
2024-05-15 18:46:59 -04:00
toaster
f1c9f54727 Count SPB Attack as a subset of Time Attack, not seperate 2024-04-06 21:47:28 +01:00
toaster
ee41d309f5 P_Ticker: Fix tracking Attacking modes
- SPB: The standard set-up has ATTACKING_TIME in addition to ATTACKING_SPB, so the _TIME check first prevented it from ever being ticked
- SPB: Check for encoremode instead of ATTACKING_SPB, to cover Versus SPB as well
- All Attacking modes: Check for != ATTACKING_NONE just in case we add other potential modeattacking configurations later
2024-04-06 20:54:19 +01:00
Eidolon
23e4df3c90 Add per-map time stats and TA/SPB time stats 2024-04-06 11:25:31 -05:00
Eidolon
3ebe235154 Add total netgame time stat 2024-04-06 11:25:31 -05:00
Eidolon
c22d6d75db Add several skin record stats, profile rounds 2024-04-06 11:25:31 -05:00
Eidolon
a0d52ddacd Add per-gametype time stats 2024-04-06 11:25:31 -05: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
James R
192c770c16 Hold up/down for 2 seconds while not moving to pan the camera vertically 2024-04-02 19:23:53 -07:00
James R
95216563a6 Interp: do not update view interpolation state during sped-up tics
- If you called R_ResetViewInterpolation once but G_Ticker
  got called more than once, then the effect of
  R_ResetViewInterpolation would be cancelled
- This should be a comprehensive solution to the titlemap
  camera bug
- Multiple tests:
  - -skipintro
  - -warp, then exit to title
  - map command, then exit to title
  - Wait for attract demo, then skip and exit to title
2024-03-18 04:15:52 -07:00
James R
d3034bba54 Menus/Sound Options: add Continuous Attack Music option
- On by default (current behavior)
- Off
  - Restart music in Attack modes
  - Also plays POSITION music
2024-03-13 22:43:35 -07:00
James R
ed4c4d8363 Time Attack replays: let tally finish even if replay data ends during tally
- If tally is skipped, the replay will be cut short
- Just stop reading the demo if this happened after the
  tally started
- It's okay to let the level continue without any input
  because the player already finished (we know the result)
2024-03-12 06:18:44 -07:00
James R
9e99efc08c Refactor level music playing code
- Use one function so we don't duplicate the checks for
  music that isn't supposed to be interrupted by a restart
2024-03-09 06:32:37 -08:00
James R
0707c9e5ec Add g_musicfade, generic system to fade out the level music for a brief period 2024-03-08 17:53:07 -08:00
James R
adf58933b3 Do not run Overtime ACS outside of GTR_OVERTIME or during Prisons 2024-03-07 03:06:38 -08:00
James R
38e1ae1c53 Replays: let name be changed any time until the file is saved 2024-03-03 06:30:54 -08:00
Eidolon
5ddab93579 Add DeferredStartTitle in P_Ticker 2024-02-27 19:51:23 -06:00
Eidolon
217f19158f Play and don't reset nonsynced level music in TA
Fixes KartKrew/Kart#1064
2024-02-24 18:07:57 -06:00
Oni
4ea946067a Merge branch 'srb2-tidy' into 'master'
Clear out unused SRB2/Kart stuff from info tables

See merge request KartKrew/Kart!1811
2024-02-03 19:40:52 +00:00
Sal
3958c15dfe New Credits 2024-01-28 23:31:30 +00:00
toaster
6fdec66dc3 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into srb2-tidy 2024-01-26 00:29:06 +00:00
Oni
1d8999923c Merge branch 'fix-postrace-rumble' into 'master'
Fix gamepad rumble freezing when it should stop (resolves #955)

Closes #955

See merge request KartKrew/Kart!1857
2024-01-25 14:48:25 +00:00
James R
d0057126e6 Battle: make level darkness more dark by default 2024-01-22 16:42:30 -08:00
James R
7d6239e06c Add round end camera system
- Spins and zooms around a center point
- Freezes the level while spinning
- Pans over to follow and object after spinning ends
- Timing and speed completely customizable
2024-01-22 16:42:29 -08:00
AJ Martinez
5f1b8bb3b8 Fix gamepad rumble freezing when it should stop 2024-01-19 19:03:33 -07:00
AJ Martinez
1e39081856 WIP: Mid-round status messages 2024-01-14 03:05:49 -07:00
toaster
325079a39a Delete everything major flagged up by listunusedsprites
Notable deletions:
- Metal Sonic Race
    - Includes all the specialised recording/playback apparatus which made g_demo.c harder to read
- A bunch of hyperspecialised code inside several A_ actions
- EXCEPTION: intentfully left in the spriteless SMK stuff for Sal's add-on down the line.
2024-01-11 01:21:43 +00:00
James R
df0d342e04 Let level darkness be changed per splitscreen, use player_t variables
Modifies netsave.

- Add darkness_start, darkness_end to player_t
2024-01-05 15:56:24 -08:00
James R
8430489673 Replace darktimer/darkness with g_darkness
Modifies netsave.

- Instead of setting a timer, set a start time and end
  time
- Interpolated darkness value itself doesn't need to be
  netsynced
2024-01-05 15:56:24 -08:00
AJ Martinez
3b425667e5 Disable stairjank terrain and offroad rumble at 0 speed 2023-12-28 23:47:03 -07:00
James R
51d9e4bf4b P_Ticker: fix typo playing level music 2023-12-08 17:32:29 -08:00
Oni
6378c9d544 Merge branch 'no-position-no-music-reset' into 'master'
Do not reset music in Sealed Stars and Tutorials

See merge request KartKrew/Kart!1676
2023-12-08 04:37:17 +00:00
James R
be8d8178bb Add level_nosync tune, played if GTR_NOPOSITION
- Does not reset if level music does not change between
  levels
2023-12-04 20:19:55 -08:00
James R
02bacc9a6f Battle UFOs, Checkpoints: use srb2::MobjList instead of standard containers
- Net synced; new mechanism in p_link.cpp to automatically
  manage mobj pointers at the global scope
2023-12-03 10:44:11 -08:00
toaster
a55803b690 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into other-progression 2023-11-18 18:00:05 +00:00
toaster
224d584203 Cleanup of P_Ticker gamedata material
- Don't do updates in titlemap
- totalplaytime is leveltime-based
2023-11-17 16:45:03 +00:00
toaster
f6214fd8e9 Tutorial dialogue: Synergy wth titlecard
- Draw in front of the titlecard
- Don't tick while levelloading and not leveltime, so prevent instantly appearing
2023-11-13 21:34:26 +00:00