Hacker News new | past | comments | ask | show | jobs | submit login

Well, I'm 16 now, and I'm writing a chatroom/game thing in HTML5 with WebSocket (http://ponyplace.ajf.me/)

But when I was 14, I was programming a TCP Minecraft server. (http://github.com/TazeTSchnitzel/SchnitzelCraft0)

Impressive, where did you find the information for your TCP server and why choose that as a project?

The folks on #mcdevs on Freenode had done the hard work for me, they had reverse-engineered and documented the Minecraft Classic protocol. It's a very simple binary TCP protocol with only 16 packet types.

And why as a project? Well, I saw the protocol was simple enough, and it seemed like a fun thing to do since I liked playing Minecraft Classic. There were already loads of other Classic servers, but I wanted to make my own so I could do things my way and add silly features. Yes, there's plugins, but sometimes I like reinventing the wheel.

I added some features, for example, "Zombies", imitating those in Minecraft Survival/Indev/Infdev/Alpha/Beta/Release. I sent packets as if another player had spawned, and I set up a minecraft account with the right skin, so that when a player with the same name as that account was spawned, they would look like a zombie. The AI was very, very stupid. It would always turn at right-angles, making them easy to trap. Still, it was fun. Also, at the time I did not understand recursion, so the "physics" for things like spreading water didn't work properly.

The code I ended up writing, in C using WinSock and zlib was... horrible. Ridiculous levels of nesting, and almost everything was in the main function. This was a result of getting it working before getting it right. However, I never really refactored it much, and it became an unmaintainable mess. At various times I have refactored it a bit, as recently as a year ago, and it's the refactoring-in-progress version you can find on my GitHub page.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact