Commit graph

75 commits

Author SHA1 Message Date
James R
7ce12f37dc Spawn Battle monitors
- Item count has always scaled up with player count. Items
spawn every N tics. Previously, these items were evenly
distributed across all item spots. Now, only one monitor
is spawned at a time and the number of items inside scales
up.

- Emeralds spawn inside of monitors instead of loosely.
- Sphere boxes should spawn in the same way as before.

- Once a monitor has been spawned at an item spot, no more
monitors can be spawned there until that one is destroyed.
There's an additional delay of one spawn interval before
a monitor can be spawned in that location again. This is
so a monitor cannot ever instantly spawn back if one is
destroyed at just the right time.
2023-01-03 05:31:30 -08:00
Oni
46005089f1 Merge branch 'rulesify' into 'master'
Rulesify (resolves #375)

Closes #360 and #375

See merge request KartKrew/Kart!836
2023-01-03 02:43:52 +00:00
James R
71004d4b46 Halve spawn time for Battle items 2023-01-01 18:38:53 -08:00
James R
3965f77763 Add BATTLE_SPAWN_INTERVAL 2023-01-01 18:38:53 -08:00
James R
43aa162fcb Add K_GetChaosEmeraldColor 2023-01-01 18:38:53 -08:00
toaster
c23a2d8dca Don't force a reset of the level in GTR_BUMPER when lonesome if not GTR_CAPSULES 2022-12-31 22:49:20 +00:00
toaster
17dd15b998 "Special Mode" (Sealed Stars) and "Versus Mode" (bosses) are now gametypes
* The existing structs are now exclusively for handling extra data.
    * `specialStage` has been renamed to `specialstageinfo`, to reflect that it is not the sole arbiter.
    * `specialstageinfo.valid` and `bossinfo.valid` are what must be checked before grabbing data from either struct.
        * These are turned on when the gametype extra data is successfully initialised, not on map start.
            * `K_InitBossHealthBar(...)` for `bossinfo.valid`
            * `K_InitSpecialStage(void)` for `specialstageinfo.valid`
        * `K_CanChangeRules(...)` no longer checks these
    * No longer uses duplicate encore information.
* The map command (and -warp) now guesses gametype using a general `G_GuessGametypeByTOL(UINT32)` function
    * Grabs the first gametype with an overlap between the requested TOL and the gametype's TOL.
* The cool Versus-specific intro is now checked via `K_CheckBossIntro()`.
2022-12-26 23:06:24 +00:00
toaster
8431e52687 All playsim-internal distinctions between Race and Battle are now gametype rules.
New:
- GTR_POWERSTONES
    - Handles spawning in Battle Emeralds (currently only works stacked with GTR_PAPERITEMS)
- GTR_ENCORE
    - Codifies that Race can use Encore and Battle can't.
- GTR_CLOSERPLAYERS
    - A gametype where players are encouraged/expected to be closer together. (All of the following was GT_BATTLE specific)
        - Drafting/tether has increased strength/effective distance
        - Spindashing is stronger
        - Invincibility chaining has less effect
        - Grow has a lower total duration
        - Flame shield is more uncontrollable

Extra functionality
- GTR_CAPSULES
    - Prevents usage of lives in Grand Prix (so Race, and the upcoming Special and Boss gametypes, can have 'em)
- GTR_CIRCUIT
    - When not present, Flame Shield has perma-full meter
    - When not present, overrides gamespeed with KARTSPEED_EASY
    - Presence of Best Lap sticker in Time Attack menu
    - Seperation between Time Attack and Break The Capsules modeattacking roulettes
- GTR_POINTLIMIT
    - Handles the switch between a gametype recording/displaying Times and Scores in a few places
    - Handles displaying "WANTED" players on the minimap

Missing simple substitutions
- A whole bunch of cases where player->bumpers was checked with gametype == GT_BATTLE rather than GTR_BUMPER
- GTR_OVERTIME handles the overtime special icon on the minimap
- GTR_BATTLESTARTS is honoured in K_DoIngamerespawn
- The Replay hut is closer to supporting custom gametypes

Removals
- GTR_LIVES
- GTR_SPECIALBOTS
    - Given that grand prix persists between modes, these are special game-controlled features and not gametype-specific.
- GTR_WANTED
    - WANTED as it existed is functionally dead
2022-12-24 22:43:00 +00:00
James R
58bb648b0a Merge branch 'udmf-cherrypick' into 'master'
Update our UDMF

Closes STJr/SRB2#862

See merge request KartKrew/Kart!727
2022-10-29 06:54:48 +00:00
toaster
ca2ecf6e9f Add "allowdemos" option to K_CanChangeRules()
It's been used interchangably as "this is a singleplayer gameplay context" and "This is a no cvar changing context". This addition repairs some behaviour which might have been inconsistent between netgame and netreplay.
2022-10-15 15:15:22 +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
c8471c7c27 Rework exit timing nittygritty
- exitcountdown is now used for both No Contest and regular exits
    - Set in P_DoPlayerExit
    - Handles sending XD_EXITLEVEL in P_Ticker
- player->exiting is now 0 or 1 (we can make it a bool or a new timer later)
- Fixes a longstanding bug where failing a GP round could restart multiple times
Also:
- Fix a possible waiting-in-the-wings issue where mapchanges would occour client-side in K_CheckBumpers
- Add `gptest` cheat - sets numlaps to 1 lap on mapload for quick but legitimate(ish) progression
2022-10-13 17:37:35 +01:00
Sally Coolatta
c1581d0f75 Egg Capsules use args + optimized tube waypoints 2022-10-10 07:48:55 -04:00
toaster
d8bb2fe8fe Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into setangle
# Conflicts:
#	src/k_kart.c
#	src/p_enemy.c
#	src/p_mobj.c
2022-09-26 16:25:06 +01:00
Sally Coolatta
139d6f4a49 Merge branch 'master' into rng-states-2 2022-09-25 14:04:19 -04:00
toaster
60355d9efd Move two of the three remaining NUMMAPS arrays part of the mapheader_t struct
- mapvisited and recorddata_t (previously mainrecords)
- Changed how gamedata is saved and loaded
- Change the versioncheck (funny hex provided by chengi) AND call it `developringdata.dat` in develop builds
- Fix a bunch of off-by-ones in condition and emblem data
ALSO, for Time Attack:
- Fix menu not showing off your times
- Now save times even when gamedata modified, since the menu didn't care (come back to it?)
- Don't save times or do intermission screen if the Capsule Attack ended because you lost all your bumpers
- Fix a crash adding ghosts in Capsule Attack
2022-09-21 22:12:36 +01:00
Sally Coolatta
1563660a39 Add a few RNG classes
- PR_ITEM_ROULETTE: Used for item results
- PR_ITEM_RINGS: Flung ring direction
- PR_ITEM_SHRINK: Shrink gun offsets
- PR_PLAYERSTARTS: Battle mode player starts
- PR_TERRAIN: TERRAIN particles
- PR_DECORATION: Generic decoration
- PR_VOICES: Player voice sounds
2022-09-19 00:55:11 -04:00
Sally Coolatta
a60d4a13a1 RNG classes, take 2
Redone version of my old branch
2022-09-19 00:04:57 -04:00
toaster
3a4b485c5d Remove P_InitAngle and its kin, considered on a case-by-case basis for also setting old_angle as well. 2022-08-25 11:35:09 +01:00
Sally Coolatta
d8b7967a22 Make all instances of this sine use M_TAU_FIXED 2022-05-23 13:38:53 -04: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
1ac2730ced Fix a signedness comparison warning in K_CheckBumpers. 2022-03-17 17:01:07 +00:00
toaster
723c479388 Resolve Battle score ties caused when Luigi wins by doing nothing. 2022-03-07 14:12:58 +00:00
toaster
bf43784d22 This is a doozy...
HUD:
* Miniaturised Spheres and Emeralds HUD for 3P/4P.
* Repair 3P minimap.
* Move accessibility icons in 3P/4P to next to the lap/bumper sticker (currently only kickstartaccel exists)
* Change language on menu retry to be more generalised.
* Adjust HUD code structuring a bit.

MECHANICAL:
* Now correctly set number of bumpers in Break the Capsules to 1 (from 3).
* The above required reworking K_SpawnBattleCapsules into K_BattleInit, which is a good staging ground to handle more battle-specific setup in future.
* Do not spawn Emeralds or Sphereboxes in Break the Capsules.
* If everyone is WANTED... nobody is.
* Try to handle exceptions to timelimits a little more thoroughly (still not perfect).
* Disable pointlimits in bosses.
2022-03-05 22:31:43 +00:00
toaster
329c2a60a2 Fix item boxes not spawning in Break the Capsules.
Specifically, they turn invisible on tic 0, then make a decision about whether to replace themselves with MT_PAPERITEMSPOT or simply become visible (with an explosion puff, same as how they respawn) when starttime is reached.

This delay also applies to Race, which I think is a good thing, considering Item Capsules already are not collectable during POSITION, but I can change it if others disagree.
2022-02-27 17:11:18 +00:00
toaster
c1f3237157 Boss API + assorted relevant bugfixes, will go over the featureset of this branch with a fine toothed comb when it's time to write the merge request description so this is all you're getting right now 2022-02-24 21:19:03 +00:00
Sally Coolatta
b31d66e7f8 PLEASE NO RNG 2022-01-05 05:10:09 -05:00
Sally Coolatta
cc250afd45 P_InitAngle, to fix angle interpolation on spawning objects 2021-12-24 12:45:51 -05:00
Sally Coolatta
cfe8a1bfa4 No random chance for sphere box
Asked Oni how it should be done, he said item + sphere box at the same time
2021-12-15 21:21:54 -05:00
James R
1140410e2c Spawn SPHERE BOXES randomly in Battle
They look like random item boxes (the ones in Race) but
have a blue sphere inside of them. One box is worth 10
blue spheres. More boxes spawn during Overtime.

New sprite: SBOX
2021-12-14 01:05:42 -08:00
James R
f6e6c2010e Reintroduce battle overtime barrier minimum radius
- 768 fracunit minimum.
- Emerald spawning arc reduced so they spawn right next to
the barrier at minimum radius.
- Items always spawn.
2021-11-27 01:23:41 -08:00
toaster
00972a83d2 remove the prefix since everything seems to function 2021-04-17 11:30:08 +01:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01:00
toaster
40cbc30bff Mammoth commit, sorry.
All my work thus far on solving the drawflag/renderflag/additive/subtractive conundrum.

Outstandng problems:
* Bad additive/subtractive tables means that they appear opaque except under certain conditions.
* No support for FOFs, Polyobjects, or linedefs in OpenGL yet.
* All OpenGL support mostly done blind, may or may not function in practice.

If nothing else, the hard engineering problems are solved and it's just bug hammering...
2021-03-31 22:46:23 +01:00
Sally Coolatta
a4cd61d226 Make i consistent with orbs variable 2020-11-18 17:08:54 -05:00
Sally Coolatta
0dc567973c Overtime: Chaos Emeralds get deleted by the barrier, and respawn in the middle 2020-11-16 01:29:09 -05:00
Sally Coolatta
0dc0ff8e6f More finalized Chaos Emerald visuals 2020-11-15 15:11:13 -05:00
Sally Coolatta
4a9a438270 Dummy out wanted system
- Remove WANTED hud item
- Person in 1st place is the bonus points giver
- Sort players by Emeralds > Bumpers > Points
2020-11-02 03:51:16 -05:00
Sally Coolatta
2745ea2938 Drop emeralds in front of the hurt player, instead of to their left 2020-11-02 01:22:41 -05:00
Sally Coolatta
7bff7931ed Sort wanted players by bumpers & emeralds first 2020-11-02 01:09:14 -05:00
Sally Coolatta
961ff69241 You can drop Chaos Emeralds 2020-11-02 00:41:41 -05:00
Sally Coolatta
a011278dd4 Slight tweaks to item spawn location 2020-11-01 23:46:26 -05:00
Sally Coolatta
91ed67bece Start on Chaos Emeralds
Functional! However, you don't drop them yet.
2020-11-01 23:44:54 -05:00
Sally Coolatta
63c84567c5 Spawn an item right at 0:00.00, instead of at 0:04.00 2020-10-27 00:23:46 -04:00
Sally Coolatta
a2a947db62 bruh
thanks jart
2020-10-27 00:19:11 -04:00
Sally Coolatta
201f8365db Merge branch 'battle-rethink' of https://git.do.srb2.org/KartKrew/Kart into battle-rethink 2020-10-26 22:20:25 -04:00
Sally Coolatta
62139f144a Paper item spawners
Code is a little horrendous in a few places but I will hopefully fix later :V
2020-10-26 22:20:02 -04:00
James R
6a2ace3067 Fix compiler warning 2020-10-25 13:12:08 -07:00
Sally Coolatta
0969ca1af9 Karma bombs rework
- Fixed the bugs with them in our last netgame
- Karma bombs are no longer slippery or have stat changes
- Karma bombs cannot pick up spheres. Their remaining spheres before they died are removed 1 per tic.
- Karma bombs are out of the game permanently when touching the overtime barrier
- When successfully hurting another player, instead of getting 0.5 bumpers, they steal ALL of the opponent's bumpers, effectively swapping places with them. One bumper is lost in the process, meaning bumpers are slowly flitered out the more people need to come back.
- Removed karma items/eggboxes... hopefully this is temporary and we can bring them back later, but currently we don't have a design for how they should work under the new rules :x. They are still in the code behind the `OTHERKARMAMODES` define
- Bumpers & comeback timer are now player_t variables instead of kartstuff shit
- eliminated boolean on player_t for checking when a player touched the barrier
2020-10-24 11:27:42 -04:00