Extend logic `read` and `write`,support targeting `LogicBuild`
If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:
- [x] I have read the contribution guidelines.
- [x] I have ensured that my code compiles, if applicable.
- [x] I have ensured that any new features in this PR function correctly in-game, if applicable.
what
what
Allow processor to transfer variable to another directly, including Unit, Building...
Problem: This allows for processors to act as memory storage, possibly greater than 64, rendering all memory storage useless
Problem: This allows for processors to act as memory storage, possibly greater than 64, rendering all memory storage useless
Yeah, the processor is more powerful than memory storage, as it can store not only number but object.
But processor don't support string concat, so the read is not indexable. and it's more complex.
The feature of this PR is much powerful, that allow many complex logic design. (like function store processor, mulitiprocessing)
Problem: This allows for processors to act as memory storage, possibly greater than 64, rendering all memory storage useless
Yeah, the processor is more powerful than memory storage, as it can store not only number but object.
But processor don't support string concat, so the
readis not indexable. and it's more complex.The feature of this PR is much powerful, that allow many complex logic design. (like function store processor, mulitiprocessing)
@counter arrays:
Problem: This allows for processors to act as memory storage, possibly greater than 64, rendering all memory storage useless
Yeah, the processor is more powerful than memory storage, as it can store not only number but object. But processor don't support string concat, so the
readis not indexable. and it's more complex. The feature of this PR is much powerful, that allow many complex logic design. (like function store processor, mulitiprocessing)
@counterarrays:
I know that, but it can't stop using that without this pr as it can use inside the same one processor. And this pr is also a enhancement for many advanced players like ones using @counter arrays.
Read&Write memory is simple and effictive. Read&Write processor allow more complex design and usage.
PS: @couter arrays for multiprocessor is more complex than single processor, as you need wait to sync. It is still better to use @couter arrays just in one processor. If you use processor to replace memory block with @couter arrays style, you need 2+2 line to implement, so that only allow lower than 1000/4 variables.
Random idea: make the textbuffer in processors usable
Random idea: make the textbuffer in processors usable
I has thinked that, it sounds good. A special variable points to the textbuffer StringBuilder and can be used in read and write.
Reading from the text buffer implies making an allocation to copy the string to a variable, which is not acceptable.
Reading from the text buffer implies making an allocation to copy the string to a variable, which is not acceptable.
welp
though that should also mean string variables would be unacceptable?
Strings in logic are immutable. You can reassign the variable to a difference reference of a string, but you can't modify what it points to.
Strings in logic are immutable. You can reassign the variable to a difference reference of a string, but you can't modify what it points to.
yeah, strings in logic are like java.lang.String, not java.lang.StringBuilder.
possibly greater than 64, rendering all memory storage useless.
Somehow, but hasganter already made a processor handle 321 variable inside, and be perfectly usable, acting like memory bank with a bit less variables but way more compact