Development

How to use Lidgren with Unity3D for MMOs – Part 1

How to use Lidgren with Unity3D for MMOs – Part 1

Why use Lidgren?

Don’t kid yourself.  Writing a multiplayer game that runs over the Internet can be tricky. If you are using Unity you have the entire .NET network library at your disposal. Simply making a TCP connection or sending UDP packets is pretty trivial. Why on earth would you bother using someone else’s library?

Read more…

Untiy3D Asynchronous Sockets

Untiy3D Asynchronous Sockets

You can download this project here.

There is a lot of discussion on whether you can use threading or asynchronous sockets with Unity3D and with the web player in particular.

I’ve created this sample project to demonstrate how this is done.  You’ll see above that when you run it, the project attempts to make several asynchronous connections to web servers and download their default page.

There are a couple of basic things you should watch out for:

  1. Calls to Unity object or the UnityEngine API must be done on the main Unity application thread. You will need to martial values back to that thread. In this example, you’ll notice I don’t update the GUIText text value directly.  I update my own internal status string and only update the GUIText during an Update( ) call.
  2. You need to shut down your socket and thread operations when OnApplicaitonQuit( ) is called. Exceptions may be thrown on any asychronous callback and you need to be sure to catch and handle these.
Ghostees: Load Testing The Server

Ghostees: Load Testing The Server

I created this video while I was testing the connection load of the server. Each capsule you see is an automated connection moving randomly through the world. Since then I have changed them to actual character animations which looks way cooler but I haven’t taken time to record a video.

Read more…

Unity3d Additive Projector with Alpha Blend
sticky

Unity3d Additive Projector with Alpha Blend

Tonight I worked on learning the basics of Unity3D’s GUI system.  It’s suprisingly easy to use.

I also worked on projecting zodiac effects onto a plane which was suprisingly difficult. I managed to find a shader that does this [need link!].

Ghostees: Meet the Grave Digger

Ghostees: Meet the Grave Digger

The core animations for most of the characters were rendered this week. One of the balancing acts you have to perform is the quality of the animation verses the size of the download. I can tell you now, Ghostees is going to be a demanding game for your processor and bandwidth but the eye candy is certainly worth it. I’ve developed a number of techniques to ease the burden on bandwidth. Luckily a lot of the content will be cached by the browser so subsequent loads will be kinder to your patience. I’m even going to offer an Adobe AIR version for anyone that might be feeling the pinch. Read more…