treeform / istrolid-bugs

Official Istrolid Bug Tracking
4 stars 1 forks source link

When [number]% of energy, [return to spawn] makes ship twitch and jump around spawn #63

Closed BartNixon closed 5 years ago

BartNixon commented 6 years ago

Short explanation: [return to spawn] should bring ship to a full stop when it reaches the spawn, random twitching and jumping around the place definitely don't help it to recharge - it drains the remains of power by moving.

Ships already have implemented behavior to leave spawn zone after regaining some power without any specific commands - under circumstance they produce more energy than engines consume during recharging spawn seizures. This fix shouldn't be much of a code change - just stop, regain some power, continue movement.

Detailed explanation: I know it makes sense to spawn recharger and keep it on the base, but stop on return would save so much power you won't need to spend extra 500$ or more - and even rechargers don't always help in current situation:

This behavior is specially destructive to AI guided swarms - small fighters that return to base for recharging, simply jump around spawn, drain all energy from local rechargers by moving while getting stuck in endless recharging loop until all of them are destroyed.

It also disrupts some specific ship types - stealth bombers, FTL interceptors, and god-slayers that require tons of energy: because of this simple recharging issue for now it's impossible to make these ships AI based.

Bonus: The "fix" I suggested above is sufficient for a change. If you want to go an extra step, there might be a modifier to this function that actually also shouldn't be too much of coding either.

When [number]% of energy, [leave spawn]

This basically allows to set more specifically when you want your ship to return to combat. Surely some ships perform well even with 40% of energy left, although some specific types like stealth bombers or god-slayers need full energy bar of 100% to do some good.

Implementation of additional string to this command will benefit a good portion of ships, allowing them to stay alive much longer, and perform better in terms of teamwork, for instance:

Rechargers - with new string they will leave spawn zone only when their power is restored to 100% , or they will wait on spawn distributing energy as long as their presence is needed.

Stealth bombers with interceptor afterburner - with new string they will deal death blowing strike once, return to spawn for full recharging, while being static they will regain stealth capability, and return to combat to destroy something again.

A single code string brings a whole new range of AI strategies to a game.

bokken12 commented 5 years ago

When [number]% of energy, [leave spawn] would be somewhat counter-intuitive within the larger scheme of AI where each command is a single action not really dependent on state, but I have resolved this issue in the QOL branch by simply making the ship wait to recharge in spawn.