I made a simple xy-coordinate system that self-configures by learning its own coordinate when placed from its neighbours directly north, south, west or east. The use case is for my self-building factory which I would like to avoid using modded coordinate combinators that magically just skip solve the problem. I made an unique ID-generator earlier for the same reason, but coordinates are also unique so can be used for wire network addressing and have the added benefit of being tied to locations in case you want units to be in specific configurations and not too far from eachother etc.
An origin cell is required in the network (and only one). Cells with with no connection to an origin will just wait in an uninitialised state until an origin is added to the network. So the order of placement for cells don't matter. The wiring is also carefully done so it doesn't matter what order your bots place each combinator or the timing of it or if any part is destroyed. That means if you replace the outside connection points make sure they connect to the exact same connection points and not just the same wire system.
The blueprintbook contains two versions. The first is a bit more spaced out and is a bit more readable. The second one is compacted and uses 1 power switch for each connection point instead of 2 empty constant combinators. They are not used for power or switching, they are just cheap and can overlap without rotations or power requirements and large enough to overlap the edge of the blueprint for easy connecting, so that the red-green wires connects properly. There's an origin block for both versions.
It's nothing special really but I'm thinking of using it so someone else might find it interesting as well.
Coordinate system
Coordinate system
- Attachments
-
- ousu(210527-214604-93).jpg (1.22 MiB) Viewed 1910 times
-
- ousu(210527-221049-83).jpg (1.64 MiB) Viewed 1910 times
-
- ousu(210527-221110-97).jpg (1.49 MiB) Viewed 1910 times
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Re: Coordinate system
Here is a similar coordinate system. It stores the coordinates in a single signal, which reduces the number of combinators needed.
The coordinates are limited to the range [-23169, 23169] or ±2¹⁴⋅⁵.
The coordinates are limited to the range [-23169, 23169] or ±2¹⁴⋅⁵.
Re: Coordinate system
That's great, and much smaller!
I don't need the full 32 bit range (my cells are 2x2 chunks) but I do want less circuits so I guess I'll switch to your single value system for storing coordinates. I breifly thought about doing that but didn't think it would reduce the circuits that much since I don't refer to X and Y individually. Also I didn't know that an "anything" output choose only a single one of its inputs, that's going to be useful to know for my other circuits. I thought it would propagate them all which is why half of it is a loop that enables only one signal to be sent to the memory combinator at once. And with that I also needed a system that only allowed a single tick to be sent to memory input so another few combinators for that.
My system will remember its own coordinates even if all connections to its neighbours are destroyed, but that is not that useful since your system is effectivly memorising coordinates in a loop between just 2 neighbouring cells. And coordinates are restored properly anyways once 1 connection is restored and I don't need coordinates of completely broken cells while I wait for them to be rebuilt, as long as the values eventually get set to valid numbers again.
Thanks for the help and sharing. And quick too! I love it and I'll use it!
I don't need the full 32 bit range (my cells are 2x2 chunks) but I do want less circuits so I guess I'll switch to your single value system for storing coordinates. I breifly thought about doing that but didn't think it would reduce the circuits that much since I don't refer to X and Y individually. Also I didn't know that an "anything" output choose only a single one of its inputs, that's going to be useful to know for my other circuits. I thought it would propagate them all which is why half of it is a loop that enables only one signal to be sent to the memory combinator at once. And with that I also needed a system that only allowed a single tick to be sent to memory input so another few combinators for that.
My system will remember its own coordinates even if all connections to its neighbours are destroyed, but that is not that useful since your system is effectivly memorising coordinates in a loop between just 2 neighbouring cells. And coordinates are restored properly anyways once 1 connection is restored and I don't need coordinates of completely broken cells while I wait for them to be rebuilt, as long as the values eventually get set to valid numbers again.
Thanks for the help and sharing. And quick too! I love it and I'll use it!
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser