Friday, March 23, 2012

Porting the client part 3

I added the multi-tabbed chat to the client. Now my Javascript client is almost where my Windows 8 client used to be. The only thing missing is account- and character registration. These won't be very difficult to do. Not being difficult has the advantage that it won't take long but the disadvantage that it won't be very interesting to do.

Thursday, March 22, 2012

Porting the client part 2

I began to move more features to my new HTML client. I am using this opportunity to improve a lot of stuff, because my knowledge of Javascript is now a lot better than when I started the project. My biggest mistake was the idea to use classes and instancing for everything like one would do in Java. Just creating a classless object and freely adding methods and attributes to it works just as good in most cases and leads to much simpler code.

All that is left to port is the chat functionality, account creation and character creation. Then I will be as far as I was with the Metro client.

Sunday, March 18, 2012

Porting the client to a vanilla web application

I made good progress with porting the client to a normal web application. It can now go through the login sequence and draw the map correctly. What's still missing is the gameplay netcode handling and the user input during the game.

Saturday, March 17, 2012

Added WebSocket support to the server

I added my java WebSocket implementation to my server. I now have the base class ClientConnection which handles my JSON-based protocol on the application layer, and the two specialized subclasses ClientConnectionSocket and ClientConnectionWebSocket which handle the string-based data exchange with the client using vanilla sockets and WebSockets respectively.

That way I won't have to worry (much) about making sure that any given feature works in both network stacks. It will also allow me to easily add other ways to connect to my server, like an UDP-based or flashbridge-based network stack.

Here a screenshot of a simple command-line based client executing the login sequence via WebSocket:

Now there is no excuse anymore not to port the client from WinJS to normal Javascript.