Commit graph

60 commits

Author SHA1 Message Date
Oni VelocitOni
3f7ae9dd23 Merge branch 'skinlimit' into 'master'
Increase skin limit to 1024

See merge request kart-krew-dev/ring-racers-internal!2743
2025-08-23 05:03:58 +00:00
Eidolon
55388c17c2 Merge public master 2025-08-21 20:43:28 -05:00
JugadorXEI
1e2e833d80 Bot library for Lua (botvars getter/setter, bot functions) 2025-08-22 01:24:13 +00:00
toaster
be3c0faf7e More gracefully amend Splits/Attackstart data on ghost load rather than splits load 2025-08-21 18:25:03 +01:00
Antonio Martinez
719ba464af Disable bot ballhog 2025-07-07 14:19:31 -04:00
Antonio Martinez
d4c8fac82d Straight slowdown attempt 2: use momentum angle 2025-06-21 19:23:39 -04:00
Antonio Martinez
a8ef3d0204 Slow down bots on straightaways (reinventing the accel wheel) 2025-06-21 04:08:29 -04:00
Antonio Martinez
9f187529f5 WIP: takeover cvar, don't draw other player exp 2025-06-12 01:07:57 -04:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
toaster
a4cec98c26 K_SetNameForBot
Func specifically for setting name for CPU players.
Lets anything go in offline mode, as per previous behaviour.
In online mode, attempts to append a slot-specific char before running EnsurePlayerNameIsGood (which removes characters at the end if a pre-existing match is found).
2024-03-18 19:23:55 +00:00
Sally Coolatta
abde576c58 Enforce const in bot ticcmds
There were a few remaining cases of bot ticcmd generation editing player structures directly. Fix all of this and make as much of it pass const player pointers so this physically can't be allowed to happen ever again. Appears to improve bot sync in netgames & demos bot support, but I have not tested extensively.
2023-12-22 23:28:08 -05:00
Sally Coolatta
896829c904 Add fof support for new bot controllers 2023-10-21 04:00:09 -04:00
Sally Coolatta
de9780ab3f Bot controller is stored on the sector now
- Moved destination tag off of linedef tag and into args.
- Bot controller values can be changed mid-level with ACS. (Linedefs using type 2004 will still be activated on level load.)
- Add flag to make bots fastfall
2023-10-21 03:36:26 -04:00
Sal
bb8499b43d Track-based bot difficulty 2023-09-23 03:28:43 +00:00
Sally Coolatta
bfecf45110 Use srb2::finally on bot predictions
I'm not sure exactly where the bot code leaks, other than knowing its the prediction for sure (because the prediction is the only memory bots ever allocate), but srb2::finally is cool and lets me not care :)
2023-09-10 03:20:29 -04:00
Sally Coolatta
54e6efc798 K_AddBot is direct
No longer sends a packet from the server, now all clients do it. Old method is kept just in case.
2023-06-15 12:06:21 -04:00
Sally Coolatta
e6e7056aae Add bot styles & bot spawn ACS function 2023-06-14 09:16:38 -04:00
AJ Martinez
bf901f0166 Add DEVELOP cvar "botcontrol" to disable bot actions 2023-05-29 23:49:08 -07:00
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