Commit graph

215 commits

Author SHA1 Message Date
toaster
b8f59fd227 Skin and playerstate code in demos has been partly rewritten to support more than was previously possible.
Notable new features:
- Guaranteed native compatibility with SF_IRONMAN even with differing # of skins
- Bots (todo: can still desync midway through round)

Implementation details:
- Demo code (skins):
    - Instead of writing a skin name string, and the player's kartspeed, kartweight, and charflags for each player in the initial player-interpreting loop...
    - Write a skinlist of EVERY skin's name string, kartspeed, kartweight, and flags next to the file list, to be read into `demo.skinlist`.
        - If the skin name isn't loaded, find the skin with (in order)
            - SF_IRONMAN if your skin had SF_IRONMAN, since that's more important to signal
            - the closest stats otherwise (as per previous implementation)
        - Just as tolerant to stats AND the number of base skins changing between versions (the bonuschars aegis situation)
        - Not tolerant to restat, but we can add a DXD or EZT later if we want to natively support that kind of mod
    - In the initial loop and DXD_SKIN, just write an index that can be used for `demo.skinlist`, and store it in `demo.currentskinid[p]`
    - The player's skin is now encoded as EZT_IRONMAN for ghosts (and just in case RNG sync fails for unrelated reasons)
- In the SF_IRONMAN code when demo.playback is true
    - everywhere where `skins[player->skin]` is referenced instead uses an index into `demo.skinlist`
    - SetRandomFakePlayerSkin uses the `demo.skinlist` to build a table to ensure exact random call parity
        - Also means it no longer double rejection-samples.
    - `player->fakeskin` and `lastfakeskin` are always == their original recording values, a skin id which can be used into `demo.skinlist`
- Demo code (playstate, initial player setup loop):
    - Add bot flag (`DXD_PST_ISBOT`, `DEMO_BOT`)
    - Add in-between-level botvars (difficulty, diffincrease, rival)
    - Don't rely on `PF_WANTSTOJOIN` to activate

Additional bugfixes:
- Followerskin set to -1 in CL_ClearPlayer so a bad follower isn't recorded on player join without name and color change arriving immediately
- Accomodate new joiners in demo code even if they're not on DXD_PST_SPECTATING for one reason or another
- Demo extra file list saving is now its own function for code cleanliness
- Actually only modify players relevant to the demo at the end of G_DoPlayDemo, not all 16 by supplying and overwriting garbage values (POSSIBLE MEMORY CORRUPTION FIX, mobj_t pointer was previously dereferenced)
2022-11-22 14:28:48 +00:00
toaster
e65d17cd4d Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into ironman
# Conflicts:
#	src/g_demo.c
2022-11-21 15:49:29 +00:00
James R
4316169d99 Fix -Wtype-limits
This subtraction cannot yield a negative value, even if
the type were signed, so the max is useless.
2022-11-19 01:37:12 -08:00
Oni
996e3c97ef Merge branch 'banana-vfx' into 'master'
Banana visuals

Closes #308

See merge request KartKrew/Kart!772
2022-11-19 00:47:21 +00:00
Oni
2d67c0c460 Merge branch 'chengi-nums-fix' into 'master'
Chengi's position numbers from months ago finally implemented (again)

See merge request KartKrew/Kart!769
2022-11-19 00:45:50 +00:00
Sally Coolatta
d0cd25328e Remove decabanana 2022-11-18 02:34:59 -05:00
Sally Coolatta
d0a3e4704d Make position number scale vary
- Before: always x2
- With "normal screen" (1P, 3P, 4P):   x1.75
- With "wide splitscreen" (2P): x2.5
2022-11-17 23:48:06 -05:00
Sally Coolatta
2d200c1361 Fade-in position number after GO 2022-11-17 23:02:44 -05:00
Sally Coolatta
5f20d5a3ac Smooth scale-up 2022-11-17 22:46:26 -05:00
James R
0d5d1c7a09 Invert yaw diff in reverse HUD tracking
This fixes the player CHECK moving in the opposite
direction of what it should across the screen.
2022-11-17 18:50:29 -08:00
Sally Coolatta
0233c26386 Chengi's new position numbers 2022-11-17 21:11:01 -05:00
Sally Coolatta
29595f946b Add V_VFLIP
Ironman can now be shitty
2022-11-03 08:47:44 -04:00
AJ Martinez
565a6de546 Ironman: Don't flip minirankings until you're actually transformed 2022-11-03 04:15:38 -07:00
AJ Martinez
8cc535925b Ironman: Randomize every lap and after intro 2022-11-03 03:38:55 -07:00
AJ Martinez
86366b000c HOSTCODE 'ironman' - WIP 2022-11-03 03:38:54 -07:00
toaster
fca6dc2c6f No contesters use the position of their broken kart on the minimap
This is instead of their flung body, which drifts significantly from where you died and muddies the "LOL YOU DIED THAT CLOSE TO THE FINISH!?" voicecall laughter moments
2022-10-16 14:54:13 +01:00
toaster
3bb78ad46d Always show timelimit if timelimitintics is set, to allow spotting weird bugs before they cause problems 2022-10-16 14:34:13 +01:00
toaster
ce020d7207 timelimitintics-related shenanigans
- Play a countdown sound (same as introcountdown) per each of the last 3 seconds
- Jitter the time display HUD extra strong in a two-tic window around the above
- Fix timelimitintics not being set in TESTOVERTIMEINFREEPLAY builds (which is now all DEVELOP builds)
2022-10-16 14:21:52 +01:00
toaster
a7a2956b89 Add extra minimap icons
- Battle Capsules for Break The Targets, to improve conveyability
- No Contest players have a special X icon
Also fixes a few issues with minimap rendering
- obviously written before netsplits and bots
- mixing up array indices and loop iteration for local players
- mixing up SPB object and target
- old version of hyudoro with double time in Race
- using explicit gametype comparisons instead of gametype rules
- SPBs with hitlag disappeared from the minimap
2022-10-16 13:21:12 +01:00
toaster
e7f111c25a Fix the case where GP coop would cause no Capsules + possibly DUELs in eventmode
Also reduces some of the dead time before Break The Capsules begins by cutting out the majority of POSITION!! and hiding the one measly bulb that would otherwise appear
2022-10-15 14:57:35 +01:00
toaster
f281f47c6f Support alternate gameplay events during GP
- Implementation details:
    - grandprixinfo.eventmode is the reference point
    - All bots have spectator applied and removed at map start depending on eventmode, and I've done my best to guard against side effects of not removing them entirely
    - You shouldn't turn off grandprixinfo.gp when turning on things like specialStage.active or bossinfo.boss when pursuing eventmode behaviour
    - Probably needs to be integrated into XD_MAP for any future netplay support, is currently disabled.
    - You technically don't have to assign a Capsules map to be the bonus and a Special Stage to be the special. A Capsules map can be assigned to a Special Stage too, and a Boss can be assigned to either of them.
    - Special Stages are still just as incomplete as they were before.
- Break the Capsules has special behaviour.
   - Timelimit starts at 20 seconds.
   - Earn 10 seconds (plus a little extra cheaty time) every capsule you destroy.
   - WIN + extra life if you bust all the capsules, COOL if you get some but run out of time, LOSE if you lose your bumper or run out of time without breaking a single capsule.
   - Supposed to also give you rings, but ran into a LOT of difficulty with this and didn't want to commit half-baked stuff, so it'll be a later project.
Also:
- Fix a long standing bug where totalring was reset between maps, preventing the sum from adding up across GP rounds and depriving you of extra lives you were owed.
- Fix an issue where Break the Capsules record attack was KARTSPEED_HARD.
- Send timelimitintics in savegames, since it's handled seperately now.
2022-10-14 18:34:43 +01:00
toaster
c2ef5a32e9 Seperate FINISH text from khud_cardanimation
- Fixes an issue where the card animation and the FINISH animation operating on two different timers, but using the same variable, would intefere with each other
- Also makes khud_fault use the same drawer, so it can benefit from interpolation
2022-10-13 18:14:48 +01:00
toaster
99705faea6 Add a goofy little jitter to the HUD
- Medium strength at 5 seconds to go
- Big strength in overtime
2022-10-11 23:03:56 +01:00
James R
f891535065 Remove kartdebugcheckpoint, merge into debugwaypoints 2022-10-01 17:44:07 -07:00
James R
08f9628e6c Remove kartminimap, kartcheck, kartcomeback cvars 2022-10-01 17:04:48 -07:00
James R
7b301452cc Add Garden Top related states
MT_GARDENTOP
S_GARDENTOP
KITEM_GARDENTOP
KSHIELD_TOP
2022-09-28 00:07:25 -07:00
James R
d66b82605b Cleanup order and indentation of item definitions 2022-09-28 00:07:00 -07:00
toaster
fe49543456 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers 2022-09-24 19:53:36 +01:00
James R
42c6f4fe92 Fix HUD drawing crash if 1 or more KITEM_NONE
blame 375fb72de
2022-09-24 02:47:52 -07:00
toaster
c1dbbdf801 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers 2022-09-23 17:38:49 +01:00
Sally Coolatta
4952a2d2ae Merge branch 'master' into new-spb 2022-09-23 11:41:53 -04:00
James R
375fb72de1 Add K_GetRollingRouletteItem, refactor item drawers
Roulette now cycles through all single items (that have
odds). Added missing shields and drop target.
2022-09-23 04:09:32 -07:00
Sally Coolatta
f89d8d15c2 Properly separate SPB & Shrink cooldowns
Also refactors some of the result -> type & amount code
2022-09-23 03:35:18 -04:00
Sally Coolatta
47293d1d9f Improve debug distribution, rebalance SPB spawning
Might be too far in the other direction, we'll see
2022-09-21 21:02:05 -04:00
Sally Coolatta
34aa00ab0d Fix drop target cvars & debug distribution 2022-09-21 19:48:57 -04:00
toaster
abb567ab81 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers 2022-09-21 23:06:24 +01:00
Sally Coolatta
0e7d9ba84e Merge branch 'master' into new-spb 2022-09-21 11:18:31 -04:00
Sally Coolatta
7b77998523 Remove SPB 2nd place bonus odds
Was a fun idea while it lasted, but we would like to give it more "tangible" buffs to players now, rather than trying to rig the casino.
2022-09-21 02:27:34 -04:00
AJ Martinez
ada40b421c Mindelay: Never draw ping outside of games 2022-09-20 20:29:34 -07:00
AJ Martinez
e242207d10 Mindelay: Oni suggestions rollup 2022-09-20 19:01:54 -07:00
Sally Coolatta
fac7bb0627 Merge branch 'master' into item-bungus 2022-09-16 06:56:23 -04:00
SteelT
c64f36309a Support reading PICTURE/MINIMAP/ENCORE/TWEAKMAP lumps from a map resource
This supersedes the header-based method of fetching those lumps.
2022-09-12 17:29:15 -04:00
SteelT
e1ad0bef7c Comment out some things for now
Just so I can get in-game without crashing during testing
2022-09-12 12:47:00 -04:00
Sally Coolatta
2fddc9f343 Merge branch 'master' into big-large-map-markers 2022-09-10 16:01:02 -04:00
toaster
f07a65d015 Adjust x coordinate of "FREE PLAY"
Broken by new font, made sense to change it where that new font was most relevant
2022-09-05 14:46:46 +01:00
Sally Coolatta
107622968e Merge branch 'master' into new-menus 2022-08-27 22:36:58 -04:00
Sally Coolatta
429f61966e Merge branch 'master' into item-bungus 2022-08-23 23:42:21 -04:00
James R
f8b82bd28f Fix compiler error 2022-08-18 01:06:21 -07:00
Sally Coolatta
ebb34ff9d4 Lap based power level 2022-08-14 06:00:37 -04:00
Sally Coolatta
e2ac698247 Make Ballhog more interesting
- No more instant fuck you button. You charge up a meter instead by holding down attack, and let go to fire as many as you charged up. Tapping fires one out of five, holding for the entire duration shoots out all five like before, but anything inbetween is also possible.
- Ballhog projectiles scale up over time (like Contra spread shot), to help make it stronger again after players started getting faster.
2022-05-27 17:51:47 -04:00