Wednesday, March 13, 2013

The Net Works!

(pun intended)

For the entire project, and experimenting with unity, I have found it impossible to get network communications up and running from Unity Web Player.  Until now.  That's right, the first web edition, with networking is now live!

As it turns out, I used TcpClient, and got it to work on a separate thread.  TcpClient didn't work at first either.  What did work, was to download a Socket Policy Server, install it as a service on my server, and give it a fire wall rule to work.  Since it didn't work until I got the Policy Server running, I'm betting the other methods also work.  (Additional technical note, I added the line Security.PrefetchSocketPolicy, and connected it to port 843 from the client)

So now, I have a lot of commented networking code, which I'll be cleaning up, and probably switch back to HttpWebRequest/Response again, because that should be the easiest method to maintain for all my MVC4 communications.

What's that?  Oh right!  Some of you probably want to try the web game.  Here's the link: (please note, the server address without the page wont work.  Again, I'm not spending a lot of time on the web, I'm focusing on the game development instead.)

Remember, there is not much to do yet, but you can create an account, log in, and start gaining credits in the resource manager.  Accounts will be wiped after the next significant upgrade.  Also, there is no account info validation/emailing.  You can enter anything you want.  I created an account 'asdf' with password 'asdf', a week ago, so that one has lots of funds available.  Nothing to do with them yet, but its cool to see that resources are growing over time.

No comments:

Post a Comment