Commit graph

41 commits

Author SHA1 Message Date
Sally Coolatta
728cd1bd7b Bots: Add Kitchen Sink to K_BotPickItemPriority 2023-05-15 19:08:54 -04:00
Sally Coolatta
12ff9dc2ba Bots: Lv.1 doesn't wait as long for items
3sec -> 2sec
2023-05-15 06:31:01 -04:00
Sally Coolatta
d367bacc39 Bots: Decide what item they want without using RNG
Makes Lv.1 a lot less aggressive, and Lv.MAX slightly more aggressive. But the main advantage is simply that they are deterministic again and I can  :D
2023-05-15 03:05:28 -04:00
Sally Coolatta
77ab86ab34 Bots: Increase spindash confirm further
Felt like they were spindashing just sliiiightly too often.
2023-05-14 19:33:38 -04:00
Sally Coolatta
d55c9038cc Bots: Can now use Ring Shooter
Reuses most of the anti-grief code, but with a very low timer (5sec) and they simply hold Y when reaching it until they eventually respawn from the ring shooter.
2023-05-14 19:32:51 -04:00
Sally Coolatta
34b12cc436 Bots: Improve spindash behaviors further
- Added new spindashing conditions:
   - In offroad.
   - Trying to go up-hill on a steep slope.
   - On a conveyor going the opposite direction they're trying to go. (Barren Badlands)
- Instead of checking for any spindash condition and adding to the confirm timer, it adds to the confirm timer for every single condition.
    - Increased the confirm time from 2sec to 3sec to accommodate for this change.
- Fixed not using precise momentum angle, causing the low-speed scenarios spindash is intended for to not always work.
- Bots now check for spindash conditions even in damage states, allowing for spindashes after a spinout.
- Fixed the spindash confirm not decreasing over time when entering a condition and then exiting it, causing random spindashes when it wouldn't make sense.
2023-05-14 18:26:31 -04:00
Sally Coolatta
5ac7926e39 Prediction nudge is based on original WP radius
Previously based on prediction radius, which meant it was so low that it might barely even nudge at all. Now we try to nudge a lot, but clamp the radius to make it thinner if it goes off-road.
2023-05-13 01:59:07 -04:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
James R
b5310a1f68 Add typedef.h
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
2022-11-27 17:21:40 -08:00
James R
b0e079bdf0 Update botvars rubberband and controller in P_PlayerAfterThink instead of K_BuildBotTiccmd
These vars directly affect gamestate but K_BuildBotTiccmd
only runs for the server.
2022-10-31 14:36:21 -07: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
52f82b4c64 Better bot spindash behaviors
For Chrome Gadget
2022-05-30 08:26:13 -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
c678146f0c Drastically simplified bot rubberbanding 2022-05-23 23:59: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
Sally Coolatta
cd0a259bbe Code cleanup
- K_FindBotController returns the line_t directly, instead of a linedef index.
- Trick panel code is in its own function.
- Try to fix infinite bot heat death
2021-12-12 02:32:03 -05:00
Sally Coolatta
08bfd6e881 Improve the new wall detection further
They didn't fall off on Hardhat, I'm so proud of my sons
2021-12-11 01:51:40 -05:00
Sally Coolatta
19463d6b20 New bot prediction wall detection
Instead of searching for walls around the player, and then deciding to make the radius tighter if it found anyway, it instead checks if the waypoint it's trying to predict towards was blocked by any walls / hazards.

Needs adjusted some, I think its being pulled back too hard sometimes, but I am optimistic about some of the improvements I already saw.
2021-12-10 17:42:00 -05:00
Sally Coolatta
e006cfa287 Make spindashing bots work better
They will no longer do it on a whim after getting bumped out of position of hitting walls, instead checks if they're trying to accelerate and they physically can't.
2021-04-11 04:54:27 -04:00
Sally Coolatta
59fa615cc8 Update comment 2021-02-26 06:12:19 -05:00
Sally Coolatta
43a92892e9 New turning towards objects style 2021-02-26 01:58:13 -05:00
Sally Coolatta
42419f7bc6 Add comments for functions 2020-06-04 17:14:14 -04:00
Sally Coolatta
30df376d04 Higher friction while rubberbanding
They are now x2 as difficult :)
2020-06-03 14:02:14 -04:00
Sally Coolatta
91b0246d99 Merge branch 'master' into grand-pricks 2020-05-31 15:53:31 -04:00
Sally Coolatta
fdb13b76d1 Make K_BotTopSpeedRubberband a function 2020-05-28 16:46:21 -04:00
Sally Coolatta
20b2dabae9 Merge branch 'pet-robo' into grand-pricks 2020-05-25 12:44:59 -04:00
Sally Coolatta
5d77807a78 const radreduce, removed unused "dir" property 2020-05-24 16:16:01 -04:00
Sally Coolatta
dbc30da69f Dial back the bot steering changes a bit 2020-05-24 15:55:10 -04:00
Sally Coolatta
02605a5ace Split bot code into multiple files & clean up 2020-05-24 15:08:10 -04:00
Sally Coolatta
edfc14c506 Better steering
- If they're already turning in one direction, they are more likely to steer in that direction for objects
- Bots have to want to turn in 1 direction for a few frames in a row before it'll let them

Prevents twitching & makes them less indecisive in general
2020-05-24 11:12:38 -04:00
Sally Coolatta
fa5fccffc5 Implement lives system
Lose a life & restart the current race if you place below the top half. Lose all of your lives, and you get kicked to the title screen.
2020-05-13 02:14:39 -04:00
Sally Coolatta
d2172fc54b Bot amount & difficulty is now controlled by cvars 2020-05-07 02:37:06 -04:00
Sally Cochenour
21bab775b1 Add difficulty settings 2020-04-19 09:07:29 -04:00
Sally Cochenour
3f639b4f8a Rubberbanding! 2020-04-07 00:40:44 -04:00
Sally Cochenour
4380caf7dd All around polishing
- Make ring usage smarter
  - Ring usage threshold varies between characters (Tails will be more willing to dump rings, Metal will hold onto them)
  - Decrease ring use threshold when they have a speed boost (tethering)
  - Decrease ring use threshold when slowed down more than usual
- Properly implement Triple Sneaker & Rocket Sneaker usage
- Use smallest radius of all waypoints being predicted, to improve precision
- Bots never use prev waypoints
2020-04-01 21:16:26 -04:00
Sally Cochenour
fb550f2868 Slightly smarter sneaker usage
- Use sneaker if held for too long without a proper use
- Use sneaker if losing too much speed
- Use sneaker if you have another boost (tether, boosters)
- Add triple sneaker & rocket sneaker support
- Don't go towards shortcut waypoints without a shortcut item
- Bots get naturally better handling
2020-03-30 17:17:20 -04:00
Sally Cochenour
102aca3ab4 Bots have a dumb path prediction 2020-03-29 18:00:35 -04:00
Sally Cochenour
15bda7da2d Use K_MomentumToFacing to give bots a bit better traction 2020-03-28 14:57:49 -04:00
Sally Cochenour
ff621d3e46 Skins, rudimentary ticcmd building for bots 2020-03-28 12:39:27 -04:00
Sally Cochenour
751fd9ad1b Start on bots, doesn't work 2020-03-27 23:51:49 -04:00
Renamed from src/b_bot.h (Browse further)