Commit graph

59 commits

Author SHA1 Message Date
yamamama
474a59ab7c Add "Lunatic" and "Maniac" modes
DUDE TOUHOU LMAO

Jokes aside:
* Lunatic = Master difficulty with modifications to make the races
  significantly more difficult:
  * Introduces a "lunaticmode" boolean to grandprixinfo;
    the demoversion has been upped to 0x0010 due to this
  * The bot modifier is, at MINIMUM, 2.0, making them aggressive as hell;
    Rival bots use a 2.5 modifier
  * Bump Spark is always off in this mode
  * RUNNERAUGMENT results have their distances significantly shortened;
    if a rival bot takes the lead, this distance is shortened even FURTHER
    so they don't frontrun against the human player endlessly
  * Alt. Invinc shows up earlier as a sort of "mercy" for human players;
    it would otherwise not show up until the race was effectively over
  * Maniac = Nightmare difficulty (Master at Expert speed)
    with Lunatic's changes
2025-12-28 21:13:30 -05:00
GenericHeroGuy
38907e9d80 Hashes for new patches and disable bot drifting
I'm sorry but the bots just eat so much shit 🥹
2025-12-13 01:43:15 +01:00
NepDisk
8881ade6fe Port some votescreen cleanup from RR 2025-12-12 18:15:21 -05:00
GenericHeroGuy
c173a2dcd6 Fix transitive dependencies on k_waypoint.h 2025-10-29 23:34:44 +01:00
NepDisk
e1083d9d74 Add toggle to force rivals 2025-10-15 12:45:26 -04:00
NepDisk
044e8c6ec1 Remove sclar on driftskill, make small grip lock out after drifts and make bots go neutral faster at high speeds 2025-09-18 16:53:08 -04:00
NepDisk
6512d71e4e Try to improve regular turns and drifts 2025-09-18 15:59:45 -04:00
NepDisk
8637fd772a Allow bots to reflect with the Bubble Shield rework since it no longer hits players. 2025-08-31 22:52:02 -04:00
GenericHeroGuy
d2c010ea01 Switch to a difficulty-based drift skill formula
This will get reworked later down the line (hopefully), but for now, I
think it ought to be consistent regardless of stats. Should make driftpoint
placement less of a nightmare at least
2025-08-31 22:33:26 +02:00
GenericHeroGuy
c9802c36c8 Add const, move driftskill to botdata
No more messing with respawn waypoints in K_BotTicker
2025-08-31 21:03:23 +02:00
GenericHeroGuy
bc4408b203 Expose botdata stuff to Lua 2025-08-31 20:40:24 +02:00
JugadorXEI
dc9bec000a Bot library for Lua (botvars getter/setter, bot functions) 2025-08-31 14:16:49 +02:00
GenericHeroGuy
e8d43ec8a3 Constantinople 2025-08-30 17:06:42 +02:00
GenericHeroGuy
68a644fe2f Replace the test cvars with botdata variables 2025-08-30 14:22:48 +02:00
GenericHeroGuy
6feb25cefe (WIP) Rewrite bot code to be much more sane
Bot logic is now handled exclusively by the server, now in the actual game
loop code, rather than during ticcmd generation. No TICCMD_BOT needed!
botdata_t has been added to store any variables that clients don't need.

Behavior differences:
* Brakedrifting actually works now... to the detriment of the bots
* Respawn triggers 1 second sooner (and actually causes braking)
* No longer spams respawn when a track lacks waypoints
* Turning might be less responsive?
  `botvars.turnconfirm += cmd.bot.turnconfirm` is gone... who knows
* No longer affected by timescale

Plus, no more outdated or copy-pasted comment blocks!
2025-08-28 21:42:51 +02:00
NepDisk
64fd5b93ac raise skinlimit to 4096
Why not UINT16_MAX? Thats 22gb of allocation lmao
2025-06-10 15:38:11 -04:00
GenericHeroGuy
481053a232 An attempt at timing and setting up drifts 2025-05-24 00:33:04 +02:00
Anonimus
00470714c0 Make bots drift 2025-04-25 16:21:57 -04:00
NepDisk
ed7b667aa7 Update File headers to use BLANKART 2025-04-19 13:33:28 -04:00
NepDisk
e1b419c83d Fix develop compile 2025-03-25 11:51:11 -04:00
NepDisk
f40771dd97 bot and respawn improvements
Bot respawn incrementer is based on RR's general antigrief incrementer with edits and additions
2025-03-23 14:14:46 -04:00
NepDisk
553676e588 Basic port of durrs bot code
It doesn't work as of yet.
2025-02-21 22:44:07 -05:00
NepDisk
d7c9aafd2b Enforce const in bot ticcmds
710e561981
2025-02-04 21:38:13 -05:00
Sally Coolatta
acf0466ba6 Add bot styles & bot spawn ACS function 2024-10-15 16:44:29 -04:00
Eidolon
d08b923f06 Merge branch 'extern-c-everything' into 'master'
Add extern "C" in C++ to all headers

See merge request KartKrew/Kart!842
2024-10-15 14:14:43 -04:00
James R
9e801c66d5 Merge branch 'universal-typedef' into 'master'
Move all typedef into one file

See merge request KartKrew/Kart!791
2024-10-15 04:16:58 -04:00
James R
1567e669d4 Merge branch 'bot-online-desync' into 'master'
Fix bots desyncing in netgames

See merge request KartKrew/Kart!748
2024-08-05 00:45:10 -04:00
NepDisk
dea5d0c897 remove more spindash leftovers 2024-08-04 13:47:37 -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
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