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

Allow merging Force fields to make larger custom shapes #393

Open
Darin755 opened this issue Jan 6, 2025 · 4 comments
Open

Allow merging Force fields to make larger custom shapes #393

Darin755 opened this issue Jan 6, 2025 · 4 comments
Labels
Enhancement New feature or request

Comments

@Darin755
Copy link

Darin755 commented Jan 6, 2025

Right now the force field is limited due to it only being able to cover either a square or spherical area. Also it can only be provided by a single node which means that if it is destroyed all shields are lost.

Instead, it would nice to be able to merge fields to make a one big field. The actual merger would only work if the two fields were perfectly aligned. The idea is that any surface where two fields touch would just become air.

To keep this from being abused a shared secret could be used. Anyone on the outside couldn't extend the field unless they know the key. For added security this key could be rotated with digilines.

@BuckarooBanzay
Copy link
Member

To keep this from being abused a shared secret could be used. Anyone on the outside couldn't extend the field unless they know the key. For added security this key could be rotated with digilines.

in star trek/wars speak that would be "shield harmonics" or something like that :)

Are you aware of any 3d libraries (lua i guess) that can handle merging geometries in that way? Otherwise it would get pretty complex to get that right 🤔

@BuckarooBanzay BuckarooBanzay added the Enhancement New feature or request label Jan 9, 2025
@Darin755
Copy link
Author

Are you sure this would need that much geometry calculations? My thought is that it might be possible to merge force fields right after creation. Basically anywhere that shields overlap would become air. This would require that the shields be perfectly lined up but I don't think that's to much to ask.

@OgelGames
Copy link
Contributor

It's way more complicated than you think; for two cube force fields on a single axis it's not too hard, but anything more than that and it gets very complex very quickly, which is probably the reason it hasn't been implemented yet.

-- Idea: Let forcefields have different colors by upgrade slot.
-- Idea: Let forcefields add up by detecting if one hits another.
-- ___ __
-- / \/ \
-- | |
-- \___/\___/

Maybe a simpler and more versatile option could be to make the force field shapes customizable by length/width/height. Something similar was also planned for the jumpdrive mod: mt-mods/jumpdrive#68

@S-S-X
Copy link
Member

S-S-X commented Jan 11, 2025

I would recommend against generic 3d libraries for merging, this does not really need full 3d shape merges.

Instead I would suggest simplifying it quite a lot and instead of merges rely on way simpler boundary cutters while building fields.
This wont allow any shape but we don't really need any shape, these are always relatively simple shapes like spheres or boxes.

Cutter could even be positioned depending on shield generator power to give nice effect for both compatible "friendly" fields and incompatible "hostile" fields depending on their strengths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants