-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
High level abstractions above nmp #231
Labels
Comments
Some ideas :
I think that representation should be made available to users but the low level representation should still be available even if we would encourage users to use only the high level representation if possible. |
Closed
This was referenced Feb 16, 2016
Another possible use case:
|
indeed the chunk layer is now completely abstracted in prismarine-chunk |
PrismarineJS/bedrock-protocol#116 kind of related |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So this is not really a nmp issue : there is nothing to fix in nmp in this issue, but it's an issue that can concern several nmp users.
The starting point of this issue is to see that mineflayer provide an high-level api for clients, flying-squid is starting to provide an high-level api for servers, and some things are common in these two implementations.
So what is common ?
There are 4 main things that are done with nmp :
Mineflayer is doing 1 and 2 and flying-squid is doing 3 and 4.
Now there's a third kind of nmp users : proxies, like the one @Egoscio is building. And proxies actually do these 4 things : they need to understand the 2 direction and send packets to the 2.
Mineflayer and flying-squid can both use certain type of representation to store information, for example prisimarine-block, prisimarine-entity, prisimarine-world, node-vec3.
Now the handling of reading and writing packets is different with just the storing information part.
I think what would be interesting for all these users would be to provide methods that would make it easier to read and write the packets at a higher level. For example the block_place packet contain a direction number and a reference block position, it would be interesting to transform that into an event containing the position of the future block, and a direction vector instead of the direction number. This is just one example ( and I will add more) but this is the kind of things that would make writing mineflayer and flying-squid easier.
So basically the idea is to provide methods to facilitate writing packets and reading packets from a higher level perspective.
In a second stage it might be interesting to have 2 back ends for that representation : mcpc and mcpe. That way it would be easier to write bots, servers and proxies that would work for both mcpc and mcpe.
This is the basic idea and I'll add more examples later to make sure and prove that having a higher level representation of these network operations make sense.
The text was updated successfully, but these errors were encountered: