tsunamayo / Starship-EVO

Welcome to Starship EVO bug tracking repo !
116 stars 17 forks source link

[Suggestion] Turret Calibration #6025

Closed Tackietacktack closed 6 days ago

Tackietacktack commented 2 weeks ago

Short Description of the issue:

https://github.com/user-attachments/assets/8e63a6d8-4cf8-4999-9370-0ecc33c23d07

In the video you see a turret calibration. It take much time because the turret is build of a large ship with too much CEs. Every time if i take the ship controll all turret make a calibration. my idea is now, that turret calibration could be save and the game don´t every time if i control a ship or spawn a ship must make a calibraton. i can imagination that it could save resource and performance and give us some more possibilities.

What did you think?

ProPeach commented 2 weeks ago

I was facing a similar issue on a mech where I was using a turret to control the whole torso and arms - I had multiple copies of the same mech on the same bp and it took a full minute to compute the turret collisions, but when I deleted the other copies of the mech (reducing the number of child entities on the grid, but not anywhere near the turret) it brought the compute time down to 3 seconds or so. It seems the turrets check every CE on the ship to know if there are any close to the turret.

Have you thought any more about your idea of scrapping this turret implementation like you mentioned here Tsuna? https://github.com/tsunamayo/Starship-EVO/issues/4963#issuecomment-1283142540

I definitely think it's the right way to go, it'd make your and our lives a lot easier lol. Between that and being able to toggle a turret on/off with a switch, turrets would be a really good place

tsunamayo commented 2 weeks ago

@ProPeach Well yep I still want to do it, the pb and the time consuming thing will be to do the migration of existing ship. Do you guys thing it is acceptable to just do a azimutal and elevation min-max? That would make my life easier for sure. Aslo for the auto-calibration, yes I would save the result, but I would also do it in real-time, ie you would see the turret move for a few seconds, try out different positioning. Cheers

ProPeach commented 2 weeks ago

@tsunamayo I think a min/max degree input would cover most scenarios yeah. It would be nice to be able to visualise those somehow rather than just inputting them into a text box, especially as rotors for example can be placed in any orientation so your're never sure which way is "0" without some trial and error. The dream could be a protractor style widget with draggable handles or similar, but I know these things aren't always feasible.

Personally I wouldn't be too mad if I needed to update turrets on existing builds if I knew they would now work much more smoothly and reliably, especially if the process was quick and simple to do. Maybe I'm a little bias as none of my ships have tons and tons of turrets lol

Oh, small thing but when you're doing a pass on turrets, could you make rotation rate scale with mass? Like the current mass limit implentation with hinges etc, although maybe with a minimum speed of 2 degrees a second rather than not being able to move at all. Battleship turrets are whipping round as fast as our mice can move which looks pretty odd lol

asanagisae commented 2 weeks ago

What if turret rotation rate scaled with the largest laser block on it? Turrets with 1/2m lasers are fast at turning and can lock onto small targets really quickly. Turrets with 4m lasers turn very slowly, but their damage and larger AoE means that they're suitable for taking down larger, more heavily-armored targets.

Strategically, lasers of a certain scale are good at taking down ships of a similar size to it, plus or minus 1. If the target is too much smaller, you won't hit it. If the target is too much bigger, you won't deal significant damage. This encourages having a fleet of ships both large and small at all stages in the game. Heavier battleship cannons will actually feel heavy, and building strategic point defense turrets will be rewarded.

Tackietacktack commented 2 weeks ago

One problem by velolity could be that we can build turret linked to a 1/8 fake laser for targeting and using 4m beams for shot. I think its could be better if the turret mass or mechanisme scale give the velolity.

If i understand it correct, turrets don't need to calibrate if we have min/max degree, so that could be a good solution.

tsunamayo commented 1 week ago

@ProPeach Regarding the drag feature: everything is possible, it is just a question of time spent, I think it is not a small dev so not sure if it is worth it... I will try to do the turret asap though, I had planned to do a big pass on weapons as I will resume working on space / mid-late-game content anyway.

ProPeach commented 1 week ago

For the drag feature - there are many bricks with a configurable volume like the shipyard, gravity generator and volumetric sensor that currently use text inputs by might benefit from the draggable volume/gizmo method. Would the work done to implement it for turrets also be useful for those bricks? That might make it feel a bit more worth it, admittedly those are cubic volumes rather than arcs of fire so maybe not directly comparable.

Maybe a lower investment alternative would be a diagram in the turret core showing the arcs of the turret as you input angles into the text box? A bit like the preview in the mech core. Fundamentally any way of visually showing the player what they are changing as they are inputting angles would be helpful

ProPeach commented 1 week ago

Just imagining what a 3D draggable gizmo would look like - The blue spheres are the elevation handles, and the red spheres are the yaw/rotation handles. The green area is drawn between them to show the designated "safe" angles for the turret

image image

Tackietacktack commented 1 week ago

Just a idea. if you made a draggable gizmo, could it be make it sense, that it is compatible with other things. That all mechanism could get a gizmo and don't only the turret? Or for sequencer gate. It isn't important, could be that it is easier and you have later acces to it?

tsunamayo commented 1 week ago

@ProPeach Actually I had started to work on something exactly like that yesterday just before you posted. I will try to make the gizmo handle work.

tsunamayo commented 1 week ago

wip, still needs to deal with negative elevation and case when the min/max needs to wrap beyond -180/+180deg.

https://github.com/user-attachments/assets/55ba8e11-1c93-497b-8c06-c267e7766f5b

ProPeach commented 1 week ago

Ooh that's smooth! I like the middle blue handle to rotate the whole arc too

najlitarvan commented 1 week ago

wip, still needs to deal with negative elevation and case when the min/max needs to wrap beyond -180/+180deg.

2024-10-10.17-01-21.mp4

are there any plans to touch other things on turrets? like ability to turn them on/off without having to leave the controls?

asanagisae commented 1 week ago

It would be perfect if we could have turrets return to resting position if they haven't aimed at a target or been shot at for 5 seconds. There have been quite a few players who tried to build turrets that retract into the hull after battle, but this doesn't work very well unless the turrets can consistently return to resting position without needing the pilot to leave their seat.

BigBadKangaroo commented 1 week ago

wip, still needs to deal with negative elevation and case when the min/max needs to wrap beyond -180/+180deg. 2024-10-10.17-01-21.mp4

This looks already amazing!

But I agree on the logic related things for turrets. An on/off option would be really handy. Some more logic inputs for turret in general would be great, like 'target locked' etc.

tsunamayo commented 6 days ago

Okay the new update is there for testing! Tell me how it goes, my turret and what I tested were fine but maybe some other might be bugged. @BigBadKangaroo If you can make me a suggestion with the event you want to see triggered that would be great!

BigBadKangaroo commented 5 days ago

@tsunamayo So I checked the new turret mechanic and I really like it.

I tested some of my older builds and upgraded them, as well as some of my newer ones. On my side it works just fine. A really, really great upgrade to what we had before! I thinks it's the right amount of working with something visual (the gizmos) and some numbers inside the turret computer. It's really easy to set a new turret up and adjust it just perfectly for the usecase.

The already added options should be enough for most usecases, at least I don't know what should be added that is not possible to do with the now existing ones.

tsunamayo commented 3 days ago

@BigBadKangaroo Thanks, I wish I have went this way from the beginning. Cheers