Anuken / Mindustry-Suggestions

Repository for Mindustry suggestions and feedback
131 stars 58 forks source link

Network protocol documentation #4322

Closed SachaTending closed 1 year ago

SachaTending commented 1 year ago

Describe the content or mechanics you are proposing.

Documentation about network protocol

Describe how you think this content will improve the game. If you're proposing new content, mention how it may add more gameplay options or how it will fill a new niche.

Community can create chat apps for Mindustry, bots for auto administrating, etc.

Before making this issue, check the boxes below to confirm that you have acknowledged them.

TheEt1234 commented 1 year ago

there is already documentation on it, you can find it by searching "mindustry core api" in a search engine

SachaTending commented 1 year ago

i mean information about packets how it sends why using both tcp and udp

end-me-please commented 1 year ago

chat apps and auto moderating seems like something you can do with regular plugins

also, the game is open source you can just look at the netcode

TCP and UDP are commonly used together for video games TCP for reliable things and UDP because it’s faster (for things like player position, if a packet gets lost, it would be useless anyways by the time it gets resent)

github-actions[bot] commented 1 year ago

This suggestion is now stale, and will be automatically closed.

SachaTending commented 1 year ago

i checked packet send by game when joiniing

00 69 03 00 63 this is only 5 bytes of packet, rest of packet contains some private info(ex: uuid) 00 - idk 69(105) packet length, captured packet size is 107, 107 - 2(00 and 69) = 105 03 - packet id(ConnectPacket) 00 and 63 - idk UPD: 00 69 is packet length, its 2 bytes long