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

Add wireless modem power control #1688

Open
hugeblank opened this issue Jan 19, 2024 · 6 comments
Open

Add wireless modem power control #1688

hugeblank opened this issue Jan 19, 2024 · 6 comments
Labels
area-Minecraft This affects CC's Minecraft-specific content. enhancement An extension of a feature or a new feature. feedback wanted Tell me what you want, what you really really want.

Comments

@hugeblank
Copy link
Member

The premise is fairly simple, add a couple of additional methods onto the wireless modem that get/set a radius, in blocks, where messages can be transmitted. This could be done in a couple of ways:

  1. Percentage, where 100% is the maximum distance the modem can transmit, and 0% is the singular block that the modem is in.
  2. Radius, where the maximum is the longest range the modem can transmit without restriction (eg. 64 blocks), and the minimum is 0, again being the single block area where the modem exists.

Why? My primary use-case is inventory-contained networking for things like pocket computers, or plethora's neural interfaces. To be able to set the transmit radius to 0 would give wired modem-like functionality to all pocket computers. However, I think this could be useful beyond that, like in a base within a heavily populated spawn area. Limiting the modem's power could reduce the amount of computers that end up processing the message considerably.

This request partially depends on #955, unfortunately. Ender modems simply should not have the ability to capture a transmission from a wireless modem that can't even transmit more than a block away. The idea of a local in-inventory network also gets broken due to this.

@hugeblank hugeblank added the enhancement An extension of a feature or a new feature. label Jan 19, 2024
@hugeblank
Copy link
Member Author

This report is a bit subversive, as my goal is in-inventory networking, and not necessarily to refactor/break modems. An entirely new peripheral could also fulfill the need I have and I would be just as happy. The way proposed above is the one that makes the most sense to me, given the confines of CC and the peripherals within.

@SquidDev SquidDev added area-Minecraft This affects CC's Minecraft-specific content. feedback wanted Tell me what you want, what you really really want. labels Jan 19, 2024
@Lupus590
Copy link
Contributor

Maybe pocket computers should be able to talk to other pocket computers in the same inventory even without a wireless modem.
With some creative usage, one could simulate having pocket computers with multiple peripherals.

@Wojbie
Copy link
Contributor

Wojbie commented Jan 19, 2024

I kinda question usefulness of 0 power messages? Like it would allow you to have 2 pockets talk with each other but then you have 2 pockets with wireless modems.. And that don't really increase ability of things you can do? Anything you could do with 2 wireless pockets you can do with just one wireless pocket.

And without ^ i kinda fail to see usefulness of reducing amount of computers that will see and then ignore your message. Feels like most users would just keep transmitting at full power and this would have low amount of actual use.

@hugeblank
Copy link
Member Author

Anything you could do with 2 wireless pockets you can do with just one wireless pocket.

You're right. This should be a functionality that's inherent to pocket computers/inventory devices. That way one can do something like have 2 connected pocket computers: one with a speaker, and one with a modem. (Seemingly the same conclusion that was arrived at by #1406)

@SquidDev
Copy link
Member

Maybe pocket computers should be able to talk to other pocket computers in the same inventory even without a wireless modem.

This was also mentioned in #1406, and I ... I have mixed feeling about it.

I do actually really like it as an idea. I think it introduces a fun programming challenge (distributed systems and networking is hard!) and some interesting trade-offs (adding a new "upgrade" consumes a full inventory slot, and those are valuable).

There's a bit of me which would even be inclined to take it further and take inspiration from TIS-100 - pocket computers should only be able to talk to those adjacent to them in the inventory. Though maybe that's more cutsey than actually engaging to use.

That all said, I'm not sure how ComputerCraft-y it feels as an idea. I'm aware that's a kinda nebulous term that can be used to shoot down any idea, I'm guess I'm just unsure about it and can't put my finger on why that is!

@hugeblank
Copy link
Member Author

I've attempted an implementation in #1689, feel free to play around with it. I actually like it a lot more than I thought, given the original idea with limiting proposed in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Minecraft This affects CC's Minecraft-specific content. enhancement An extension of a feature or a new feature. feedback wanted Tell me what you want, what you really really want.
Projects
None yet
Development

No branches or pull requests

4 participants