Commit graph

180 commits

Author SHA1 Message Date
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
Sally Coolatta
f987d1b601 Add smooth landing vfx 2022-09-20 10:33:24 -04:00
Sally Coolatta
acf2484def Merge branch 'master' into tumble-slope-fuck 2022-09-20 07:34:44 -04:00
James R
6af7df8d40 Fix -Wsign-compare 2022-09-14 23:02:55 -07:00
Sal
89d6506b44 Merge branch 'circuit-pathfind' into 'master'
Circuit pathfinding

See merge request KartKrew/Kart!673
2022-09-12 05:34:28 +00:00
Sal
94d7c497b0 Merge branch 'hooklib-port' into 'master'
Hooklib refactor ported and (mostly) squashed

See merge request KartKrew/Kart!662
2022-09-11 06:30:07 +00:00
Sally Coolatta
0c5b42a07e Stop lag when bots respawn
They try to predict their direction while they respawn, which makes them go a bit nuts when air time compensation kicks in. Cap it so that this can't happen.
2022-09-10 03:59:04 -04:00
Sally Coolatta
5107160a27 Circuit pathfinding
An alternative to the standard pathfind function. Instead of pathfinding to a specific waypoint, it always goes towards the finish line waypoint, but also won't stop when it reaches it. It only stops when it travels a far enough distance.

This is basically a cleaner, less hacky, and optimized version of the pathfinding I gave to the bots; instead of doing 1-2 full pathfinds to do this (depending on if they are near the finish line or not), it will instead always do a single small pathfind. I also need it for shrink laser behavior.
2022-09-10 03:52:31 -04:00
James R
37c3a55dda Fix conflicts 522467a88 2022-09-05 11:56:30 -07:00
toaster
1abfb2745a Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into new-menus 2022-09-03 22:26:28 +01:00
Sal
1d661a6f9d Merge branch 'just-bot-things' into 'master'
More bot things

See merge request KartKrew/Kart!652
2022-09-03 14:20:12 +00:00
toaster
97fab1ab20 Levels of tripwire pass conditions.
- Invinc and sneaker can go up to BLASTER.
- Flame shield and momentum make only the boost by themselves.
- Hyuu and grow ignore tripwire so don't make ANY aura without any of the prior also occouring.
2022-08-30 18:16:51 +01:00
Sally Coolatta
e8b179f7a1 Switch around maxplayers and ingamecap
- ingamecap is now the new maxplayers
- The old maxplayers is now called maxconnections, but can mostly be left alone
- Insert into match race menu
2022-08-29 04:35:14 -04:00
Sally Coolatta
7d67e02ea3 Bot perfstats
Show how long they take to think on all of their main tasks
2022-08-27 00:04:33 -04:00
Sally Coolatta
754004e07c Fix bots acting weird near the finish line 2022-08-26 20:19:13 -04:00
Sally Coolatta
438e639d46 Merge branch 'master' into just-bot-things 2022-08-26 19:16:43 -04:00
AJ Martinez
79cf985380 Allow bot control if knocked backwards after sprint finish 2022-05-31 21:00:59 -05:00
AJ Martinez
12563d254a Disable bot controls after sprint map finish (resolves !260) 2022-05-31 16:40:00 -05:00
Sally Coolatta
bfa3c40033 Improve bot traversal for the prediction
HatesSector was returning false positive for intangible FOFs, making them play really poorly in Desert Palace
2022-05-31 03:51:35 -04:00
Sally Coolatta
ee5e96b65e Simplify angle/speed radius logic 2022-05-30 19:30:17 -04:00
Sally Coolatta
fae9939a25 Make slope speed scale more significant
Pull that prediction BACK when you're going up slopes!
2022-05-30 19:29:58 -04:00
Sally Coolatta
0e95110136 Bot prediction uses pathfinding
A subtle change, but means the bots are thinking ahead more about the track's design, rather than just what's in front of them. Instead of just "convenient" paths, they'll actively think about which path is the shortest.

The most significant thing this effects is making them use shortcuts more often.
2022-05-30 19:28:40 -04:00
Sally Coolatta
3e4a1feb84 Better bot controller direction enforce 2022-05-30 08:26:38 -04:00
Sally Coolatta
52f82b4c64 Better bot spindash behaviors
For Chrome Gadget
2022-05-30 08:26:13 -04:00
Sally Coolatta
286f1c34a5 Prevent bots crash when there's no waypoints 2022-05-28 03:58:49 -04:00
Sally Coolatta
8b8933fa1a Fix incorrectly gotten bot controller line ID 2022-05-27 02:49:36 -04:00
Sally Coolatta
a896d73334 Precalculate bot controller & rubberbanding
These both require a couple loops to preform each, which probably adds up over multiple bots. Let's just precalculate them at the start of bot ticcmd.
2022-05-24 15:28:36 -04:00
Sally Coolatta
529a99bc17 Bot Controller E2 disables their movement entirely 2022-05-24 14:37:43 -04:00
Sally Coolatta
c678146f0c Drastically simplified bot rubberbanding 2022-05-23 23:59:18 -04:00
Sally Coolatta
8035f7afaf Merge branch 'master' into di 2022-05-21 03:46:22 -04:00
James R
1835605619 Merge branch 'yeaaaa-bots-lets-go' into 'master'
More Bot Improvements (Again (Again))

See merge request KartKrew/Kart!570
2022-05-20 23:32:01 +00:00
Sally Coolatta
56c23339be Directional Influence
Pretty much just copy+pasted from Snap the Sentinel!!
- Hold left/right to adjust the momentum angle after hitlag, up to 22.5 degrees. (Only angle can be adjusted, so you can't adjust your speed, only your direction.)
- It's relative to your angle, so sometimes you need to use forward/back, or even diagonals (forward/back throws now store full analog data for this to work)
- Bananas flip DI direction, to make them not baby easy mode
- Tumble has x3 DI (so angle adjustments of 67.5!!), and hitlag on each bounce to allow even more control.
2022-05-20 01:45:16 -04:00
Sally Coolatta
9ab0e028d4 Tripwire leniency
1 full second after entering a tripwire state, you can still go through tripwires
2022-05-08 01:03:11 -04:00
Sally Coolatta
5ffba0a678 review 2022-04-02 15:24:18 -04:00
Sally Coolatta
cf15c485c8 review 2022-04-02 14:43:38 -04:00
Sally Coolatta
5ece4825c0 Smooth landing support for bots 2022-04-02 02:25:25 -04:00
Sally Coolatta
59cd9e6157 Harder rubberbanding
The old one is too difficult, the new one is too easy ... let's get an inbetween.
2022-04-01 21:47:50 -04:00
Sally Coolatta
0eb5c29448 Don't do for tire grease again, but for the opposite reason. 2022-04-01 17:33:41 -04:00
Sally Coolatta
18dc75e6ca Make more accurate to how it used to work 2022-04-01 17:23:27 -04:00
Sally Coolatta
56875c59e9 Improve bot friction rubberbanding 2022-04-01 16:39:24 -04:00
Sally Coolatta
1a25fcee4e Improve spindash conditions 2022-04-01 16:05:49 -04:00
Sally Coolatta
3fb1ebbbb0 Fix Sub Zero Peak opening
Bots adjust their speed caluclations with slopes, so they anticipate moving faster going downhill and will stop sooner. They also EBrake instead reversing when trying to reverse up a hill.
2022-04-01 16:00:28 -04:00
Sally Coolatta
76bb14bd3e Scale some bot speed calculations with friction
Makes them handle better on ice.

Also includes some code to do the same with slopes, but it didn't work for subzero, so I gave up on it.
2022-03-31 17:02:12 -04:00
Sally Coolatta
d9b1bdb851 Remove bots without GTR_BOTS 2022-03-31 15:45:50 -04:00
Sally Coolatta
9475c80b9a Fix typo preventing reversing from working 2022-03-31 15:45:18 -04:00
Sally Coolatta
46dad4b7dd Start on better bot position 2022-03-30 20:28:08 -04:00
Sally Coolatta
b9f91cb7ec Increase bot difficulty range to 13
While I finally pushed to do this because of the epic Blue Sphere reference, I was kinda thinking about doing this for a while, because it gives more room for bots to level up during Hard GP.

I thought about just making the new level cap go up normally, but I decided on keeping the bots' passive buffs (like top speed & ring boosts) go up linearly, while rubberbanding range is kept the same.

I don't think I can properly explain it, but this basically means level 13s are a touch harder than old level 9s before, and new level 9s are touch easier than old level 9s. Basically think of it as more level range than actually making the bots harder.

The expanded range means that Hard GP can start off easier, but end harder. (And of course, Master is even more ridiculous c:)
2022-03-30 15:25:55 -04:00
toaster
8de92e8dca Merge branch 'master' into boss
# Conflicts:
#	src/k_bot.c
2022-03-17 16:58:42 +00:00
toaster
fcb6a4e1ab Disable the vanilla-sourced "keepbody" (rejointimeout) feature. 2022-03-14 16:33:03 +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