While writing the ‘let’s make a multiplayer game’ article series I had quite a few request on some multiplayer articles using Unity3D. I have zero experience with Unity but I’ve always wanted to give it a bash. For my first project I am going to try and convert the Asteroids game from the multiplayer articles to use Unity. My next few posts will be on my experiences during this process.
Since the Asteroids game is a 2D game I am using the Orthello 2D framework. I have seen people write posts on using Lidgren for networking, but I don’t know if it is required as Unity already has some kind of networking implementation.
Using the Orthello example projects I was able to easily get the basic asteroids flying across the screen.
I must confess that I’m finding it quite strange to move from a pure coding environment to a scripted environment. Although I’m writing code in c# I have no idea on what the best way is to structure the scripts, how to bootstrap the application, do abstraction and make other general programming decisions and tradeoffs.
The nice thing so far is that I only really needed to write the code to create the asteroids. Everything else is handled by Unity meaning that I can use the built-in physics and Sprite sheet functionality to render, animate and let the asteroids bounce off each other.