Replies: 6 comments 8 replies
-
I'm worried about performance issues, but also and especially, with accessibility. NBT are advanced datapacking notions. I'm maybe biased because I'm still not confortable with NBT, but I think that if I'm in this case, I'm probably not the only one. Even scoreboard that are a lot more basic than NBT, I still remember that it was clearly not trivial at the begining... |
Beta Was this translation helpful? Give feedback.
-
However, exploiting thes new arguments remain a good idea, but I think it would be better to use it as an alternative way of programing, such as Afterward, if the user want to use the |
Beta Was this translation helpful? Give feedback.
-
Hey! So here is my opinion about the current state:
So, the scoreboard aren't a perfect solution. Can we do better with macro and storages?
I'm a little afraid of a mixed approach, as the library would lose its coherence. |
Beta Was this translation helpful? Give feedback.
-
Oooor, actually, the I used an argument that can be reversed again myself 😅 I said on Discord that the lib is mainly focused on accessibility. Performance is secondary. I also said that we can create function variation that use macro to have practical but not optimized functions... so we can reverse the logic and use the macro as the "classical" way, and create feature variation that use scoreboard to make a more optimised one like For the inner part of a feature, there is no real problem, we can optimize it as we can, it's just a problem of user interface |
Beta Was this translation helpful? Give feedback.
-
Building on the first proposal, here is a revisited version where we keep the best of both worlds without loosing performance and introducing too much complexity. I think that if we follow strict rules, ease of use and global coherence should not really be an issue 😉 InterfaceStorage:Input: Scoreboard:Input: Considerations:
ImplementationFeature structure:Names here are only a proposition / placeholder. I hate the python convention and I can't find a way to name these better 😂
About complexity (how to not make a mess):All methods should return a result if it is a single value.
When we don't need the scoreboard to compute the result or it adds too much complexity we just omit the execute store result score $module.feature.value bs.in run data get storage bs:in module.feature.value 1
# A little more complex when working with multiple outputs but still not much of an issue
return run execute store result storage bs:out module.feature int 1 run function __score__ By default all function tags are using the Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
The main problem I see with storage is that every single storage content is global, not proper to a specific entity. It implies that every function should be called globally, and then force the user to create he's own interface function if he want to use the function on several entities at the same time Macros doesn't suffer of thes problems because we can directly inject scores in the JSON compound Moreover, most of operation in a map are made on scores, so using storage as an interface require to often migrate data from score to storage. In my opinion, the global consistency doesn't justify to ask the user to do such efforts. Storage should then be used only when it is required Finally, I'm a bit inconfortable with the idea of having several ways to call a function. It is nice because it let the user chose which method he prefere, but the counterpart is that the documentation will be a lot more complexe.... which is not good on the accessibility point of view |
Beta Was this translation helpful? Give feedback.
-
With newer versions of minecraft the scoreboard is becoming more and more obsolete. This thread is here so we can discuss about new possibilities while being really careful about performance penalty, limitations, and ease of use.
Here is my first proposal:
bs:out
andbs:in
storage for examplebs:out math.sin
. The advantage is that results are not overwritten like with the bs.out.0 score, and that we are not limited to integer. We can have vector, floating point numbers, ...bs:in
storage is just here for ease of use meaning you can call a function using macro arguments and not provide thebs:in
, this way people can copy data directly into it and have other default arguments like scale already setupHere is an example of what this could look like when using the library
Pros:
Cons:
execute as @e[type=creeper] run function bs.vector:get_from_orientation
But I don't think it's really a problem. Nowadays @s is used a lot more than global context. I also think that the ease of use argument is not valid as it does not encourage best practices as you can see below.
Beta Was this translation helpful? Give feedback.
All reactions