UNITY, Windows 8, Windows Phone 8 and Windows Azure
Over the past few weeks with the Public Beta of Unity for Windows 8 and Windows Phone 8 have had a number of questions about the opportunity of Windows 8, Windows Phone 8 and UNITY3D.
Unity is popular cross-platform game engine with a built-in IDE developed by Unity Technologies. It is used to develop video games for web plugins, desktop platforms, consoles and mobile devices, and is utilized by over one million developers.
Unity in education is primarily used to create mobile and web games, but can also deploy games to consoles or the PC.
The Unity game engine was developed in C/C++, and is able to support code written in C#, JavaScript or Boo. It grew from an OS X supported game development tool in 2005 to the multi-platform game engine that it is today which now supports Windows 8 and Windows Phone 8.
Unity Plugins for Windows 8 and Azure Mobile Services
A number of 3rd Party Unity assets are presently being developed to provide full support for Windows 8 and Windows Azure.
One of these plug-ins is developed by Bit Rave. Bit Rave have extensive experience working with the Windows 8 platform capabilities, and as part of that we decided to build a library for Unity to make Windows 8 integration easier for everyone.
Bit Rave are currently looking for people interested in joining a closed beta. Send an email to contact@bitrave.com if you want to participate.
So what important about Windows 8 features?
Live Tiles
Live Tiles are what makes your Windows experiences come to life. Bit Rave Live Tiles allows you to update and manage Live Tiles from within Unity.
For more information on Live Tiles check out Guidelines and checklist for tiles and badges on MSDN.
Square and Wide Tile Support
With both square and wide tile, Bit Rave makes it trivial to support both.
1: LiveTiles.Update(newSquareLiveTile);
2: LiveTiles.Update(newWideLiveTile);
Text and Images
With support for text tiles and image tiles, there are lots of options.
1: LiveTiles.Update(newTextLiveTile);
2: LiveTiles.Update(newImageLiveTile);
And for Unity Pro users, you how about a screenshot on your live tile!
1: LiveTiles.Update(newLiveTile);
Rotating Tile Updates
You can also manage rotating tile updates with just a few lines of code.
1: LiveTiles.Update(newTextLiveTile);
2: LiveTiles.Queue(newImageLiveTile);
3: LiveTiles.Queue(newTextAndImageTile);
Snap View
Windows 8 comes with a variety of devices, all with varying different screen layout capabilities. Bitrave's Snap View library helps you implement responsive applications for all changes in UI without having to leave Unity.
To learn more about the view states, check out Guidelines for Snapped and Fill Views on MSDN.
View Changes
Register for snap, filled, and full screen views with the following line of code.
1: SnapView.RegisterForViewChange(OnViewChanged);
Orientation Changes
Register for orientation changes with the following line of code:
1: SnapView.RegisterForOrientationChange(OnOrientationChanged);
Charms
Charms covers both the settings charm, and the share charm for sharing content from within your app. For integration with the Search charm, it has it's own component appropriately named Search.
Settings Charm
Setting is how your users find your help, your privacy policies, and find out further information about yoru application. You can trigger the settings charm manually with a single line of code.
1: SettingsCharm.Current.ShowSettingsUI();
Share Charm
Sharing is one of the key components of Windows 8 applications. Sharing allows your application to interact with other applications who can consume the content. You can allows your application to share with your favourite social media client, or maybe share an image with a photo manipulation app.
Bit Rave for Live Apps allows you to share seamlessly. To register content for sharing, it can be all done in a single line of code!
1: ShareCharm.Current.RegisterTextShare("Title",
2: "Description",
3: "Hello World!");
Or maybe you want to share an image from within game:
1: ShareCharm.Current.RegisterTextShare("Title",
2: "Description",
3: imageTexture2D);
And for Unity Pro users, how about sharing a screenshot from a camera!
1: ShareCharm.Current.RegisterTextShare("Title",
2: "Description",
3: cameraObject);
And you can even trigger the UI manually from within game:
1: ShareCharm.ShowShareUI();
Settings
With your Microsoft ID following you between machines, you can now take advantage of Roaming Settings. Use roaming settings to synchronise high scores and game files across machines. Bitrave Settings let you do all this simply and easily without having to leave Unity, and also supports Local Settings for non-roaming preferences and data.
Register for updates to settings data with the following line of code.
Roaming Settings
Roaming settings go with you, and all it takes is just a line of code to set them.
1: RoamingSettings.SetValue("high-score", hiScoreValue);
And just one line of code to retrieve.
1: var highScore = RoamingSettings.GetValue("high-score");
Local Settings
Local settings act just like roaming settings, but stay on a single machine when you don't want them to roam. You set and retrieve them in the same way.
1: LocalSettings.SetValue("high-score", hiScoreValue);
And just one line of code to retrieve.
1: var highScore = LocalSettings.GetValue("high-score");
Azure Mobile Services - https://www.windowsazure.com/en-us/develop/mobile/ iOS, Android, Windows 8 and Windows Phone
Azure Mobile Services allow you to take your application to the cloud quickly and easily.
And now you can access Azure Mobile Services directly from your Unity code.
Initialise
Initialisation is just as simple as you'd expect.
1: var service = AzureMobileServices("url", "token");
Insert
Insert an item into your Azure database in a single line of code from Unity.
1: service.Insert<ToDoItem>(myItem);
Update
Update items in the Azure databsae with just one line of code from Unity.
service.Update<ToDoItem>(myItem);
Delete
Remove items from the Azure database in 1 line of code from Unity.
1: service.Delete<ToDoItem>(myItem);
Query
Query items in your Azure Mobile Services from Unity.
1: service.Where<ToDoItem>(p => p.Category == "Exercise", MyCallback);
2: public void MyCallback(List<ToDoItem> items)
3: {
4: ...
5: }
NOTE: await / async will be available when supported by Unity. Until then we are using callbacks.
Lookup
Lookup items in your Azure Mobile Services from Unity.
1: service.Lookup<ToDoItem>(myItem, MyCallback);
2: public void
3: MyCallback(ToDoItem item)
4: {
5: ...
6: }
NOTE: await / async will be available when supported by Unity. Until then we are using callbacks.
Microsoft recently ran an full day of events to highlight the opportunity of Windows and Unity.
You can watch the content below and get access to all the materials at https://channel9.msdn.com/Events/Windows-Camp/Building-Windows-Games-with-Unity?d=1
This session is a lightning tour of the Windows 8 experiences, and the most relevant improvements that game developers will run into when building a game for the Windows Store. You will also get a comprehensive overview on the economics behind the Windows Store
End-to-End: Develop, debug and deploy a Unity game for the Windows Store
In this session, we will build a game using Unity Editor and then export it for usage in a Windows Store app. You will see the exporting of the unity player, the visual studio project and deploying to a Windows RT device.
Deep dive: Tips & tricks for porting games from other platforms to Windows 8
Go deep under the hood of Unity for Windows Store apps. After this session you will understand how the engine works, and the changes you will need to make to port a Unity game to run on the Windows Store app model.
Sharing code: Reuse all this new knowledge on the Windows Phone platform
Most of what you learned so far on building Unity games for Windows 8 is applicable to Windows Phone too. In this session, we will highlight the few differences across the platforms; we will start with the Windows Phone Store monetization differences and then get to the tools and platform differences. ...
Differentiate: Integrate your game with Windows 8 platform features (such as contracts,…
To have a truly great game, you will need to integrate with Windows 8 features like contracts, live tiles, and push notifications; in this session you will see coding examples and learn techniques for writing plugins that integrate a Unity game with native Windows 8 features.
In this session, Carl Callewaert demos how to build a game using Unity Editor.
Rogue Rocket games has released two games to the Windows Store: GunPowder and SushiChop. In this session you will hear their lessons learned during their journey writing these two games.
Coding Jar Studios started by writing Fling Theory for the Windows Store and quickly ported the game to Windows Phone. In this session you will hear their lessons learned while writing the Windows game and porting it to phone.
Luminary is one of the first companies that ported games to Windows Phone. In this session you will hear their lessons learned in porting a Unity game from other platform to Windows Phone.