Day 1: remaking AI craft in NodeJS

First thing I am looking at is my original GO code. And… GO is really a freaking beautiful language! It’s a shame I am now running away form it. But, reality is reality, NodeJS is getting too much nice modules now.

So I decided to changed the model from GO to NodeJS. I figured best place to start is the “nodejs modules you should know” series. I am so right. The first module it introduces fit right into my need: the Dnode ( It’s RPC in NodeJS, also browser! So I am gonna need it to transfer back and forth all the crazy shit going on, such as player positions, user codes etc.

Then I looked into the browser code. Without namespaces, all the linking to different JS files make it a mess and hard to read. I don’t know where are the class definitions and the function definitions at all. I need a solution to this. So wrapping up all the libraries with objects is better than what I did a year ago: spreading the function definitions all over just like PHP includes.

According to this, I am thinking to rewrite the connecting pieces and use Dnode, and makes all functions into objects.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: