Skip to content
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

Clean up unstable parts of server #16

Open
1 of 2 tasks
andrewvy opened this issue Aug 23, 2015 · 4 comments
Open
1 of 2 tasks

Clean up unstable parts of server #16

andrewvy opened this issue Aug 23, 2015 · 4 comments
Assignees

Comments

@andrewvy
Copy link
Owner

  • Packet reading of unsupported packets breaking (because of buffer not clearing)
  • Handle disconnect and reconnect of clients.
@andrewvy andrewvy self-assigned this Aug 23, 2015
@turbo124
Copy link

just following up on the chunk data, i had a quick look at the TrueCraft implementation and it appears the data is compressed with Zlib.

I note in the PHP port gzdeflate() (raw compression) is being used. The PHP documentation is poor, and some encoding level are even undocumented, however one user comment mentions that gzcompress() is the Zlib equivalent compression type.

Will be interesting to follow your progress!

@andrewvy
Copy link
Owner Author

I've seen that too, but another user mentioned that gzcompress is the HTTP compression zlib deflate , while gzdeflate is the raw compression zlib deflate..

I'm not quite sure which one to use, so I try switching between the two.

PHP documentation.... ¯_(ツ)_/¯

@andrewvy
Copy link
Owner Author

@turbo124 BOOM. It turns out I was actually sending malformed packets and the data was fine!

Using gzdeflate() resulted in a client error Malformed encoding type!
But using gzcompress() definitely worked.

I also didn't realize it was working for a couple hours because I was spawning under the blocks (and facing away), until I implemented the respawning functionality which dropped me onto the blocks and surprised me.

screen shot 2015-08-23 at 11 48 16 am

(as you can see, i got the block data totally wrong but somehow it created a solid platform of cobblestone with fire on top.)

👏

@turbo124
Copy link

nice! Great progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants