View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0021728 | AI War 2 | Gameplay Issue | Oct 2, 2019 10:52 pm | Feb 28, 2022 2:50 pm | |
Reporter | wm46 | Assigned To | Chris_McElligottPark | ||
Status | resolved | Resolution | fixed | ||
Product Version | 0.895 Major Progress On Tutorials Framework | ||||
Summary | 0021728: Ships are theoretically able to break free of tractors by decolliding | ||||
Description | Saw the update and decided to do a deep dive into the code, and from the looks of it, ships are able to break free of tractors pretty easily now. Decollisions are always placed on the top of the order stack, and given the random nature of decollision orders, there's a >50 % chance that the decollision order will be to an area away from the tractor source. Case 1, stationary tractor source and moving ships: The ships will pile up on the leading edge of the tractor, and the overlap will cause decollide orders to be generated. Those that get sent backwards will break free from the tractor, but probably end up back in the tractor after moving back towards it. Case 2, tractor source moving towards ships: The ships will pile up on the leading edge. They will get a decollide order. Regardless of where the decollide order is, there's a code collision where the tractor source's DoMove will pull the tractored ship in the direction of movement, but the ship that is tractored's DoMove will want to pull it towards the decollide point. Since you are pulling the ships away from their decollide point, they will eventually pass through the tractor field and break away. Case 3, tractor source moving away from ships: If they are on the trailing edge of the tractor source, the ships will break free almost immediately. No idea what a solution could be while still keeping the spreading nature that was included with the update. | ||||
Tags | No tags attached. | ||||
|
I wanted to make a picture. |
|
I had thought about this also, as well, yes. One idea for this sort of thing was to make it so "once tractored, can't be untractored based on distance alone." |
|
I'll have to look when I'm back from work, but I think this is a bit more fucky than it lets on. If the ship id of the tractor source is lower than the tractored ships, I think the pulling effect of the source might not even work properly. |
|
Interesting -- definitely worth looking at, then. I appreciate it! |
|
Well, I found one thing about the changes you made so far, once a ship is stunned or tractored its unable to receive new decollision orders. With entity.CalculateSpeed(), it will return a non-zero number only if the ship has a decollision order on the front of the order stack. DecollisionPlanning.cs doesn't calculate decollisions for any ship that has a speed of zero though (line 242), so once a ship has zero speed they won't be able to decollide to reduce bunch ups from crowd control. On the subject of code collisions with respect to entity ID: this does appear to be an issue. The variable FramePlan_Move_NextMovePoint is not a delta between last frame and the frame after, but just holds the absolute X-Y coordinates of the ship's position at the next frame. When the tractor pulls a ship, the tractor source calculates its delta move and adds it to the other ship's position so they move in sync. But since FP_Move_NMP is an absolute position, if the ship has a higher ID than the tractor source, the tractor source will add the delta move to the ship's position but then it just gets overwritten by FP_Move_NMP. If the ship's ID is less than the tractor source's ID then everything works just fine. You've got two ugly solutions, rewrite MovementPlanning.cs to return a delta move (actually maybe not that ugly), or somehow force tractor sources to be evaluated last when moving ships around (confusing more than anything, I can see some random SVN contributor reverting things to clean up the code). |
|
Not exactly what you had in mind, but just checked in: * Fixed a pair of issues in the prior versions where decollision logic would not be run ever for ships with a current speed of 0 (from tractoring or whatever), so they would still stack up; and then also ships that were on the way to a wormhole or transport but then also had a current speed of 0 would STILL not be able to decollide. ** These both combined to make it so that ships were stacking up like crazy still when they were being bombarded by spiders, widows, or tractor beams. This in general looked awful and made it hard to see what ships were there, making it also a usability issue. ** This DOES of course mean that ships will be able to escape from tractor range some of the time, and that's regrettable, but generally if your tractor beams are in the direction the enemy is headed (the most common case) that's not possible anyway. The most likely scenario is ships trying to flee from a planet actually getting away from you when you were trying to stun them. Thanks! I'll respond to the next bit in a second. |
|
Regarding entity movement order, bear in mind that's not actually in the order of the ID. It's actually in the order of when they were added to the current planet. So a tractor beam is most likely longer-existing on a planet compared to a ship that is invading, for instance. Anyway, your point still remains, and probably those need to be changed to deltas. Seems like a good project for someone if anyone has time. For now I'm working on the galaxy map usability and then the sidebar, and achievements, etc. Trying to hit the things that nobody else can really get to. |
|
Fixed a long long time ago! |
Date Modified | Username | Field | Change |
---|---|---|---|
Oct 2, 2019 10:52 pm | wm46 | New Issue | |
Oct 3, 2019 12:14 am | wm46 | File Added: IHadFunMakingThis.jpg | |
Oct 3, 2019 12:14 am | wm46 | Note Added: 0053433 | |
Oct 3, 2019 2:53 pm | Chris_McElligottPark | Note Added: 0053438 | |
Oct 4, 2019 12:16 pm | wm46 | Note Added: 0053453 | |
Oct 4, 2019 12:18 pm | Chris_McElligottPark | Note Added: 0053454 | |
Oct 4, 2019 6:47 pm | wm46 | Note Added: 0053480 | |
Oct 4, 2019 7:04 pm | Chris_McElligottPark | Note Added: 0053482 | |
Oct 4, 2019 7:06 pm | Chris_McElligottPark | Note Added: 0053483 | |
Feb 28, 2022 2:50 pm | Daniexpert | Assigned To | => Chris_McElligottPark |
Feb 28, 2022 2:50 pm | Daniexpert | Status | new => resolved |
Feb 28, 2022 2:50 pm | Daniexpert | Resolution | open => fixed |
Feb 28, 2022 2:50 pm | Daniexpert | Note Added: 0064926 |