Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam
  • 0

Solution to Turrets


Martin Levac
 Share

Suggestion

Inertia.

 

In a tank for example, the turret and the gun have mass therefore inertia, and this is taken advantage of when keeping the target in sight, as the servos adjust for friction, while inertia does the rest. Turrets in Avorion have no mass or inertia, they only have speed, left right up down. Give them mass and inertia, and a whole bunch of problems go away. For example, when turning the ship, turrets follow the ship's motion, as if they tracked with the ship, not with the target. But with mass and inertia, turrets keep their targets in sight while the ship turns, up to their limit of range of motion of course. The tracking stat would reflect the servos power, and the mass and inertia it is fighting to move the turret and gun. The servos would also have a maximum speed or RPM, which would give us the maximum turning speed. But until then, turrets would accelerate and decelerate rather than go full speed full stop instantly.

 

As it stands, I guess the idea is to give the impression of an advantage when using smaller turrets with higher tracking speed. With inertia, only the initial target acquisition is affected by tracking speed. In fact, larger heavier turrets should track their target more accurately once they're on target. The advantage of smaller turrets is new target acquisition speed, while larger turrets (should) have the advantage of current target tracking accuracy, all this as a natural product of mass and inertia, not some arbitrary tracking number.

 

Once we give turrets mass and inertia, we realize that they should be able to turn much quicker than a giant space ship by comparison. Turrets should be designed with the center of mass of the gun as close to the turret's axis of motion. As well, when the turret is attached to the front face of the ship and the gun is pointing directly in front, it should have less inertia for left right (z axis relative to turret base), but as much inertia for up down (x axis, or the gun itself).

 

This could solve the twitching problem when tracking slow moving targets like tiny bits of wreckage that we just can't figure out why all turrets suddenly think is more important than that giant hull full of goodies.

 

Second suggestion.

 

Player config of turret behavior for turrets with independent targeting. For example, new target acquisition priority according to mass for unarmed turrets, so that my turrets don't suddenly become obsessed with useless bits of wreckage. Or, tandem vs independent also according to mass, especially for salvaging. With this, we could break up large wreckage quickly, then clean up the bits just as quickly, as the salvaging turrets (if more than one) would prioritize and work in tandem on large pieces first, then go independent for the smaller bits. Armed turrets would also benefit from this. For example, priority most dangerous, but only while it remains so, if the target's dangerous factor drops sufficiently (let's say its firepower rating goes to zero), switch to the next most dangerous, and so forth. Or, tandem for most dangerous, indy for weaker targets.

 

 

Third suggestion.

 

Ship control. I want the ability to control thrust brake. Make it a toggle where I can choose on the fly, whether it's on or player-controlled through directional keyboard controls. Also allow choosing whether it's all or just linear so that the ship doesn't just keep spinning on its axis especially for roll.

Link to comment
Share on other sites

25 answers to this suggestion

Recommended Posts

  • 0

Only regarding weapons/turrets:

 

http://www.avorion.net/forum/index.php/topic,2236.0.html

http://www.avorion.net/forum/index.php/topic,1292.0.html

http://www.avorion.net/forum/index.php/topic,1811.0.html

http://www.avorion.net/forum/index.php/topic,2035.0.html

http://www.avorion.net/forum/index.php/topic,2219.0.html

http://www.avorion.net/forum/index.php/topic,1830.0.html

 

Third suggestion.

 

Ship control. I want the ability to control thrust brake. Make it a toggle where I can choose on the fly, whether it's on or player-controlled through directional keyboard controls. Also allow choosing whether it's all or just linear so that the ship doesn't just keep spinning on its axis especially for roll.

This is a different topic of its own.

 

http://www.avorion.net/forum/index.php/topic,1797.0.html

http://www.avorion.net/forum/index.php/topic,2235.0.html

http://www.avorion.net/forum/index.php/topic,2062.0.html

 

...but to answer you anyway:

 

Inertia: except turrets are part of the ship and rotating the ship should affect turrets. I believe what you mean is tracking speed. It's being discussed elsewhere and is a possibility to balance turrets vs ship size which I think has some potential.

 

Second suggestion: probably the realm of mods.

 

Third suggestion: yes, agreed, better controls and control over thruster behaviour (namely auto-brakes) would be nice. Again, being discussed elsewhere...

 

Link to comment
Share on other sites

  • 0

I'm arguing for inertia, for turret behavior, and configuration further down this post. The other threads argue for unrelated functions.

 

Several problems.

 

Twitching, where the turret suddenly loses tracking for an instant, then tracks back just as suddenly. This shows absence of mass and absence of inertia, turrets can actually accelerate and decelerate at infinite rate.

 

Chasing slow moving targets for ages, especially those pesky tiny bits of wreckage. This shows lack of actual tracking. Instead, it's pure target acquisition, and it's done as quickly as "tracking speed" allows, which means quicker turrets appear to track their target, when they merely re-acquire it more often per unit of time. They acquire a target, then stop, then re-acquire it, and so forth. With lasers especially, the beam will appear to make small jumps from one stop-and-go to the next.

 

Losing target lock when moving ship. This is because there is no target lock and no inertia, there is only target acquisition. The instant the target or the ship moves and the turret is now misaligned, it must re-acquire the target, and it does that in steps of stop-and-go as explained above.

 

Large difference between up-down and left-right, and sequential motion rather than simultaneous. The turret will move the gun up or down first to the appropriate position, then move base left or right until target is acquired. It's possible that tracking speed value modifies only left and right, while up and down is the same for all turrets. Or, up and down is much higher than it should be, precisely to compensate for the sequential motion.

 

 

There's several other problems unrelated to inertia, I'm going to address them here.

 

 

Target selection, priority, tandem vs independent, target reset for group.

 

Target selection is done in some way, I don't know the specifics, but behavior on its own can tell us a lot about the actual method. In simplest terms, it's in range, closest to ship, until destruction, or until loss of line of fire. That's it, no other selection criteria. As many have noted, out of range is not a fire criteria, but it is an initial selection criteria.

 

There's a problem with in range criteria, as sometimes it will fire but hit nothing because it's actually out of range. The problem is related to calculated distance. I think it's from center ship to center ship, rather than from turret to ship point target, i.e. it can hit specific points on a ship and a ship can be very long as we've seen where one end is way farther than the other end or even the center of the ship. But this problem also occurs with very small targets, where salvaging lasers will fire but hit nothing at close to their maximum indicated range. I've observed that this is about 5-10% of indicated range.

 

There's no priority, no tandem vs independent, no individual reset. No most dangerous, no weakest, no most damaged, no area, etc. Salvaging lasers will chase tiny bits of wreckage because of target acquisition and re-acquisition, and because there's no mass/volume selection criteria or priority. Mining laser will select closest, often keeping lock long after they can't hit the target or even fire because it would hit player's own ship, i.e. hooded turret pods like I made on my current ship.

 

It will not select targets independently, unless in certain situations where selection criteria make it appear as independent selection, i.e. one or more turrets can't fire on selected target and will select a different target in range. This is especially obvious when some turrets are fixed on the top face while other turrets are fixed on the bottom face but all facing forward and the targets are just slightly up or down from horizontal. That's one way to create independent target selection, by the way.

 

With both salvaging and mining lasers, all targets will reset if one of the targets is destroyed. Then, new random targets are assigned. With salvaging lasers, it appears to be smart about selection when it's a bunch of small targets all close together on the same ship, but once they're broken up, that's it for smarts, they're back to chasing the same slow moving tiny bit of wreckage forever again. With mining lasers, if the asteroid is broken in two, often one or more turrets will select a different asteroid altogether, leaving that broken piece alone until that new target is destroyed. This is especially obvious when the new target is closer than the broken piece.

 

 

All of these problems can be fixed and features improved by the modding community, so long as the internals are exposed. We can find the best inertia, the best target acquisition logic, the best user config UI for turret behavior and selection priority and all that, just give us the tools, we'll get it done.

 

For example, I want to configure target selection priority based on area relative to turret position on ship. A simple method is one angle, where one side is high priority while the other side is low priority, or specific ratio or weights, i.e. 25%-50%-75% and so forth. In this method, a weight of zero allows to set an area limit so that turrets select targets only in the 100% area. I'd set my front mining turrets to prefer front targets rather than side targets. I want to configure salvaging lasers to prefer massive targets first, then clean up the tiny bits, or the reverse as the fancy gets me, or even systematic outside-to-inside to get the lifter's cargo holds first for example. I want to set some turrets to work in tandem or pairs and always select the same target.

 

I want to be able to configure burst fire and energy usage. I got professional gunners level 3 controlling state of the art computer controlled independent targeting high precision long range ship busting BFG's, why are they so dumb? "Capt'n says burn, you burn, right through the generator capacity, right through battery reserve, to heck with systems failing, YOU BURN THEM LASORS, got it?" Non-burst guns can do burst fire, I just do it manually, why can't my gunners do the same? "Burst fire on a non--burst fire weapon? Can't do it, Capt'n, just can't, not in my nature, I keep that trigger pressed down." Simple method would be to set max generator/battery depletion, like 25% for example. For burst, just set number of shots and interval.

 

The only thing that does not exist now is inertia for turrets, but inertia is already in the game for ships so it should be simple enough to implement it for turrets, methinks, but then I'm no coder so I wouldn't actually know. Priority mass/volume/danger/whatever, area selection bias, area limit, don't exist. Target selection (in a general sense), burst/energy, all that already exists and can be implemented by modders if they have the tools for it.

 

 

-edit-

Forgot. There's an actual bug where turrets at idle aim in some weird direction, preferably totally opposite their attachment position, i.e. back when positioned to point forward, or up when attached to front face for forward fire. Again, this can be fixed and even improved by the modding community. The code for idle should be part of the overall code for target selection, i.e. when target destroyed or when no target, do function, in this case aim where it's least practical. When new target is in range, turrets always - _always_ - have to turn back, overshoot for a few shots cuz anxious twitchy finger gunners you see, then line up. This problem does not occur with manual control, only with the three autofire modes.

Link to comment
Share on other sites

  • 0

Inertia

1.

a tendency to do nothing or to remain unchanged.

"the bureaucratic inertia of government"

synonyms: inactivity, inaction, inertness; More

2.

PHYSICS

a property of matter by which it continues in its existing state of rest or uniform motion in a straight line, unless that state is changed by an external force.

 

I'm arguing for inertia, for turret behavior, and configuration further down this post. The other threads argue for unrelated functions.

 

Several problems.

 

Twitching, where the turret suddenly loses tracking for an instant, then tracks back just as suddenly. This shows absence of mass and absence of inertia, turrets can actually accelerate and decelerate at infinite rate.

 

Chasing slow moving targets for ages, especially those pesky tiny bits of wreckage. This shows lack of actual tracking. Instead, it's pure target acquisition, and it's done as quickly as "tracking speed" allows, which means quicker turrets appear to track their target, when they merely re-acquire it more often per unit of time. They acquire a target, then stop, then re-acquire it, and so forth. With lasers especially, the beam will appear to make small jumps from one stop-and-go to the next.

 

Losing target lock when moving ship. This is because there is no target lock and no inertia, there is only target acquisition. The instant the target or the ship moves and the turret is now misaligned, it must re-acquire the target, and it does that in steps of stop-and-go as explained above.

 

Large difference between up-down and left-right, and sequential motion rather than simultaneous. The turret will move the gun up or down first to the appropriate position, then move base left or right until target is acquired. It's possible that tracking speed value modifies only left and right, while up and down is the same for all turrets. Or, up and down is much higher than it should be, precisely to compensate for the sequential motion.

Until proven different, turrets are part of ships. One could make a case about barrels being flung around based on the power of the motors, but it makes no sense. In real life, if I stick my arm out the window of a car and the car turns, so will my arm (unless it happens very suddenly and I'm not strapped into the car).

 

Turrets actually do not track at infinite speeds. If they did, you could take the starter mining drone and whip by an asteroid, so long as your turrets have line of sight on that asteroid and you can keep you mouse pointed on it, it would fire... but they don't fire. They stop and rotate. Quickly, mind you, but it's not infinite.

 

I'll agree that targeting is not perfect, but I otherwise don't think I understand what you're trying to say.

 

Large difference between up-down and left-right, and sequential motion rather than simultaneous.

A modern tank is able to move its barrel in both directions at the same time. Not sure what your point is.

 

 

[words]

Yeah, targeting is not perfect and yeah we could have more options for our energy expenditures, although there are power options for which systems drain first and... you know... YOU can let go of the trigger button or decide to hold it to finish an enemy off.

 

As for range, mods could do that, maybe Koonschi will do it in the future. In the meantine, you can approximate the range difference between ship center to ship center by actually keeping in the mind the position of your turrets and your relative ship size.

Link to comment
Share on other sites

  • 0

To understand inertia, there's a few simple experiments you can do yourself. Fill a glass with water, put an object that floats - an ice cube will do the trick - on top of the water. Now turn the glass on its axis. See that the object maintains its orientation as you spin the glass. This is due to inertia - "continues in its existing state of rest or uniform motion in a straight line, unless that state is changed by an external force." In this case, the object's state is "at rest", and it will continue to remain at rest, pointed in the same direction in spite of the glass spinning under it. In order for the object to spin with the glass, it would have to be fixed to the glass, with some thread or something. Then, the external forces would be those threads that maintain the object fixed to the glass, and when you spin the glass, both the glass and the object would spin together. Or, put an ice cube on a plate, then move the plate around. The ice cube will stay in place, as the plate moves under it. The ice cube will maintain its orientation as well. This is best when you let the ice cube melt a little, so there's some water to act as lubricant between the ice cube and the plate.

 

A turret is not the gun itself, it's a system that allows the gun inside it, to move freely and independently of the tank. It's the same as with the water in the glass that allows the ice cube to move freely and independently of the glass. They're all "part of" the glass, just like turrets are "part of" the ship, but not all parts are absolutely fixed to each other. When the tank turns, the gun "continues in its existing state of rest or uniform motion in a straight line, unless that state is changed by an external force." The external forces on a tank's turret are friction and the control motors.

 

In Avorion builld mode, there's turret lock blocks that prevent turrets from turning. It's the same as with the threads to fix the floating object to the glass in the experiment above. The guns are now fixed to the ship, they will not turn independently, they will follow the ship's motion and always point in the same direction as the ship. Without this lock block, the turrets can move and spin independently of the ship, and should "continue in its existing state of rest or uniform motion in a straight line, unless that state is changed by an external force." The external forces here are the same as with a tank's turrets - friction and control motors.

 

But turrets in Avorion don't continue in their existing state of rest even though they're not attached to lock blocks. It's as if the turrets had lock blocks by default, and those lock blocks would be unlocked temporarily only when the turrets would start to track something. So, when the ship turns, the turrets turn with the ship by default, even when they're currently tracking a target. But as I explained, there is no actual tracking, it's just pure target acquisition and re-acquisition, done in steps of stop-and-go. It's not really that they're locked, it's that they have no inertia.

 

Imagine if the turrets were tiny ships instead. They'd have engines and thrusters, and their "tracking speed" would depend on the power of these engines and thrusters. They would have no other way to turn. When the ship turns, the turrets also fire their engines and thrusters to follow the ship's motion. Now imagine that we turn off the turret's engines and thrusters. What would happen to the turrets when the ship turned? Since the turrets have no power to turn, they'd maintain their orientation, while the ship turned.

 

Avorion physics model is quite good. For example, when you hit a bit of wreckage with a projectile weapon, the object reacts and starts spinning and moving away. When two broken pieces of asteroid hit each other, they react and start moving according to that collision. When your ship collides with another, there's a reaction, both ships move according to the collision. When you move forward, if there was no automatic break thrust, the ship would continue to move in that direction even after you released the button, you'd have to move in the opposite direction to decelerate and then stop. When you do that, you have to be perfectly aligned, otherwise the ship now also moves down/up/left/right for a short while depending on the misalignment. There is inertia in the game already. Specifically for those objects that start spinning when you hit them with a projectile weapon, this should apply to turrets, as we "hit" them with the control motors to make them spin around. Without those control motors, they should just float, not moving, not spinning. When the ship turns, the turrets shouldn't turn with the ship be default, they should act like those bits of wreckage, unless the control motors power up to actively turn the turrets.

 

However, the physics model is intentionally limited by artificial thruster brakes for all objects, including those bits of wreckage. They won't move forever, they'll stop at some point. They won't spin forever, they'll stop at some point and then just float in the same spot, not moving, not spinning. All objects have inertia, but it's limited by these artificial thrusters brakes. In fact, since there's friction in turrets because parts that move are in contact with each other, this friction could be emulated with thruster brakes of the appropriate power. So that's something else that's already there that could be implemented on turrets.

 

The functions are all there.

Link to comment
Share on other sites

  • 0
But turrets in Avorion don't continue in their existing state of rest even though they're not attached to lock blocks. It's as if the turrets had lock blocks by default, and those lock blocks would be unlocked temporarily only when the turrets would start to track something. So, when the ship turns, the turrets turn with the ship by default, even when they're currently tracking a target. But as I explained, there is no actual tracking, it's just pure target acquisition and re-acquisition, done in steps of stop-and-go. It's not really that they're locked, it's that they have no inertia.
But turrets are fixed to the ship. They don't float on the hull. What do you think happens to the turret of a tank when it turns?! It turns with the tank. The only way a turret will keep facing the same direction is if its traverse speed is the same or higher than the rotation of the tank. In order to keep pointing the same way, the turret will need to rotate in the opposite direction at the same speed.

 

Imagine if the turrets were tiny ships instead. They'd have engines and thrusters, and their "tracking speed" would depend on the power of these engines and thrusters. They would have no other way to turn. When the ship turns, the turrets also fire their engines and thrusters to follow the ship's motion. Now imagine that we turn off the turret's engines and thrusters. What would happen to the turrets when the ship turned? Since the turrets have no power to turn, they'd maintain their orientation, while the ship turned.
But turrets are not tiny ships, they are very much attached. The gun is not floating on its mount, there are motors and gears pushing it and keeping it in place. Of course the ship's movements will affect the turrets that are bolted on it, even if you don't lock the mount. How do you think the gun holds on the turret? Dark magic?

 

Link to comment
Share on other sites

  • 0

To understand inertia, there's a few simple experiments you can do yourself. Fill a glass with water, put an object that floats - an ice cube will do the trick - on top of the water. Now turn the glass on its axis. See that the object maintains its orientation as you spin the glass. This is due to inertia - "continues in its existing state of rest or uniform motion in a straight line, unless that state is changed by an external force." In this case, the object's state is "at rest", and it will continue to remain at rest, pointed in the same direction in spite of the glass spinning under it. In order for the object to spin with the glass, it would have to be fixed to the glass, with some thread or something. Then, the external forces would be those threads that maintain the object fixed to the glass, and when you spin the glass, both the glass and the object would spin together. Or, put an ice cube on a plate, then move the plate around. The ice cube will stay in place, as the plate moves under it. The ice cube will maintain its orientation as well. This is best when you let the ice cube melt a little, so there's some water to act as lubricant between the ice cube and the plate.

 

<snip>

 

 

There is a HUGE flaw in your argument here... Gravity and self determination. While you are correct that the Ice cube will float in water and maintain the Yaw, if you lift the glass on the Z axis, the Ice cube will still move... The Ice cube is still fixed in place to the glass through gravity and its position in space is determined by that bond...

 

Yes, that is a half argument... but there is more... that Ice cube has no way to to Aim itself without a physical (newtonian) bond to a structure to change its Pitch and Yaw. As soon as you add that force, the ability to aim itself... It's orientation is bound to the orientation of the master object.

 

Even if you engineer some sort of antigrav forcefield that maintains perfect a weightless state within the hull of the ship, attempting to create an aiming/targeting system that relies purely on it's own internal thruster system, you'd end up with something that is nowhere near as efficient or accurate. Physical orientation is far more precise and efficient. Just compare the brakes on your car to retro thrusters... Units that are physically connected also have the advantage of communication and collaboration, An M1A1-Abrahms can destroy 6 different targets in under 15 seconds while on the move over heavy and varying terrain, because the onboard computer can pass the telemetry of the hull to the turret.

Link to comment
Share on other sites

  • 0

Not a flaw, just a simple example of inertia. In fact, you just made my case.

 

A ship's turrets cannot aim on their own, unless acted upon by an external force.

 

A turret is two joints attached to each other and one of them attached to a base, which in turn is attached to the ship. The base is fixed to the ship, it cannot move freely, it follows the ship's motion in every way. (viewed from above) The first joint - the platform - rotates on the z axis. The second joint - the gun mount - rotates on the x axis. We will call the platform and the gun mount - moving parts. The base is fixed, it's not a moving part. In the case of a tank for example, the base is the tank itself. In the case of spaceships in Avorion, the base is the ship.

 

These moving parts have mass and inertia, and will maintain their orientation unless acted upon by an external force. The mere act of changing their position - just like if we lifted the glass up and down - does not also change their orientation. For that, an external force is required, namely friction and control motors.

 

However, when we turn the ship, turrets also change their orientation - they aim on their own. This indicates absence of mass and inertia. Turrets are fictitious entities that have no mass, no inertia, can accelerate and decelerate at infinite rate, with the only thing (the only external forces or natural forces) controlling their motion being some invisible force that keeps their orientation the same as the ship regardless of ship's motion, and tracking speed, and range of motion limits determined exclusively by the turret's own parameters (if the turrets reach and surpass these limits as the ship turns, these become external forces that cause the turrets to "aim" themselves).

Link to comment
Share on other sites

  • 0

Turrets move in different directions using motors, rails, gears, axles, you name it which physically bind them to the base, which is physically bound to the hull. This is exactly like your arm's articulation. If you hold your arm still and turn around yourself, your arm won't stay in place, it will rotate with you. Even if you leave it limp, it will rotate with you.

 

At this point, I'm going to assume you're trolling if you don't get it.

 

 

Link to comment
Share on other sites

  • 0

Yes, that is a half argument... but there is more... that Ice cube has no way to to Aim itself without a physical (newtonian) bond to a structure to change its Pitch and Yaw. As soon as you add that force, the ability to aim itself... It's orientation is bound to the orientation of the master object.

That's a good argument. A turret's tracking speed will be affected by the ship's motion. For example, if the ship turns one way, and the target is the other way, the turret must overcome the ship's motion just to start moving toward the target. If its tracking speed is lower, it can never catch up.

 

However, inertia - if it was implemented in the game for turrets - would compensate for this bond because no matter how quickly or suddenly the ship turns, the gun obeys inertia and could not follow the ship's motion in the first place, unless of course acted upon by an external force. You said it yourself, an M1 can take out a bunch of baddies real quick because its control systems are designed to take into account inertia. How much effort does the motors really need to keep the target sighted in? Very little, inertia does most of the work.

 

But, if the target is in the same direction the ship is turning into, the turret must now turn harder to compensate for both its inertia and the ship's motion.

 

The "imagine if turrets were tiny ships with brake thrusters" was an example to illustrate inertia, not a suggestion. However, the core block of a ship when we found it the first time contains invisible thrusters so that too already exists in the game. Incidentally, I found that out the hard way when I turned my core block before I went to build mode - I now had two core blocks overlapping each other, nothing I could do about it but destroy it and found a new ship.

Link to comment
Share on other sites

  • 0

However, inertia - if it was implemented in the game for turrets - would compensate for this bond because no matter how quickly or suddenly the ship turns, the gun obeys inertia and could not follow the ship's motion in the first place, unless of course acted upon by an external force.

The ship itself is your external force being applied on the turret. Physically applied because it's bolted on. Which is exactly what is currently happening, because there is inertia in the game already and it does apply to turrets.

 

Link to comment
Share on other sites

  • 0

Turrets move in different directions using motors, rails, gears, axles, you name it which physically bind them to the base, which is physically bound to the hull. This is exactly like your arm's articulation. If you hold your arm still and turn around yourself, your arm won't stay in place, it will rotate with you. Even if you leave it limp, it will rotate with you.

 

At this point, I'm going to assume you're trolling if you don't get it.

The arm turns with the body because it is attached via the shoulder. The shoulder is not a fixed bond, it allows the arm to move within a range of motion. When the body turns, the arm follows, but not instantly, it must catch up, as its own inertia tends to keep it where it is. As the body turns, it turns the shoulder, the shoulder in turn then pulls on the arm, the arm then moves according to this vector, gravity maintains the arm straight down, the arm then turns with the body with a slight tilt in the direction of the shoulder pull vector, this tilt is due in part to gravity.

 

The question is, do turrets in Avorion have inertia, and would it fix multiple problems all at once if they had inertia, and would the modding community know what to do with it if they were given access to the functions through scripts for example?

Link to comment
Share on other sites

  • 0

However, inertia - if it was implemented in the game for turrets - would compensate for this bond because no matter how quickly or suddenly the ship turns, the gun obeys inertia and could not follow the ship's motion in the first place, unless of course acted upon by an external force.

The ship itself is your external force being applied on the turret. Physically applied because it's bolted on. Which is exactly what is currently happening, because there is inertia in the game already and it does apply to turrets.

The turret is attached to the ship, the gun is not. It's attached to a joint that rotates on the x axis, which itself is attached to another joint that rotates on the z axis, which this one is attached to the base which is attached to the ship, which then becomes the base as both the turret's base and the ship now form a single object with regard to motion. These joints allow independent motion of the gun. Inertia would keep the gun pointed where it's at no matter what the ship did.

 

Unless acted upon by external forces, i.e. motors, gears, rails, etc. These forces are what cause the gun to change its orientation, not the ship's motion. Ship's motion can only cause the gun to change its position, unless the ship's motion is far enough to bring the gun to its stops, then the gun follows ship's motion according but only at that point does it do so. When the gun is not even close to its stops, there's nothing (except friction) to cause the gun to change its orientation, unless the control mechanisms are designed to turn it with the ship for some reason. Is this what's happening, the gun is intentionally misaligned by its control mechanisms when the ship turns so that it must re-align with its current target? Is that what happens with an M1 tank? I don't think so, do you?

Link to comment
Share on other sites

  • 0

Make up your mind Martin.

 

Either the turret is mounted on the ship in a way that it can aim (gears and physical mounts) or it is free floating in space and immune to the ships movement... you CANNOT have both... If the turret is connected and can aim, it can track a moving target... If it is NOT connected and stays pointing in the same direction when a ship turns... it lacks the Newtonian ability to aim itself at a moving target...

 

The turret is attached to the ship, the gun is not.

 

 

Just wow.  This logic means the steering Wheel in your car is not connected to the car, just to the steering column...

 

 

It's attached to a joint that rotates on the x axis, which itself is attached to another joint that rotates on the z axis, which this one is attached to the base which is attached to the ship, which then becomes the base as both the turret's base and the ship now form a single object with regard to motion. These joints allow independent motion of the gun. Inertia would keep the gun pointed where it's at no matter what the ship did.

 

 

Again, then how does the gun aim if it has NO anchor to leverage from?

 

 

 

Unless acted upon by external forces, i.e. motors, gears, rails, etc. These forces are what cause the gun to change its orientation, not the ship's motion. Ship's motion can only cause the gun to change its position, unless the ship's motion is far enough to bring the gun to its stops, then the gun follows ship's motion according but only at that point does it do so. When the gun is not even close to its stops, there's nothing (except friction) to cause the gun to change its orientation,

 

 

Exactly, it can't aim

 

 

unless the control mechanisms are designed to turn it with the ship for some reason. Is this what's happening, the gun is intentionally misaligned by its control mechanisms when the ship turns so that it must re-align with its current target? Is that what happens with an M1 tank? I don't think so, do you?

 

You have tossed out logic a while back, Whatever the M1A1 does it does it Badass..  and it does it with engineering not "inertia"

 

 

 

Link to comment
Share on other sites

  • 0

Whatever the M1A1 does...it does it with engineering not "inertia"

Let's see if that's correct.

 

Remove all this engineering, all the control systems, all the gears, but keep the turret otherwise intact so that it can still turn on its axis and the gun can still tilt up and down, all of it well lubricated. Now, what happens to the gun when the tank turns? Rather, what is the device through which motion of the tank is transferred to the turret and then to the gun? Without all that engineering, the only thing left is friction. So, apart from friction, what would cause the gun to follow the tank's motion? The answer, of course, is nothing. So what happens to the gun and why?

 

Once you understand the answer, you now understand what all that engineering relies on to do its job.

 

From there, we can understand what the control systems do to keep the gun lined up - they certainly do not purposely cause the gun to lose tracking when the tank turns. On the contrary, they apply force in the opposite direction, but only as much as needed to compensate for friction.

 

Now that it's clear what's going on, what would cause the ship's turret to follow the ship's motion? Keep in mind that there's no gravity, so friction is much lower, and would only increase if the ship's motion pushed the turret and the gun toward their anchors, and only so long as it was accelerating. Once constant linear velocity is achieved, friction would return to its lowest.

 

If it's spin, there's a tiny bit of linear acceleration initially, but almost immediately after, we're dealing with centripetal force, which would cause the turret and the gun to be continuously pushed against their anchors, thereby increasing friction, right up to the point where there was so much friction that they would become fixed in position against their anchors and would now start to spin at the same rate as the ship. When a ship turns, it's spin, so we are dealing with centripetal force, but is that force so strong when the ship just begins to turn?

 

Back to the tank to illustrate the validity of such low tracking speed in Avorion. With the M1, which can spin quicker, the tank or the turret? More specifically, can the turret be spun in the opposite direction quicker than the tank's turning rate? If no, then it cannot maintain target lock, it can't do anything badass, but it does, therefore the turret can turn in the opposite direction quicker than the tank's turning rate. We're talking about a real tank with real tech. Avorion is about huge spaceships that jump light years to the next system in seconds. What kinds of retarded tech would be required to cause the ship's turret to be less nimble than the ship? Certainly not as advanced as current real tech used in the M1, right? Maybe it's actually really smart code, but it's missing a critical element that is found with real tech. What could that be, I wonder?

 

Were you aware that tank guns are always mounted perfectly in balance? If they weren't, they'd either tend to stick up or down, and would require an external force to bring it back to level. If the gun is always level because it's mounted perfectly in balance, what happens to it when the tank hits a bump? It's the same answer as above. Smarter designs also have a fluid or weight system that transfers mass forward when the gun is loaded to compensate for the shell's mass which would otherwise tilt the gun upward. Even smarter systems do this automatically with the same control systems used for the rest of the turret.

Link to comment
Share on other sites

  • 0

Again, then how does the gun aim if it has NO anchor to leverage from?

To your question, this one.

 

What is the anchor through which the ship causes the guns to lose tracking when the ship begins to turn? Besides friction. If you answered "the turret", it still does not tell us the specific anchor, there's many anchors in a turret. Is it the base? But the base is attached to the gun mount via a swivel that can rotate freely. Is it the gun mount? But the gun mount is attached to the gun via another swivel that can rotate freely. Is it the control systems, i.e. the gears, the motors, etc? But those things should be designed specifically to maintain tracking independently of the ship's motion. So what is the anchor here?

 

It's a fair question. Technically, when the gun loses tracking, it is aiming, but of course it's aiming at the void, not at a valid target. So, what anchor causes the gun to now aim at the void, when just a moment ago it was aiming at a valid target?

Link to comment
Share on other sites

  • 0

it lacks the Newtonian ability to aim itself at a moving target...

From wiki: https://en.wikipedia.org/wiki/Newton%27s_laws_of_motion

First law: In an inertial reference frame, an object either remains at rest or continues to move at a constant velocity, unless acted upon by a force.

That's the anchor which allows the gun to be aimed at a moving target. The gun uses the ship's inertia to change its own position and/or orientation. It does this through a third object called a turret, which is composed primarily of 2 (3, if we also count the ship in absolute terms to obey the Third Law) moving parts interconnected via swivels that allow free range of motion on their respective axis, and via motors and gears that allow force to be transferred between those moving parts. Without the motors and gears, the swivels allow the gun to keep its aim due to its own inertia, minus friction across the contact surfaces. A properly designed turret (and properly designed control systems) allows the gun to keep its aim, in spite of the base's motion. That is not what happens in Avorion.

 

What you refer to is Third Law. Third Law is the natural product of First Law. A more complete definition of Third Law is:

 

When a body exerts a force on another body, this force acts on and overcomes both bodies' own inertia and in proportion to their respective masses and velocities.

Link to comment
Share on other sites

  • 0

Man this physics discussion is hilarious to watch.

 

However, here's another flaw with your idea.  Game performance is related to how many calculations a game has to do at any given second and how quickly the game can run those calculations.  If every turret were treated like a ship with it's own center of mass and inertia how many more calculations would the game have to be doing?  5 times as many?  10 times as many?  Keep in mind this is per ship.  In Kerbal Space Program every part of the ship has it's own mass and physics calculations.  This causes the game to start lagging when you get a few hundred parts on screen.  Maybe a high end machine could handle a thousand.  In From the Depths each turret is a sub construct with it's own mass and again this causes the games performance to plummet once you get more than a dozens ships going at any one time.  Also, the bigger the ships you have the few you can have active on screen.  In Avorion you can have a ship that is armed with 50+ turrets and fly it in a sector with dozens of other ships each carrying 6 to 12 turrets of their own.  Add to that fighters if a battle gets going.  Implementing turret inertia would easily double maybe even triple the load on the game meaning battles would have to be scaled down.

 

And for all we'd be giving up, what benefit is this?  I'm a dog fighter.  When I point my ship's nose at something I want my turrets to maintain their orientation to the ship because I'm intending to shoot the target I'm pointing my ship at.

Link to comment
Share on other sites

  • 0

All objects in the game have inertia and invisible brake thrusters. Asteroids, ships, bits of wreckage, all of it. The biggest impact on performance is collisions and explosions. The reason for this is the creation of new independent blocks. A ship explodes, its pieces now become free of the main object. A moment ago there was only one object with one inertial state, now there's several each with their own inertial state, all at once instantly. But almost immediately after that's done, it's steady state again and performance goes back up to normal. A few more individual bits with their own inertial state will impact performance exactly zero especially for collisions and explosions since turrets do not collide nor do they explode. On the contrary, when its block blows up, the turret is deleted (and there's one fewer block to calculate) and instead we get pretty loot to pick up. In the steady state, the biggest impact is not inertial state, it's geometry, that's it. Even then, my 8 year old machine can handle it just fine. I'm running a GTX285, that's probably the oldest top GFX, and an i5 of the same generation as that GFX. What ancient machine do you have that its performance would be impacted so significantly?

 

So you like to control your guns manually, then you don't need turrets. Fixed gun mounts is good enough for you. The game has what you need - turret lock blocks. You'd be giving up exactly nothing.

 

Here's an idea for you. I thought of making a long gun port, like a tube, with a lock block all the way in the back. The turret would be invisible from all directions except directly in front, with corresponding protection just from the narrow angle to reach the lock block it's attached to. Projectiles would shoot out the gun ports. You could have 5 guns per square gun port, more for different shapes or if you use smaller lock blocks. Make it pretty with glass blocks for the port's sides like a clear tube so that it would glow as each shot goes through. Well, it's just an idea.

Link to comment
Share on other sites

  • 0

However, here's another flaw with your idea.  Game performance is related to how many calculations a game has to do at any given second and how quickly the game can run those calculations.  If every turret were treated like a ship with it's own center of mass and inertia how many more calculations would the game have to be doing?  5 times as many?  10 times as many?  Keep in mind this is per ship.  In Kerbal Space Program every part of the ship has it's own mass and physics calculations.  This causes the game to start lagging when you get a few hundred parts on screen.  Maybe a high end machine could handle a thousand.  In From the Depths each turret is a sub construct with it's own mass and again this causes the games performance to plummet once you get more than a dozens ships going at any one time.  Also, the bigger the ships you have the few you can have active on screen.  In Avorion you can have a ship that is armed with 50+ turrets and fly it in a sector with dozens of other ships each carrying 6 to 12 turrets of their own.  Add to that fighters if a battle gets going.  Implementing turret inertia would easily double maybe even triple the load on the game meaning battles would have to be scaled down.

 

I disagree.  This wouldn't actually add much.  KSP also puts an emphasis on accuracy, and the parts aren't really attached to each other firmly - they're attached with springs, which makes things much more complicated.  In this case, the constraints would be nice and clean, so you'd add maybe a handful of multiplies and adds for each one.  Plus, these calculations are all nice and independent, so they should parallelize well.

 

This is really a basic part of a good tracking speed system, and such a system would go a long way toward giving small ships a role to play in battle.  Right now, bigger is better, and that's not always fun.

Link to comment
Share on other sites

  • 0

Yeah I was thinking about the inertia interaction between turrets and the ship. It gets real complicated when turrets have linear inertia. When the ship turns, it exerts force in a linear fashion on the turrets (never mind that this linear motion becomes circular motion when the turret is attached away from the center of mass of the ship so we'd have to deal with centripetal force and such), this would have to be calculated.

 

But the solution is simple, ignore linear inertia and only do spin inertia (a better word for this is torque, and good models for this can be found in racing games) for the turrets (more appropriately the guns, or if we want to be fancy the gun mount and the rotating platform as well, but if it's just the guns it's enough to give the illusion of full inertia model as the gun mount and the platform would have to work against the gun's inertia appropriately) themselves. This would be the same as bits of wreckage flying away instantly at infinite velocity, but they would still obey spin inertia so they would only accelerate and spin accordingly. But since turrets are attached to the ship, they can't fly away, they follow the ship's linear motion.

Link to comment
Share on other sites

  • 0

It gets real complicated when turrets have linear inertia. When the ship turns, it exerts force in a linear fashion on the turrets (never mind that this linear motion becomes circular motion when the turret is attached away from the center of mass of the ship so we'd have to deal with centripetal force and such), this would have to be calculated.

 

This isn't complicated at all.  This just means that the inertia of the turrets' mass applies torque to the ship when it turns or stops turning.

Link to comment
Share on other sites

  • 0

I figured out the simplest way to simulate inertia on turret/guns is:

 

Turret - ship = turret current tracking speed

 

So, whatever the ship is doing, subtract that from the turret's motion, i.e. from its tracking speed. For example, if the ship is turning right at 1deg/s, then the turret turns left at 1deg/s. This maintains the turret's orientation as the ship turns, thereby simulating the turret/gun inertia. But if the turret's tracking speed is lower than the ship's motion, the turret will have to catch up to track back to its target because the subtraction will result in positive, i.e. 1deg/s - 0.5deg/s = +0.5deg/s, the turret will follow ship's motion at 0.5deg/s until the ship stops moving and the turret can now turn at its full tracking speed of 0.5deg/s.

 

===

 

Turret tracking behavior is determined in large part by the target acquisition tick rate, between 2/s and 3/s from what I've observed. This also determines reaction time when the ship turns. For example, when the ship turns, the turret follows ship's motion for 0.3s, thereby making it look like it has no inertia for that time. Increasing target acquisition tick rate will also simulate turret inertia, as the turret will react much quicker to ship's motion.

 

Gunner's level could increase target acquisition tick rate accordingly, to give them greater value. For example, untrained = - 1/s, level 1 = no change, level 2 = +1/s, level 3 = +2/s.

 

===

 

Combined with the target acquisition tick rate, tracking behavior is also determined by the start-and-stop target acquisition behavior. It does not track the target as the target moves, instead it turns to line up, then stops, if the target moves or is moving, it turns to line up again, then stops again, and so forth. This is especially obvious with beam weapons, as the beams appear to jump at the tick rate. It is most especially obvious with high tracking speed, above 2.0. I tried it with tracking speed 5 and the twitching problem is so bad, it leads me to believe that the source of the twitching problem is this start-and-stop target acquisition behavior.

 

Most likely the problem occurs when the turret stops. Probably because it's now idle with regard to orientation, not firing, therefore uses the idle code for this part of tracking. The code for idle points turrets at some target, typically the last target, or some point in space, always anywhere else but directly in front. This idle code has to be fixed, cuz it's just retarded. Idle turrets must point in their default install orientation.

 

A simple solution is to never stop. Instead, when target is acquired, continue to turn the turret at a fraction of its tracking speed in the same direction. So, instead of start-and-stop, it's fast-and-slow. Maybe except if target is stationary. But even if target is stationary, salvage beams for example will sweep back and forth as they turn to acquire, turn slower, overshoot, turn back, turn back slower, overshoot again, and so forth. With this solution, acquisition tick rate will determine sweeping rate as well. So, while it will fix problems, it will also add some simulation of realism.

 

===

 

Manual control should remain untouched, it works fine as it is. The above is specifically to address IT turrets when in automatic mode.

Link to comment
Share on other sites

  • 0

As far as I can tell martin, you seem to have a misconception about how turrets themselves work.

 

You seem to think that turrets are purely sat on an effectively friction-less mounting, so they can with no effort maintain aim angles while the vehicle they are mounted on turns. (this raises a question with how the turret turns when it is only attached with a friction-less mount)

 

I'm pretty sure that yes, most turrets are mounted on a bearing ring or similar structure that cuts friction down, but this is not to allow them to maintain facing while the turret turns, but to reduce friction so that the gears/etc that drive the turret don't have to deal with friction of the base of the turret against the hull of the vehicle.

So in effect the turret is "fixed" to the hull by the gear/etc system, which is what allows the turret to turn when you want to aim at something.

 

And you saying that turrets should never stop moving and constantly sway back and forth as this would be "realistic", this is just.... no?

Why would you want a turret that can't keep itself pointed steadily at a stationary target?

At the ranges we're dealing with in avorion (easily 4km+) even the slightest movement of a turret will result in your shot going tens or hundreds of meters off target.

As such you're basically suggesting that turrets should be incapable of aiming at long range.

Link to comment
Share on other sites

  • 0

A computer control system (i.e. auto-aim, or in game terms aimbot) for turret is intended to maintain target in sight. It does this with the help of the turret's own inertia, i.e. the gun stays pointed wherever it's pointed because of its mass, the control system compensates for friction and for linear motion which also changes angle or alignment as the ship/target do not necessarily move in parallel in the same direction. If we acknowledge lag within this control system, then we can argue that the turret should turn with the ship for a short time while it lags behind as it reacts to ship's motion. However, inertia does not react, it always acts, the gun is never going to follow ship's motion if there's nothing to cause it to do so, i.e. no friction, no reaction lag from the control system, no lock pin on the gears/motors, it's not yet reached its stoppers or range of motion limits, etc.

 

An object at rest remains at rest unless acted on by some external force.

 

So, if we argue for control system lag, how realistic is it to say for example it takes about 0.3s for the system to react to ship motion and engage its motors to turn the turret in the opposite direction to keep the target in sight, or in this case to track back to its target because it has lost target lock due to this lag?

 

In real systems, motors and gears and whatnots are specifically designed to take full advantage of inertia, i.e. they do not oppose its action because the action of inertia is an integral part of the tracking system. For example, it uses gyro assemblies that detect all rotational motion. I searched and found a few where it's a box with gyros inside and connectors for the system. You attach the box to the moving part you wish to control, when this part moves, the gyros apply some force on the motion detectors, the system then interprets this and sends the appropriate signals to the motor controllers and so forth.

 

When this happens, the motors are not turning the turret in the opposite direction with lots of force. Instead, they turn it with only as much force needed to compensate for friction, because inertia does most of the work (without friction, inertia does all the work). In other words, the motors do not compensate for the whole turret's mass/inertia, only for its friction.

 

The above is when it's keeping its target in sight. When it must turn to acquire a target, then the system sends the appropriate signals to the motors/etc, which then apply as much force as they can to turn the turret as quickly as they can. In this situation, we're dealing with tracking speed in the game.

 

Think of the motors themselves. How are they activated, how is their force generated? It's not by some physical device that's always attached, it's by electromagnetic force between rotor and stator. Now imagine that the entire turret was one big motor with only electromagnetic force to make it turn (ignore friction for the moment). Would this EM field always be on, therefore always prevent the turret from turning? Of course not, the control system would be designed smartly to prevent that, and would only apply force when needed. A mechanical control system is designed just as smartly, it does not prevent the turret from turning (or from staying put) unless it's actively acquiring a target, at which point it must overcome inertia to do so.

 

===

 

The fast-and-slow suggestion is to compensate for the start-and-stop behavior. With current behavior, it does not track, it acquires target, then stops, then re-acquires target, then stops again, and so forth. This causes the salvage beams for example to chase tiny bits forever, until somehow the bit goes out of range, or by some lucky twitch of the turret (it's a bug), the beam finally hits the bit and it gets destroyed. But 1 minute to chase a slow moving tiny bit of wreckage is just retarded. Instead, with fast-and-slow, the turret will acquire target at full tracking speed, then slow down to a fraction of its tracking speed, overshoot, re-acquire target at full tracking speed, slow down again, overshoot again, and so forth, thereby sweeping across the target instead of chasing it, giving it a much greater chance to actually hit the bit without relying on the twitch bug. It's a beam, if I was in control of it, I'd sweep across it, which is exactly what I do in game anyways when I control salvage turrets manually.

 

With other moving targets like baddies, it becomes much more realistic as well. We're talking 5-10km away, not a few hundred yards. Even if it was just a few hundred yards, with automatic weapons, sweeping is standard procedure just to get 1 bullet to hit, that's all that's needed for living targets anyways. The reason for sweeping is to use tracers to home in on the target, that's the sole purpose of tracers. In game, all projectiles are tracers. With modern computer control systems, there's radar that tracks the bullets, compares against the target, adjusts accordingly. This will result in a sweeping action, albeit an ever decreasing sweep as it will eventually zero in and then actually track.

 

Inertia always acts. An object in motion remains in motion unless acted on by some external force. If the turret is set in motion - it's made to turn - it will continue to turn unless it's acted on by its control system. If a target moves across its field of fire in a constant linear fashion (it does not swerve or change direction), tracking is easy, just set the turret in motion to match target motion, then let it go as inertia does the rest. Of course the control system is mechanical and is always in contact, so it can't let it go. Instead, it compensates for friction losses by helping the turret maintain its orientation, i.e. it tracks the target.

 

===

 

We cannot argue simultaneously that turrets should be able to track a target dead on, while also arguing that it must follow ship's motion as the ship turns even only for a short time (reaction lag). The way it tracks a target is by using the turret/gun inertia (the turret is set in motion synchronized with target motion, then let go as the turret/gun inertia keeps the gun in sight), and the way it cannot follow ship's motion is also by using the turret/gun inertia.

 

So basically there's only two things that oppose the turret/gun inertia - friction and reaction lag, neither of which would be significant for our purpose.

 

===

 

I accidentally figured out how to get around several behavior problems with salvage turrets especially. I wanted to create a 5 point cross with the beams to overcome the chasing part, that's how I discovered the other benefits.

 

3 IT turrets - 2 doubles, 1 single

Install on angles all facing same direction, I prefer front

1 double on an angle at whatever orientation, the other double on another angle cw/ccw 90d from the first, this creates two different fields of fire, key to independent target acquisition

Each double on each side of the ship, the single with one of the doubles

Turrets should be a bit mismatched in range, about 100-200m

 

Because of the angle installation, one of the doubles will have its beams 90d from the other, in conjunction with the other double and the single, it creates a 5 points cross that can catch bits more easily. The two fields of fire created by the two angles 90d from each other somehow prevent tandem operation with regard to target acquisition, i.e. they no longer all go for the same bit, instead they all go for different bits independently. At first I thought it was a matter of the odd number of turrets, but then I tried with another single to get 4 turrets and they continued to act independently, so I believe it's the different fields of fire that matter most for independent behavior with regard to target acquisition. Range difference also matters a little, as some turrets acquire targets before others as the ship moves towards targets. Even when the ship stays put, individual turrets will engage their own individual target.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...