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?)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.