So, in keeping with the C# theme, I decided to take a stab at creating a small project in Unity and publishing it to Azure. To do this, I followed a tutorial provided by GameCareerGuide to create a simple platformer.
What is Unity? Unity is a popular game development platform that is free for individual developers contingent on revenue reaching a certain benchmark. (Currently $100K). You also have the option to buy a Pro subscription for $75 a month. I’m only at a stage where I’m tinkering around with the IDE and learning, so I’m not interested in paying for a sub if it’s not necessary.
What is Game Career Guide? GameCareerGuide is a site aimed at helping individuals who want to pursue a career in Game Development. There are various news items as well as links to resources and communities to help people launch or grow their careers. I came across the 2014 edition of their publication here and the tutorial I’m using begins on page 36.
Creating this was pretty straight forward. I had a copy of the 5.x version of Unity already installed and went through the steps in the tutorial creating various assets/objects to use in the game. One hurdle I ran into was needing to update the code as one of the base classes it relied on had been deprecated since the release of the guide. I was able to solve it using some simple cut & paste outlined in this article
Next, I was having some issues committing the completed project to a Github repository. Something to do with how Github handles line breaks that can cause code corruption in some cases. Fortunately, updating the Github configuration for the new repo did the trick. I was able to use the Github CLI with the assistance of this article here to allow my code to commit. Even with the config change, my code built smoothly so I’m pretty sure there’s no risk.
After that, I created a new Web App node on my Azure account and used FileZilla to load my build via FTP. At first, the game was erroring out in both Firefox and IE so again I had to make a stop at the Googleverse. It seems that the site needed to provide a configuration item to allow the proprietary .unity3d file to download when you load the site. I was able to add the web.config file based on the following article
Finally, it was time to test out the game. Quite honestly, I’m a bit overly proud of taking these disparate platforms and making them work together. Plus it’s just neat to get something new to work, even if it’s trivial.
If you’re curious about the game, you can find it here . The controls are Left and Right Arrow and the spacebar and the object is to reach the yellow ‘exit’ square at which point the level resets. My son suggested that I might add some more levels and make it grow more difficult at each new level. Additionally, if you want to see the source code, you can find the repo on my Github account here.
If any of you are curious about or have used Unity or have any questions or comments, please feel free to add them here or address them to email@example.com.
Thanks for looking in!