branchrust_reboot/main/naval_update/scientist_boat_aicancel
111 Commits over 31 Days - 0.15cph!
Codegen after merging naval update
naval_update -> scientist_boat_ai
Fix compile error with our new changes
Remove a dumb 200 byte allocation on our blur step
Integrate RHIBs into the deepsea
Spawn them in cool triangle formations (auto generate groups)
Wiping the deep sea will wipe rhib group info
Only try and maintain cohesion in the wander state
Add some methods to wipe coordination when the deep sea resets
simple boid behaviour in groups
groups will attempt to stick together as much as possible
Add 'grouping' system:
Boats can be spawned in groups
If one of the group members targets an enemy we can ensure all of the boats target the same one, this keeps them all focused and together
AI boats will now attempt to ram players
AI Boats will sometimes drive by the targets then pull in front or behind them
Reverse steering if we are going backwards
Bring back incremental steering
Fixed bugs with moving the claim from one boat to the other
If a claimant boat to a target is removed then inform the other boats that a new claimant position has opened up
This means if you kill the main boat attacking you, the other boats waiting in the attack 'queue' can have a stab at killing you instead
Much better near and far distances when dealing with the boat coordinator
Debugging
Connect to the coordinator on init and leave on remove
When you find a target that you want - register it as yours, this prevents other boats from taking it
Boat coordination system setup
Provides an avenue for boats to claim/unclaim targets, this prevents lots of boats from dogpilling on a single target
If driver is killed - totally remove AI
Make RHIB scientists much weaker than regular scientists
Prevent overcorrection when approaching targets
Put debug drawing behind a variable
Move constants to BoatAI.Data
Prevent Reserializing fields when changing symbols
Apply blurring over the whole context space to try and prevent oscillations between very similar states
Use scoring for picking context directions rather than lowest danger weighting
Prevent boats from jiggling once they reach their target position
Codegen
scientist_boat_ai -> naval_update
Remove logs
Add back avoidance
Finally! Working 360 degree avoidance (sixth attempt at avoidance, seems to be the final version!)
Stop NPCs on the boat from being targetted as enemies (boat would drive around in circles trying to get close to a passenger)
Fix Y values screwing up our targetting vector logic
Obstacle system was transforming direction when it didnt need to
Ensure a full 360 degrees of directions are generated
Add proper support for reversing - use the dot product to determine when behind
Fix a bunch of incorrect vector space translations
More debugging
Clamp danger values
Local to world (not the other way around)
Increase context resolution
Harder steering over lower values
Rip out the old boat ai steering behaviour and fully replace it with a context driven version|
Retain a map of interest and danger that correlates to a fixed set of directions around the boat
Weight everything up and take the path of most interest + least danger
naval_update -> scientist_boat_ai
Better spacing values
Disable RHIBs spawning in the deepsea for now
Messing with deepsea values
Added AI RHIBs to the deep sea
Codegen
General cleanup
Deep sea specific RHIB prefab
Stop the boat driving if the driver gets doinked
Driver no longer has a gun out
Reduce number of feelers
Prioritise forward direction
Try to avoid flicking between similar directions
Fifth attempt at avoidance logic
Fix broken bounds on the rhib storage drybox
Remove mounting debug code
Setup RHIB specific scientists
Fix bounds on the new RHIB (actually play impact effects)
Manifest
Add support for spawning the new scientists, but lets stay with the old ones for now
Swap avoidance Physics.Spherecast to GamePhysics.TraceAllUnordered, should be a bit more reliable
Further simplification to avoidance code, not 100% sold on it so im commenting out for now
Allow head look (lets the scientists actually target things) whilst they are on the boat