BlockServerProject / BlockServer

A platform for a universal Minecraft server
http://blockserverproject.github.io/
GNU Lesser General Public License v3.0
33 stars 27 forks source link

Goal ~ Messages Outlined #153

Open Exerosis opened 8 years ago

Exerosis commented 8 years ago

We need to outline all of the messages we will need to make the server function correctly... so the message class name.... what it extends... and what fields it has... however we can start with just a list of what messages we have... As soon as this is done, other devs can create said messages.

Might sound easy, but after you take a look you will find it very difficult, remeber that some logic can be involved. For example, the MessageBlockRemoved will be a BlockRemovedPacket on PE, and for PC it will be a BlockChangePacket with the value of air.(just an example)

Protocol: http://wiki.vg/Protocol http://wiki.vg/Pocket_Minecraft_Protocol

ghost commented 8 years ago

wiki.vg of PE is outdated

alejzeis commented 8 years ago

@Exerosis that doesn't matter, leave the translations to the converters

Exerosis commented 8 years ago

What do you mean? Lol the converters need to be made and I promise you need an outline. Also is there a new wiki.vg

On Thu, Dec 10, 2015, 4:52 PM jython234 notifications@github.com wrote:

@Exerosis that doesn't matter, leave the translations to the converters

— Reply to this email directly or view it on GitHub https://github.com/BlockServerProject/BlockServer/issues/153#issuecomment-163759973 .

alejzeis commented 8 years ago

@Exerosis the message names don't matter, name them of what they represent such as BlockPlaceMessage for placing a block.

Exerosis commented 8 years ago

Yea IK... but what happens when somebody does networkmodule.sendMessage(blockPlaceMessage)? obviously that need to be turned into a packet for PC and a packet for PE... IK those packets AREN"T the same... so what about the packets that PE doesn't even have? or PC doesn't even have?

PEMapModder commented 8 years ago

That's why the request/response system is good ;)

Exerosis commented 8 years ago

I'm so confused... as far as IK there is ONLY one way to get info to clients :|

alejzeis commented 8 years ago

You still don't get it, message names do not matter! The converter checks what instance of message it is and translates it. If there are no packets for it, it is dropped.

On Thursday, December 10, 2015, Exerosis notifications@github.com wrote:

I'm so confused... as far as IK there is ONLY one way to get info to clients :|

— Reply to this email directly or view it on GitHub https://github.com/BlockServerProject/BlockServer/issues/153#issuecomment-163797788 .

Exerosis commented 8 years ago

WTF????? I mean what message classes will we have??

PEMapModder commented 8 years ago

@jython234 a message refers to a type of info, which will be converted into PE/PC protocol when being sent. Correct?

Exerosis commented 8 years ago

I thought they where kind of like packets but instead of being sent they are converted. So they have all the fields a packet might but nice getters and setter etc.

On Fri, Dec 11, 2015, 3:28 AM PEMapModder notifications@github.com wrote:

@jython234 https://github.com/jython234 a message refers to a type of info, which will be converted into PE/PC protocol when being sent. Correct?

— Reply to this email directly or view it on GitHub https://github.com/BlockServerProject/BlockServer/issues/153#issuecomment-163873556 .

PEMapModder commented 8 years ago

Yep

Exerosis commented 8 years ago

@jython234 You keep saying we don't need to figure out what messages corrospond to what packets, but I just don't get it. Somehow the message has to turn into both a PC and PE raw packet and be sent. And in some cases it takes two packets to do something on PC that one packet can do in PE... what about when that happens?

alejzeis commented 8 years ago

The system is that the converter can return a list of packets per message. Look at RL if you don't understand, the message system is almost the same thing as the networking there.

Exerosis commented 8 years ago

@jython234 sigh IK... but we need to figure out and write down what those packets that it returns will be... that way we have a plan... and can give parts of the document to other devs to handle without problems.

PEMapModder commented 8 years ago

You mean that we need to extract protocol information? I don't think we're having a big problem with that.

Exerosis commented 8 years ago

How am I so bad at explaining this x) Message A is converted to pc Packet B and pe Packet C... We need a document that says what A B and C are.

On Sun, Dec 13, 2015, 1:36 AM PEMapModder notifications@github.com wrote:

You mean that we need to extract protocol information? I don't think we're having a big problem with that.

— Reply to this email directly or view it on GitHub https://github.com/BlockServerProject/BlockServer/issues/153#issuecomment-164232829 .

PEMapModder commented 8 years ago

Do you mean docs on how to exchange, in terms of the API or the implementation?

Exerosis commented 8 years ago

;( there is no API ;( ;( ;( ;(

PEMapModder commented 8 years ago

No, by API I mean the internal methods.

Exerosis commented 8 years ago

Oh ok, well what I mean... is a document... that lists the MessageName(class) and the two(or more) corrisponding packets.

PEMapModder commented 8 years ago

You mean protocol documentation right? Well, there isn't, we will put them into code directly when we figure them out.

Exerosis commented 8 years ago

:( >:( ;(I just mean a plan... a google docs... that we can give to other devs who can then make the message classes and add to the converters

PEMapModder commented 8 years ago

I suggested a concept of Protocol Documentation Format (PRDF), which is a file, in similar syntax to .htaccess, declaring packets and gets loaded by a server.

Exerosis commented 8 years ago

ERMMMMM I think I like that idea?

Exerosis commented 8 years ago

Hummm IDK that it would work out tho ;( we will see.. but either way... for now we need a document that would let us hand off the creation of 5 or 10 of the packets to other devs without explaing the whole opperation... and that invloves lookng at both documentations... and deciding what messages we will have and what not...

PEMapModder commented 8 years ago

And that document can be in PRDF :) if we are planning to implement such thing, of course. Something like this. https://github.com/RedstoneLamp/RedstoneLamp/blob/npd/src/main/resources/protocol/example-protocol.npd

Exerosis commented 8 years ago

TBH that confuses me a tiny bit but either way we do need an outline or at least a list of every message we plan to implement and what fields they will have.

On Sun, Dec 13, 2015 at 9:08 AM PEMapModder notifications@github.com wrote:

And that document can be in PRDF :) if we are planning to implement such thing, of course. Something like this. https://github.com/RedstoneLamp/RedstoneLamp/blob/npd/src/main/resources/protocol/example-protocol.npd

— Reply to this email directly or view it on GitHub https://github.com/BlockServerProject/BlockServer/issues/153#issuecomment-164262355 .

Exerosis commented 8 years ago

sigh lol look... if somebody makes a a list of each module we need... and what fields it has... or at leaset the list... I could quickly create a message higherarchy and then begin work on the core modules.

alejzeis commented 8 years ago

@Exerosis I made the messages as I went implementing packets, in RL.