Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Combat Revamp] Vast number of Combat & Balance changes intended to test our Options #5772

Closed
wants to merge 149 commits into from

Conversation

Zitchas
Copy link
Member

@Zitchas Zitchas commented Mar 5, 2021

Content (Artwork / Missions / Jobs)

Summary

This PR is not intended for merging in the near future, although if people like the changes it can be considered for such. More likely, this could be the base for the separate "Combat Changes" branch that Amazinite has mentioned wanting to do in the past.

Thoughts

This PR includes a lot of changes. Broadly speaking, it is focused on mobility related aspects of combat. I'm looking at making the feel of the various ship categories more diverse, with fighters, drones, and interceptors actually having a unique level of mobility unmatched by any of the warship tiers. One prime example of this is dodging. It should be quite feasible now for any fast ship, and interceptors in particular, to dodge quite a few projectiles. The AI isn't going to benefit much from that, but I hope the player will. Dodging always felt very rewarding for me in the EV/O/N series, and has always been a sore point for me in ES because a) successfully dodging stuff didn't feel very meaningful, and b) dodging stuff is much, much harder.

I would just like to encourage everyone to NOT read the details listed below. I know everyone has their own things they want to see changed, and there are some strong feelings about what is and is not appropriate to change. I'd like to argue that how it feels in-game should take priority over all our out-of-game meta analysis. There will be a time and place for it, but at the very start of a big overall is a time for first-impressions and feel rather than nitty gritty details. Please, please just switch to this in the launcher, fire up a brand new pilot, and just play the game for a while. See how things feel. After you've got a couple hours of flying around and getting into battles, then come back and look over the details.

Again, please skip reading the detail list, and just go try it out. The entire purpose of this is to give us a way to experience the changes we've been talking about, and I fully expect it to change in the future as tweaks, changes, and other ideas are added to it.

I strongly recommend trying to ignore your preconceptions. Because so many things have changed, when purchasing a new ship or deciding on engines; actually take a look at the performance of the ship options available to you first.

Please Note:
Petervdmeer's Formations have been merged into this as of March 6th. You can change the formation of your own fleet by using shift-G to rotate through the available formations. The list of messages will tell you which formation you just switched to. Please note that formations are selection sensitive. As in, just like you can give different commands to different sets of ships in your fleet; you can use different formations for different sets.

Temporary controls to set formations. For default controls the following:

shift-G to change the formation on selected ships (or the fleet)
shift-F to move selected ships (or the fleet) to a higher ring
shift-H to move selected ships (or the fleet) to a lower ring

On my to-do list:

  • Get people to go get into lots of fights, and see how this changes the feel and behavior. In particular, I'd like some feedback on the big FW and Wanderer campaign fights.
  • Also, I'd really like people to test different fighter strategies. For instance, using fighters as anti-fighter swarms to target and disable enemy fighters; using them as mobile anti-missile platforms; using them as hold-back missile boats. What about fast attack craft with things like heavy rockets or javelins? Flamefighters? What other fighter/drone strategies are there? How do these changes change their usefulness?

Details

One last time, please go play this instead of reading the change list. I really want to hear people's experiences, and especially first-impressions, not just people stating what they think the changes will result in.

Gameplay > meta-analysis

Slowing projectiles: This is intended to make each shot count for more, and also to re-introduce the idea of dodging and weaving around shots as something that is at least remotely feasible.
  • As of the Primary Reset of 2021-Mar-19, the following only applies to missiles, rockets, torpedoes, and artillery style projectiles. Guns, beams, and secondary weapons that are gun-like have been reverted to vanilla.
  • All projectiles have half the velocity and double the lifetime.
  • All projectiles have double the reload, and double all relevant costs and damages.
  • All projectiles have half the capacity.
  • Beams are the exception. They have simply had their damages halved to compensate for their instantaneous nature.
Speeding up fighters, drones, and interceptors
  • All fighters, drones, and interceptors have had their mass halved and their drag doubled.
  • They then had their number of engines doubled. (with appropriate increase in outfit and engine space to fit them)
  • They also had an amount of thrust equal to two of their stock engines added to the base hull.
  • They also had an amount of steering equal to one of their stock steering added to the base hull.
  • The net impact is they all have 4x their vanilla thrust and 3x their vanilla steering. This, combined with the changes to mass and drag, result in roughly double the max speed and four times their acceleration.
Adjusting the acceleration of big ships.
  • While there are a few exceptions, this was quite simple: increase in mass.
  • All medium warships as well as transports that appear to be in the "medium" range for their purpose got +5% mass.
  • All heavy freighters and warships, as well as transports that appear to be in the "heavy" range for their purpose got +10% mass.
  • World Ship got +20% mass increase because it is far too light for the number of bunks it has, much less for being a world.
  • Pelican and Peregrine did get gain any mass because their whole thing is being fast and light for their category.
System arrival distance
  • Every system has been given arrival 1500 so that ship actually arrive outside the system proper and travel in to the system. This is intentionally set a bit far out to give more time to look at engagements as they develop.
  • Realistically, this should be dropped down to 1000 or maybe even 500; although having some option to tell certain fleets to intentionally arrive farther out would be really beneficial, especially for missile/torpedo heavy warfleets.
Miscellaneous other changes
Freshly Added Features One
  • Added VitalChip's Fighter/Drone AI, and assigned it to all fighters and drones. If they have a big enough agility advantage over their target, they will try to circle and stick with attacking the rear of their target. Acceleration is their key attribute, versus their target's turning speed.
  • Added VitalChip's strafing mechanic. Keys for strafeleft and straferight can be set in controls. Strafing is currently half of a ship's normal thrust.
  • Added Petervdmeer's Formation Flying.
  • Added Terin's Parallax effects
Freshly Added Features Two
Freshly Added Features Three
  • Reverted changes to Primary weapons and primary-like weapons such as the Dragonflame and Gattling gun. (Rockets, missiles, torpedoes, and artillery style weaponry retain the original changes)
  • A few secondaries that escaped having their capacities halved have been fixed.
  • Weapon pods for small ships. (Pods so far include meteor, sidewinder, javelin, and heavy rocket pods. Pods are small launchers (roughly 1/4 the size of their main launchers) and carry 1/5 to 1/10 as many projectilies. Intended to make make stock drones, fighters, and interceptors more reasonable. It makes a lot of sense to have fighters carry 2 heavy rockets. It does not make sense that they'd be able to carry as many heavy rockets as a light warship. Pods use the burst fire mechanic to launch rockets at a slightly increased rate of fire, but then suffer a very large reload which makes them less-than-ideal for ships that want/can use larger launchers)

Pointedstick and others added 14 commits March 3, 2019 16:43
Changes:
- lifetime doubled
- velocity halved
- reload doubled
- all firing and damage things doubled

Exception:
- all beam weapons were reset to have 1 lifetime and their original velocity because otherwise beams have problems.

The script used to do the bulk of this work is `Zcombat-rework.py`. Terin made the script, I added a single line to it.

Note: the script doesn't handle every possible firing or damage type, but I think it gets everything currently used in-game.
The following changes to all Fighters, Drones, and Interceptors:
- Half mass
- double drag
- Doubled the number of engines and steering
- Increased Outfit+Engine space to fit that.
- Built in thrust equal to double the vanilla stock thrust.
- Built in steering equal to the vanilla stock thrust.
Hyperspace arrival isn't the best understood thing in the galaxy, so everyone uses extra safety margins to arrive well away from the system center.

Every system has `arrival 1500` specified, which moves the point the player arrives at 1500 farther out.
All beams reverted to the original values, then the damage values were halved.

This is to prevent creating flicker, and provide a nerf given that the "instant impact" benefit of beams is even more powerful now that all the rest of the weapons are slower.
General principle:
- All medium warship get +5% hull mass
- All heavy ships get +10% hull mass
- Transports that appear to be a medium or heavy in terms of numbers of bunks get +5% or +10% accordingly.
- World Ship is vastly under-massed and thus got +20%
- Bactrian moved to "transport" category and loses 1 gun port and one of the torpedo launchers.
- Heavy Shuttle buff PR changes included.
- Star Queen using Reverse Thrusters PR changes included
- Albatross relabled a medium warship and mass increased accordingly
- Ibis increased in mass normally
- Pelican and Peregrine not increased because speed is their thing.
Unintended side effect of the double engine thing: Made the sparrow unavailable for starting players.
Have dropped the sparrow by 5k to compensate.
@Pointedstick
Copy link
Member

Pointedstick commented Mar 6, 2021

I appreciate such a comprehensive attempt at changes. I have not playtested it, but I will momentarily.

Before that, I want to give my personal take on the situation: Combat in ES is just so darn fast, which makes it pretty unforgiving and reduces the freedom of movement to make balance changes. However if you slow down combat, you can go too far--combat can become boring, which is what I felt like happened in EVN for a good lot of the not-overpowered ships. Many of the gun type weapons felt like they just didn't do anything (Light cannons, Light Blasters), or would knock you back a good bit but without much damage (Fusion Pulse weapons of all sorts). These felt so frustrating to both shoot, and fight against. So you can go too far, I think.

Guns

I think the super high speed and accuracy of ES guns is a big problem.

In the older EV games, there was no auto-aim (only a manually invoked "turn to face" function) and no auto-fire, and a lot of projectiles were just plain slow. Using guns on a large slow ship against anything but another large slow ship was a challenge. EV Neutron Guns and EVN 200mm railguns come to mind. As a result, a lot of the gun-fired projectiles just plain missed. And many guns had wildly high inaccuracy. I remember the Blaze Turrets from EVO that basically created a flak field of projectiles. The AI was also written to miss a lot too, exactly like you the human would. So the guns' inaccuracy was actually a usability aid to help ships hit anything given that they wouldn't always be pointed in exactly in the perfect direction to land a hit. You could be off by 10 degrees, but some of your projectiles would hit anyway just because your gun was really inaccurate.

Missiles

In ES, missiles seem to have been envisioned as an alternative to guns that offer higher DPS per ton and per energy, with the disadvantage of costing money to fire and being limited in ammunition. This is wrong; missiles are not an alternative style of gun; they are a fundamentally different thing, but they don't feel like it in ES.

The older EV games largely got this right: there would be fewer missiles in flight, and most of them were far slower compared to ES missiles, but when one of them hit you, you knew it. They did a ton of damage if they connected. There was a big incentive to dodge, or install jamming or point defense weaponry, or fire flares. This mirrors the way missiles and torpedoes are in real life: they're big, heavy, expensive, slow (mostly, and at least when compared to gun-launched projectiles), and can be jammed or destroyed while in flight. But of one of them hits your ship, that might just be it. Compared to guns, they are low volume, high risk, high reward weapons.

The only ES missile weapons in human space that I feel like offer the same feeling and possibilities are Heavy Rockets and Typhoon Torpedoes. All the other ones are annoying pinpricks that don't feel missile-like at all. This needs to fundamentally change if missiles are to ever feel appropriate. Personally I would not rule out changes as radical as 5x the damage, cost, and weight, but 0.3x the fire rate and speed.

Small ships

In older EV games, small ships were significantly faster and more maneuverable than large ships, which made them more able to mitigate the disadvantages of projectile inaccuracy and slowness. They could zip close to a target, unleash a devastating barrage of gunfire or launch missiles at point blank range, and then scoot out of range of the return fire. In ES, many small ships are not materially faster or more maneuverable than larger ones (and larger ships have more margin to add souped-up engines too), so the rewards of being able to deliver firepower with more accuracy is not very pronounced. So small ships just don't feel like the jet fighters of space that the game wants them to be.

In conclusion

The net effect in older EV games was slower combat that rewarded player skill more. Guns being inaccurate but deadly meant that a more skilled pilot could kill things faster simply by being on target more often, and survive by dodging inaccurate enemy fire more often. Missiles being slower and more deadly meant a skilled pilot had more opportunities to evade them and more opportunities to hit enemy ships with them by being more skilled in piloting to maneuver them into a position where they can score a hit.

@Pointedstick
Copy link
Member

JFYI laser weapons appear to do no damage with these changes.

@Pointedstick
Copy link
Member

Pointedstick commented Mar 6, 2021

Played it for a while.

Things that I think are improved:

  • Missile weapons feel infinitely better to me, especially the large ones. The different missiles really feel like they have distinct roles now. It's genuinely hard to hit a fighter-sized craft with a Torpedo, which makes it all the more satisfying when you manage to pull it off! I love it.
  • Missile weapons that aren't Sidewinders definitely feel easier to dodge now in a small fast ship. This feels appropriate.
  • Longer arrival distances slows things down a bit in a way that feels appropriate, especially for escort type jobs and missions.
  • Blaster and Proton Turrets come close to providing that "field of flak" effect that I really enjoyed in earlier EV games.
  • Large, slow-turning turrets are useless against fighters now. This is perfect.

Things that I think aren't improved:

  • Fighter sized ships actually feel a bit too fast now. Faster is good, but the speed increase here feels a little silly IMO. :)
  • Big fleet battles still devolve into a giant slugfest in the center of the system; increased arrival distances don't seem to have much of an effect on this. This may requires AI changes to really fix it
  • I'm ambivalent about the increased hit force. For missiles, maybe. For guns, ehhhhh, I dunno yet.
  • The turrets that are specifically designed as anti-fighter defenses, such as laser turrets and blaster turrets are now too slow to be effective in this role. I would recommend keeping their turn rates the same, and don't reduce the turn rates of Quad Blaster turrets and Proton Turrets as much.

Recommendations for further improvement:

  • Decrease gun accuracy even more. This would further cement Lasers' niche as "the actually accurate gun-type weapon".
  • Make greater use of the "confusion" NPC trait to make other ships less accurate.
  • Increase missile strength values to compensate for them being slower so that anti-missile systems have more time to hit them, and also consider switching some of the bigger missile launchers to sequential fire instead of grouped fire. This would have the same general effect but make it less frustrating to fire missile weapons that now have a very very long reload time, such as torpedoes and heavy rockets. These launchers don't benefit as much from grouped fire anyway, now that they do so much damage.
  • Also integrate changes to give fighter-sized ships more gun ports, as it dovetails very nicely with these changes. Fighters want more guns!
  • Also integrate changes to decrease the size of missile launchers or add small-capacity launchers so fighter sized ships can mount them more readily. If people didn't like my proposal to make missile capacity require ammo box outfits, you could just increase the weight of each individual missile, as in the older EV games. But just choose something; the reason why I suggest this is because most fighter type ships are absolutely begging to have like 2-4 heavy rockets or torpedoes on them in addition to any other weapons, because now they're perfect fast, long-range delivery systems for heavy munitions against large projected targets (which is the reason why fighters exist in real life).

@Terin
Copy link
Collaborator

Terin commented Mar 6, 2021

* Big fleet battles still devolve into a giant slugfest in the center of the system; increased arrival distances don't seem to have much of an effect on this. This may requires AI changes to really fix it

Which systems did you check this out in? Aldhibain seemed like a great improvement, where you could see militia interceptors responding to new pirate threats in the system, able to move quickly but still needing to cover a meaningful distance, compared to militia argosies and bastions. It just looked great as well, making the fleet coming in and out look much more apparent and impressive, rather than just sort of a mess in the middle.

Wah Ki definitely seems like a problem still, but I think that's just the Shield Beetle being far too fast. If nothing else so far, I'd love to see the jump-in distance integrated into the game.

@Terin
Copy link
Collaborator

Terin commented Mar 6, 2021

Although even looking at Wah Ki some more, fights are spread out pretty far for me. I think this is a pretty big improvement for such a notorious system.

@Zitchas
Copy link
Member Author

Zitchas commented Mar 6, 2021

Thanks for the feedback!

Right now I'm working on getting VitalChip's fighter AI improvements in, which make them actually make use of that very high speed.

In regards to your suggestions:

  • For the missile strength, I agree. With half as many missiles in flight at a time, the missile strength should be increased.
  • One side effect that I hadn't thought of was that with each missile having double the damage (but half the fire rate) the DPS has stayed the same, but the overal total potential damage dealt by a single ship's loadout has doubled, it just takes twice as long to completly unload. This significantly erodes regular guns ability to compete since long duration staying power is their main strength. So for starters, all the launchers and racks should have roughly half the capacity.
  • That being said, as you mentioned, having fighters able to carry a small payload of heavy ordinance would make them quite effective, and is literally one of the reasons fighters exist. Doing something along the lines of dropping the launcher capacity to a rather small number of missiles (probably in the 1-3 range depending on the projectile in question) and then adjusting the missile racks accordingly so that the total damage potential of current loadouts stays constant would be good.
  • I'm not sure I'll get any additional gun ports in the near future, but yeah, that'd be a good idea. Without a space increase they'd naturally tend towards the small and light weapons anyway. That being said, if some largish fighter scrapped all their light weapons to mount one big thing along the lines of the A-10 Warthog, well, I wouldn't consider that a bad thing. ;)

arkhne and others added 2 commits March 6, 2021 09:48
* Rifles Added

Added Rifles to Human, Hai, and Korath ships.

* Updated Variants

Rifles added to Variant ships.
@Pointedstick
Copy link
Member

Another issue with ES weapons is that their battlefield roles are a bit muddier than I think would be ideal. You can see this in weapons that have fairly similar shield and armor damage values, in gun accuracy values that are close to laser levels of accuracy, missiles that barely do more damage than guns, and so on.

Here's how I envision it:

  • Laser weapons in general: short range, perfect accuracy, good against shields, bad against armor. Very high energy usage, very low heat generation. Very lopsided weapons, and therefore fun to use!
  • Blaster weapons in general: medium range, poor accuracy, well-rounded against both shields and armor. Low energy usage, but high heat output.
  • Missile weapons in general: long range, devastating against armor, less so against shields; but there could be a special type of missile that's specifically designed to be good against shields, like EVO's Dispersal Rocket. Wanderer Thunderheads could do this. Launchers would be smaller with very very low capacity (2-5 projectiles), and capacity outfits would be much larger.
  • Torpedoes: massive damage, like 3000 shields and 4000 armor, but even worse speed and turn. Basically they are only useful against capital ships, or when delivered at point blank range by fighters
  • Light laser turret, blaster turret, modified blaster turret: keep their extremely high turn rate so they are useful for anti-fighter defense
  • Heavy laser turret, quad blaster turret, proton turret: reduce turn rates a lot so they become more useful for anti-capital-ship. But don't reduce too much.
  • Plasma turret: so slow it's anti-capital ship only

This would expose various interesting possibilities:

  • Be a generalist with blaster weaponry, or specialize with lasers and missiles?
  • Equip only heavy turrets and use sidewinders for anti-fighter defense, or include some light turrets for anti-fighter defense and use your gun ports for heavier weaponry
  • To really be a missile boat, you'll need to fill your entire ship up with capacity outfits, limiting the amount of other equipment available
  • Fighters could feasibly carry 1-3 torpedoes or rockets in addition to their gun armament, making them true to their real-world role

@Zitchas
Copy link
Member Author

Zitchas commented Mar 6, 2021

Great feedback! I'll see about implementing some more things (including some of those) in the next few days. I've almost got the Fighter Circling AI and a surprise mechanic addition courtesy of VitalChip implemented. Just so long as the checks pass and it actually works...

That being said, if you have any of the changes mentioned ready somewhere, please feel free to PR them to my branch. I'll accept quite a wide variety of PRs at this point, especially ones like these that I like the sounds of. The point is to try ideas, after all.

@arkhne
Copy link
Contributor

arkhne commented Mar 6, 2021

I'm all for changes that limit the potential of missile boats such as requiring more dedicated storage (it also makes sense, these are exploding things, do you really want to just throw them in your cargo hold?
That said, I've never been a fan of missiles in ES. Long ago, it was because they just weren't worth the cost. More recently, it's because I've thought they were far too effective, and far too dangerous. Making them more deadly is not nice.

The distance change has definitely been noticable for me, and not just because it means more travelling. Other than the random missile deaths which happen far too much for my liking (although it seems I'm most definitely alone in this camp), every single one of my deaths has been on approach to a planet, but I'm perfectly fine with that. That's the risk you take piloting a fat, slow freighter in a world of zippy interceptors.

The small ships are so fast now that I am, for the first time ever, genuinely afraid of pirates. This is a good thing.

I will work through this some more later, and see about helping out some more, see if we can make this into a fun experience for everybody involved and not just "yet another test that went nowhere". Looking forward to experimenting with mass, AI, and finding ways of reducing the dominance of ship capturing.

* Adding Strafing & Circling AI support

Thanks to VitalChip for coding this.
They say they are going to redo it better in a few weeks. But in the mean time, this is what I pulled from their branch. Hopefully it works!

* Rifles Added (#65) (#66)

* Rifles Added

Added Rifles to Human, Hai, and Korath ships.

* Updated Variants

Rifles added to Variant ships.

Co-authored-by: arkhne <36457239+arkhne@users.noreply.github.com>

* Removing the python script

* Removing duplicate arrival

* Missing }

* Fixing duplication of keys

* Fixing a bracket

* And a missing else

* Fixing another bracket

* Adding the rear 1 attribute to fighters & drones

Co-authored-by: arkhne <36457239+arkhne@users.noreply.github.com>
@Zitchas
Copy link
Member Author

Zitchas commented Mar 6, 2021

Thanks for the reply. One thing, that kind of ties both what you say and what PointedStick said is that missiles are deadlier now, but also that missile ships have twice the firepower than they do in vanilla. This is not intended, and is probably contributing to the number of deaths.

On a different note:

NEW FEATURES
Added:

  • VitalChip's Fighter AI circling/strafing behaviour (fighters and drones that are fast enough to actually circle a target and keep ahead of its guns will do so. Not many can, but the fastest of them should be able to)
  • VitalChip's strafing. Yes, you can now strafe. Not sure how well the AI will handle it.
  • PeterVDMeer's Formations. (others will have to provide some data changes so that fleets actually use them, by and large, but the mechanics are now there. (will be merged momentarily as soon as the PR checks come back clean)
  • Arkhne's rifle expansion: Most ships should now have at least their minimum crew in their faction's basic H2H weapon.

@arkhne
Copy link
Contributor

arkhne commented Mar 6, 2021

Slight clarification on the rifle bit, Hai variants of human ships use Pulse Rifles, as a few of them did before this change. Part of this is that it makes the "better" ship harder to cap (better rifles), but also they'd want to protect their investment more (so they would use the better rifles that they know about).

The "crew minimums" were based on hull minimums, and in most cases does not account for Turrets. Notable exceptions are the Navy ships, who also carry Grenades by default, so I only added "most" of their bunks in rifles, they now have more than enough H2H outfits for basic complements to go armed with something, just not all rifles.

Zitchas and others added 2 commits March 6, 2021 13:04
* Add formation flying functionality

Added:
* Classes describing Formations
* Gamedata entries
* AI handling of formations
* Setting, loading and saving of formations on Ships
* Some example formations (data-file).

UI functionality (to set the formations through the UI) is not yet implemented.
Already sending this PR to allow people to experiment with formations (through datafile modifications or savegame editting).
Simplest way to experiment at this moment is to set a formation in data/ship.txt for ship types and then buy ships with the formation set.

Signed-off-by: Peter van der Meer <peter.vd.meer@gmail.com>

* Rename Arrowhead formation to Wedge

Wedge formation appears to be the standard name for this formation.

Signed-off-by: Peter van der Meer <peter.vd.meer@gmail.com>

* Add formations to NPC fleets

Allow NPC fleets to set a formation for the whole fleet.

Signed-off-by: Peter van der Meer <peter.vd.meer@gmail.com>

* Job with escorts flying in formation.

Add new job with stunt pilots flying in formation.

Signed-off-by: Peter van der Meer <peter.vd.meer@gmail.com>

* Fixed style issues

Fixed style issues:
- 1x c-style casts
- 4x extraneous parentheses
- 2x member on the same public/private block as the constructor
- 3x extra whitespace changes
- 1x whitespace style

* Add new files for Windows builds

* Added XCode/MacOS build file information

Added information to allow building ES with the formations functionality on MacOS.

Thanks to bosporos for looking up the XCode information.

* Added some formations that were requested.

And changed the formation names to follow a similar format for each formation.

* Adapted Formation-code to ES coding style

Changed code to match ES style guide more closely.
Also removed an empty constructor.

* Use Body class as formation-lead and use facing when standing still.

Changed the formation-positioner to use the Body-class as reference for the object around which to form a formation.
This should help if we want to make formations around non-ships in the future.

Also changed the formation-positioner to use the facing-property of the formation-lead when the formation-lead is not moving.
This makes the formations turn together with the lead when the lead is turning without moving.

* Simplify constructor of Line subclass in FormationPattern.

* Allow formations in AI-class around non-ship Bodies as well.

Updated AI-class to allow formations around non-Ship Bodies.

* Start of code-changes towards simpler structure and dependencies

This commit starts a change to have the FormationPositioner act as iterator
directly without the need for having the subclass Iter.

Overall structure of the code should improve once this change is done.

Note: The formations flying functionality is not working until this change is completed.

* Style: Switch FromationPositioner to the contructor more common for ES

* Fix issue with copy instead of the intended pointer/reference.

* Removed separate iterator from FormationPositioner

Changed FormationPositioner to perform the iteration directly internally.
Also removed the unused ship parameter from the NextPosition() call.

* Switched to RFC terminology.

Changed the variable names to match the RFC.

* Remove unused includes and unused variables.

Some refactoring made the code a lot simpler, but the includes weren't cleaned up yet.
This commit removes includes that are no longer needed.
This commit also removes an unused variable.

* Some textual improvements.

* Have formation ships match the facing direction of the lead-ship

If ships are close to their desired formation-position,
then they now also try to match the facing direction of the lead-ship.

The code now also uses explicit variables for position deadbands.

* Update spelling of formation name consistently.

* Add (temporary) controls for formation flying.

This change allows changing the formation for the fleet or the selected
ships by pressing Shift-G.

* Add ring settings demonstration.

Added minimal/basic settings for rings and attached the controls for
ring settings to shift+F(Fight) and shift+H(Hold).

* Add symmetry settings to code and formations

This only adds the settings and loading of them; the settings are not used for anything yet.

* Minor style fixes

* Restart instead of clear formations in AI:Steps.

And moved clearing to the AI::Clean() function where all other cleaning also happens.

* Handle ring positioning properly.

Ships should now move to the correct ring, regardless of the ships order.

Briefly tested with Delta(center) formation. No issues found.

* Use ship sizes for formation scaling.

* Adapt deadband scaling to formation scaling.

Formation scaling is now done on ship sizes.
We also need to scale deadband positions baed on ship sizes to avoid overlapping positions.

* Move formation facing direction calculation to central location.

* Set maximum formation turning speed to avoid formation collapse and expand

* Add formation turning according to symmetry

Formations with rotational symmetry can now perform partial turns.
Formations with transverse or longitudinal symmetry now flip when more than 145 degrees from desired direction.
Rotational symmetry turning takes precedence over flipping.

* Use float abs function for doubles/floats.

* Scale back to smaller formation sizes if large ships leave.

* Initialize formations direction based on lead direction instead of with zero.

Not a bug, but this allows formations to form faster and makes transitions between formations nicer.

Signed-off-by: Peter van der Meer <peter.vd.meer@gmail.com>

* Change symmetry to (proposed) RFC flippable and rotatable

Updating the symmetry/flippable/rotatable code to match the RFC better.

* Fix parsing of rotatable.

* Forward ship as argument to formation-positioner (and handle scaling there).

* More updates to match the RFC better

Created backwards compatibility sections to allow line and repeat keywords to follow both the RFC and old format.
Added keywords start and slots.
Changed keyword increase to slots in repeat section (according to RFC).
Added new "Wing" formation that appeared by accident by testing bowtie formation without slots-increase.
Update Line constructor to allow empty/default constructor.

* Use forward declarations to reduce compilation overhead.

* Update formation-positioner to track diameters, widths and heights

Also moved the scaling itself to the calculation in the pattern class.

* Change all repeat sections to use the start parameter

* Add MultiAxisPoint helper class to track scaling

* Renamed symmetry to flipping as indicated by RFC/spec.

* Fix direction of new Wing formation

* Rename some variables to match their (future) function better.

* Changed formations to use start and end coordinates.

Not all formations are updated yet, but the code appears to work as intended.

* Remove spacing keyword in Wing formation.

* Updated block formation to the latest implemented format

* Re-created Hexagon formation using polar coordinates

The skip last option is not implemented yet, so there is overlap in the formation.
The centered option also is not implemented yet, the formation will look nicer once it is implemented.
Implementing this with polar coordinates and the skip option was a lot easier than manually calculating all positions without overlap.
Coordinates are based on ship-sizes and fixed positions, this should allow the scaling to work more nicely.

* Re-create Diamond formation using polar coordinates.

* Fixed Hexagon, Delta, Nabla and Wedge formation.

Removed overlap without the use of the skip keyword for Hexagon.
Recalculated all positions for Delta (centered) using simple coordinates.
Translated the coordinates for the Wedge formation and reduced spacing.

* Remove backwards compatibility code and fix initial direction

The initial direction for formations was always initialized as 0.
This commit fixes that by always initializing the initial direction with the facing direction of the formation lead.

* Add some error-reporting on unknown formation-attributes.

* Make scaling a formation property instead of ring property (according to RFC)

* Add code and keyword for centering.

* Fix typo in comments.

* Allow multiple repeat sections

- Separated repeat sections from lines and allow multiple of them for a single line.
- Moved formation position tracking from pattern to positioner.
- Changed some functions to const.
- Changed some variables that should lever go below zero to unsigned int.
- Updated 3 formations to use multiple repeat secions.

* Add "alternating" keyword.

* Add support for arcs and add basic sphere/ring formation.

* Added new formation and improved spacing for Sphere formation.

* Add "skip first" and "skip last" keywords.

* Fix for alternating angles and added formation that uses alternating angles.

* refactor(content)!: update name of the game's intro conversation

Co-authored-by: Peter van der Meer <peter.vd.meer@gmail.com>
Co-authored-by: tehhowch <tehhowch@users.noreply.github.com>
@Zitchas
Copy link
Member Author

Zitchas commented Sep 26, 2021

OK, just a general advisory thing: This PR is getting less and less coherent. With the addition of the additional reverse engines and the weapon pods and a few of the other changes, most of which conflicted with stuff in here, things are getting messier and less useful.

I'd really like to see FighterAI, Formations, and Parallax merged - but revamp is on its last legs. I'm actually not 100% sure that I properly merged the conflicts in the source to make FighterAI and Formations work properly as it is.

samrocketman added a commit to samrocketman/endless-sky that referenced this pull request Mar 26, 2022
Intent
------

A note from @samrocketman (Sam Gleske).

This change only introduces engine changes to enable plugins to implement
the behavior initially.  However, eventually the game data files would
also be updated to support the behavior.

All data file changes have been stripped from this code in order to limit
how much gameplay is affected.  You can include the data file changes by
installing the following plugin which includes behavior originally
introduced with this engine change.

The idea is to polish this a bit and to match the code style with the
rest of the project so that it may be merge-worthy.

Primary changelog
-----------------

* Adding Strafing & Circling AI support
  > Thanks to VitalChip for coding this.  They say they are going to redo
  > it better in a few weeks. But in the mean time, this is what I pulled
  > from their branch. Hopefully it works!

Fixes provided by contributors

* Removing the python script
* Removing duplicate arrival
* Missing }
* Fixing duplication of keys
* Fixing a bracket
* And a missing else
* Fixing another bracket

Sources of changes
------------------

* endless-sky#5772
* Zitchas#67
* https://discord.com/channels/251118043411775489/431496424992014347/953417198821580850

Co-authored-by: Zitchas <32169904+Zitchas@users.noreply.github.com>
Co-authored-by: arkhne <36457239+arkhne@users.noreply.github.com>
Co-authored-by: Sam Gleske <sam.mxracer@gmail.com>
samrocketman added a commit to samrocketman/endless-sky that referenced this pull request Mar 27, 2022
Intent
------

A note from @samrocketman (Sam Gleske).

This change only introduces engine changes to enable plugins to implement
the behavior initially.  However, eventually the game data files would
also be updated to support the behavior.

All data file changes have been stripped from this code in order to limit
how much gameplay is affected.  You can include the data file changes by
installing the following plugin which includes behavior originally
introduced with this engine change.

The idea is to polish this a bit and to match the code style with the
rest of the project so that it may be merge-worthy.

Primary changelog
-----------------

* Adding Strafing & Circling AI support
  > Thanks to VitalChip for coding this.  They say they are going to redo
  > it better in a few weeks. But in the mean time, this is what I pulled
  > from their branch. Hopefully it works!

Fixes provided by contributors

* Removing the python script
* Removing duplicate arrival
* Missing }
* Fixing duplication of keys
* Fixing a bracket
* And a missing else
* Fixing another bracket

Sources of changes
------------------

* endless-sky#5772
* Zitchas#67
* https://discord.com/channels/251118043411775489/431496424992014347/953417198821580850

Co-authored-by: Zitchas <32169904+Zitchas@users.noreply.github.com>
Co-authored-by: arkhne <36457239+arkhne@users.noreply.github.com>
Co-authored-by: Sam Gleske <sam.mxracer@gmail.com>
@Amazinite Amazinite removed their assignment Jun 6, 2022
@Zitchas Zitchas marked this pull request as ready for review July 9, 2022 22:36
@Zitchas Zitchas marked this pull request as draft July 9, 2022 22:37
@warp-core
Copy link
Contributor

@Zitchas if you don't intend to pursue changes in this PR, should it be closed, even if that means creating a new branch for testing. This is pretty far out of date, it doesn't even have the battery buff which seems like it'd be highly relevant to the ships this is aimed at changing the most.

@Zitchas
Copy link
Member Author

Zitchas commented Aug 18, 2022

Yes, this is better off closed for now. I hope to bring it up to date and incorporate some new changes into it, but for now ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
balance A ship or weapon that seems too powerful or useless, or a mission that seems too easy or hard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet