You are browsing as a guest. Sign up (or log in) to start making projects!

hq2000

@hq2000

Joined June 1st, 2026

  • 3Devlogs
  • 2Projects
  • 0Ships
  • 0Votes
"Programmer" interested in making (cool) projects (something entirely new), with a strong but not exclusive Rust preference
Open comments for this post

10h 14m 36s logged

can’t believe it’s 10h again, I needed to look through my past commits to recount what I did, which turns out to be a quite mixed bag. I added a few types for server -> client transmission. trying to write them to a buffer first (because packets can be compressed), I realized I need to make the Transmission trait (/interface) sync and then write the packet to the tcp stream asynchronously…a dumb mistake, but rewriting existing code was easy using the search+replace functionality. I tried to get it to work (which json is pretty useful for), but didn’t finish it. thanks serde_json! aside from that, I added a server wip implementation using tokio, I think the design will for now just be having an asynchronous task for each connection which parses the packets and sends them as messages to the (ecs) minecraft world and the simulation send some messages back to the same task (or a separate one?). my next priority will be to have my server be recognized by the client (and making more frequent devlogs maybe).
below a screenshot of some code (maybe next time something else?)

can’t believe it’s 10h again, I needed to look through my past commits to recount what I did, which turns out to be a quite mixed bag. I added a few types for server -> client transmission. trying to write them to a buffer first (because packets can be compressed), I realized I need to make the Transmission trait (/interface) sync and then write the packet to the tcp stream asynchronously…a dumb mistake, but rewriting existing code was easy using the search+replace functionality. I tried to get it to work (which json is pretty useful for), but didn’t finish it. thanks serde_json! aside from that, I added a server wip implementation using tokio, I think the design will for now just be having an asynchronous task for each connection which parses the packets and sends them as messages to the (ecs) minecraft world and the simulation send some messages back to the same task (or a separate one?). my next priority will be to have my server be recognized by the client (and making more frequent devlogs maybe).
below a screenshot of some code (maybe next time something else?)

Replying to @hq2000

0
0
Open comments for this post

10h 1m 31s logged

I’m still implementing the Data Types for server -> client transmission as well as the traits necessary (I changed them like 4 times, and some changes meant a reimplementation of existing impls). Now there is just a Transfer trait for types that are ready to transmit (≙ types that can easily write their transmission data to, e. g., a tcp stream or a buffer around one). The implementation now is supposed to be correct, but not necessarily the fastest / most memory efficient one, I will come back to do that later. I already implemented a majority of the data types, prominently lacking NBT (efficient binary data format), some JSON stuff (I guess) and a few small other things, I won’t do the debug data types until I need them. Below is a screenshot of the trait the code I wrote is centered around.

I’m still implementing the Data Types for server -> client transmission as well as the traits necessary (I changed them like 4 times, and some changes meant a reimplementation of existing impls). Now there is just a Transfer trait for types that are ready to transmit (≙ types that can easily write their transmission data to, e. g., a tcp stream or a buffer around one). The implementation now is supposed to be correct, but not necessarily the fastest / most memory efficient one, I will come back to do that later. I already implemented a majority of the data types, prominently lacking NBT (efficient binary data format), some JSON stuff (I guess) and a few small other things, I won’t do the debug data types until I need them. Below is a screenshot of the trait the code I wrote is centered around.

Replying to @hq2000

0
1
Open comments for this post

1h 22m 35s logged

I’m currently trying to implement the Java Edition Server protocol, starting with the data types (like Boolean, VarInt, BitSet, Slot) and transfering them via tcp packets. I’m trying to make it type-safe via a Transferable trait (as seen below) that a few newtypes (respectively called VarInt, Boolean etc) which can be sent over will implement, so I can later just put some of these together for actually implementing the protocol without having to worry about the low-level details (= I can just do sth like send(stream, [VarInt(45), Byte])). I hope this accelerates the implementation.

I’m currently trying to implement the Java Edition Server protocol, starting with the data types (like Boolean, VarInt, BitSet, Slot) and transfering them via tcp packets. I’m trying to make it type-safe via a Transferable trait (as seen below) that a few newtypes (respectively called VarInt, Boolean etc) which can be sent over will implement, so I can later just put some of these together for actually implementing the protocol without having to worry about the low-level details (= I can just do sth like send(stream, [VarInt(45), Byte])). I hope this accelerates the implementation.

Replying to @hq2000

0
2

Followers

Loading…