• Microsoft UK Faculty Connection

    Adding Xbox controller support and input to your Unity3d game

    • 1 Comments

     

    xboxoc

    Xbox One Wireless Controller can work with your PC if you download one of the following driver packages:

    Note To use your Xbox One controller with your console after using it with a PC, you must re-sync the controller to the console. You can do this by using the wireless sync button or a USB cable. For details, see Connect a wireless Xbox One controller to your console.

    If you want to use an Xbox 360 Controller with your computer, you can use an Xbox 360 Controller for Windows. Or, you can use an Xbox 360 Wireless Controller together with an Xbox 360 Wireless Gaming Receiver for Windows.

    Adding controller support to a brand new Unity project.

    Start up Unity, and go to File > New Project.

    Setting Up the Input Manager

    In order to set up Unity so we can easily access controller inputs from scripts, we need to properly set up the Input Manager.

    Go to Edit > Project Settings > Input to open the Input Manager.

    inputmanager

    There are 20 total input buttons and axes on an Xbox controller, but for this demo we will only add the 4 face buttons, A, B, X, and Y, and the two joysticks. This is the most tedious part of the process, so if you’d like to skip it, I’ve provided a completed InputManager.asset file to download and use here:

    Add 8 new axes to the Input Manager by changing the size value. The first 4 inputs will represent the 4 face buttons. Open the dropdown menu for the first new Axis, and change the values to the following settings for the A button:

    axis

    For the next 3 inputs, input the same settings for the other 3 face buttons, except for “Name” and “Positive Button”. The button settings should reflect the values on the Unity3D Xbox Controller wiki:

    http://wiki.unity3d.com/index.php?title=Xbox360Controller

    NOTE: Windows, Mac, and Linux all have different button values for the Xbox controller, as seen on the Wiki page. To make the process of switching between these platforms easy, the InputManager.asset file found in the Project Settings folder in your Unity project folder stores your input settings. If you create a separate InputManager.asset file for each platform, and store them in another folder, you can switch them in and out by replacing the file in your Unity project folder with the one for the desired platform.

    The last 4 inputs will represent the 2 axes on the 2 joysticks. For the first one, change the values for the following settings for the X axis on the left joystick:

    joystick

    Input the same values for the next 3 inputs, for the left joystick Y axis, and the right joystick X and Y axes. Again, refer to the Xbox controller page on the Unity3D Wiki to find the correct axis values:

    http://wiki.unity3d.com/index.php?title=Xbox360Controller

    Setting Up a Scene

    For this example we will create a simple scene to move a character around in. Add a plane with a collider as a floor, and add a capsule on top of it as a player. If the capsule has a capsule collider on it, remove the capsule collider and instead add a character controller component. Make sure there is a camera in the scene, and it is pointed at the objects in the scene. Finally, add a light into the scene so we can see our objects properly.

    scene

    Coding the Player Movement

    Next we will write a script to control our player. Create a new C# script called PlayerMovement, and open it in your editor of choice. Write the following code:

       1: using UnityEngine;
       2:  
       3: using System.Collections;
       4:  
       5: public class PlayerMovement : MonoBehaviour
       6:  
       7: {
       8:  
       9: private Vector3 movementVector;
      10:  
      11: private CharacterController characterController;
      12:  
      13: private float movementSpeed = 8;
      14:  
      15: private float jumpPower = 15;
      16:  
      17: private float gravity = 40;
      18:  
      19: void Start()
      20:  
      21: {
      22:  
      23: characterController = GetComponent<CharacterController>();
      24:  
      25: }
      26:  
      27: void Update()
      28:  
      29: {
      30:  
      31: movementVector.x = Input.GetAxis("LeftJoystickX") * movementSpeed;
      32:  
      33: movementVector.z = Input.GetAxis("LeftJoystickY") * movementSpeed;
      34:  
      35: if(characterController.isGrounded)
      36:  
      37: {
      38:  
      39: movementVector.y = 0;
      40:  
      41: if(Input.GetButtonDown("A"))
      42:  
      43: {
      44:  
      45: movementVector.y = jumpPower;
      46:  
      47: }
      48:  
      49: }
      50:  
      51: movementVector.y -= gravity * Time.deltaTime;
      52:  
      53: characterController.Move(movementVector * Time.deltaTime);
      54:  
      55: }
      56:  
      57: }

    Finally, add this script as a component to your Capsule, and press play to test out your game.

    Adding Player Number 2

    Adding support for multiple controllers is a great way to include local multiplayer in your game. To add more controller inputs, add more axes to the Input Manager. Repeat the same process as before, except when entering the “Positive Button” values, include the number of the joystick. For example, instead of “joystick button 0”, write “joystick 2 button 0”. Similarly, for the left and right joystick axes, change the “Joy Num” dropdown value to reflect the correct joystick number. Finally, when writing the “Name” value for the buttons and joystick axes, add a suffix which denotes the joystick or player number. For example, instead of “LeftJoystickX”, write “LeftJoystickX_P2”. Remember to change all of these settings for your first set of inputs as well.

    2joys

    After changing all of the input settings, you will have to make some changes to the PlayerMovement script as well. Make the following changes.

       1: using UnityEngine;
       2:  
       3: using System.Collections;
       4:  
       5: public class PlayerMovement : MonoBehaviour
       6:  
       7: {
       8:  
       9: private Vector3 movementVector;
      10:  
      11: private CharacterController characterController;
      12:  
      13: private float movementSpeed = 8;
      14:  
      15: private float jumpPower = 15;
      16:  
      17: private float gravity = 40;
      18:  
      19: public int joystickNumber;
      20:  
      21: void Start()
      22:  
      23: {
      24:  
      25: characterController = GetComponent<CharacterController>();
      26:  
      27: }
      28:  
      29: void Update()
      30:  
      31: {
      32:  
      33: string joystickString = joystickNumber.ToString();
      34:  
      35: movementVector.x = Input.GetAxis("LeftJoystickX_P" + joystickString) * movementSpeed;
      36:  
      37: movementVector.z = Input.GetAxis("LeftJoystickY_P" + joystickString) * movementSpeed;
      38:  
      39: if(characterController.isGrounded)
      40:  
      41: {
      42:  
      43: movementVector.y = 0;
      44:  
      45: if(Input.GetButtonDown("A_P" + joystickString))
      46:  
      47: {
      48:  
      49: movementVector.y = jumpPower;
      50:  
      51: }
      52:  
      53: }
      54:  
      55: movementVector.y -= gravity * Time.deltaTime;
      56:  
      57: characterController.Move(movementVector * Time.deltaTime);
      58:  
      59: }
      60:  
      61: }

    After changing the script, duplicate your player object, and move it to the side a bit, so it’s not overlapping the first player. Select the first player, and look at your PlayerMovement component in the inspector. Because we made joystickNumber a public integer, we should be able to change it directly in the inspector. Change one player’s joystickNumber to 1 in the inspector, and change the other player’s to 2. This should allow you to control each player separately with 2 controllers.

  • Microsoft UK Faculty Connection

    Surface 2.0 SUR40 SDK now available

    • 0 Comments

    On the 12th of July 2011 Microsoft released the Surface 2.0 SDK.

    The SDK simply makes it easy to create engaging experiences, using multitouch and object interaction, for the next generation device for Microsoft Surface – the Samsung SUR40 for Microsoft Surface.

    The Surface 2.0 SDK replaces the Microsoft Surface Toolkit for Windows Touch Beta that was released last year.

    Download the SDK and find training, documentation, and guidance on the new Surface development center at www.msdn.com/windows/surface/

    Overview

    The Microsoft® Surface® 2.0 SDK is a set of controls, APIs, templates, tools, sample applications, and documentation for application developers. Using the familiar .NET Framework 4.0, Windows Presentation Framework 4.0 (WPF) or XNA framework 4.0, and the Surface 2.0 SDK, developers can quickly and consistently create innovative applications that take advantage of the new PixelSense™ technology delivered in the Surface 2.0 platform.

    The next generation Surface device, the Samsung SUR40 for Microsoft Surface, was announced in January 2011 and will be available to commercial customers in 23 countries later this year. For more information on the Samsung SUR40 for Microsoft Surface, visit www.surface.com.

    clip_image002
    Library Controls
    clip_image003
    Element Menu
    clip_image005
    The Input Simulator
    clip_image007
    Raw Image Visualizer

     System Requirements

    The Surface 2.0 SDK runs on the Samsung SUR40 for Microsoft Surface or a PC with a 32-bit or 64-bit edition of one of the following Windows® 7 operating systems:

    Windows 7 Home Premium

    Windows 7 Professional

    Windows 7 Ultimate

    Additional Requirements:

    • Microsoft Visual C#® 2010 Express Edition or Microsoft Visual Studio® 2010
    • Microsoft .NET 4.0.
    • Microsoft XNA® Framework Redistributable is required to run some Surface SDK samples.
    • Microsoft Expression Blend® 4 is recommended to edit XAML code that defines user interface

    The Surface SDK supports input devices such as mouse, touch, and tagged objects. With the Surface SDK, you can develop an application that supports various types of input. However, to test your application in a touch-enabled environment, your computer must have a touch-screen digitizer.


    SDK Contents

    The Surface SDK contains the following resources:

    Resource

    Description

    Reference assemblies

    These assemblies provide the classes that are necessary to create a touch-enabled application.

    Visual Studio project and item templates

    These templates enable you to quickly create a touch-enabled application. When you create a project by selecting the Surface template, all of the necessary references and resources are automatically included as part of your project.

    Tools

    The input simulator, input visualizer, and Surface stress tools help you develop and test applications for the Samsung SUR40 for Microsoft Surface and Windows 7 touch-enabled PCs. With the Surface Input Simulator tool, you can simulate different inputs, hardware capabilities, and tilt of the device.

    Sample applications

    Sample applications are fully functional applications that you can build and run. These applications showcase various features of the Surface environment. You can run these applications to see Surface functionality in action, and examine the source code to see how certain tasks are performed.

    Documentation

    The documentation for the Surface SDK includes short examples of how to perform various programming tasks, longer and more detailed examination into various programming scenarios, and a detailed API reference.

    Note: When you are ready to distribute an application that you have created with the Surface SDK, download the Microsoft® Surface® 2.0 Runtime from MSDN and include it with your installation package. The Surface SDK Runtime contains the reference assemblies that are required to run your application.

    Surface API

    There are two types of APIs; presentation API and core APIs. The Presentation APIs use Microsoft Windows Presentation Foundation (WPF), which is the standard choice for developing touch-enabled applications. The cores APIs are .NET platform agnostic APIs that enable querying a raw image directly and registering for touch events. Learn more about the core API at http://msdn.microsoft.com/en-us/library/ff727894(v=Surface.20).aspx.

    Surface Controls

    Your touch-enabled application will usually contain one or more Surface controls. Some of these controls are specialized counterparts to WPF controls, and others enable you to include functionality in your application in ways that have no WPF counterpart. The following table summarizes the controls that are included in the Microsoft Surface SDK for Windows Touch Beta.

    Control

    Description

    LibraryBar

    The LibraryBar control enables you to list items horizontally, group items into several groups, and scroll groups. By default, the LibraryBar control supports drag-and-drop operations.

    LibraryContainer

    The LibraryContainer control is a dual-view control that arranges items in a horizontal bar or in a vertical stack and enables you to switch back and forth between the two views.

    LibraryStack

    The LibraryStack control enables you to display items that are stacked on each other. Users can view the individual items by rearranging the order of the stack or by removing items from the stack. By default, the LibraryStack control supports drag-and-drop operations.

    ScatterView

    The ScatterView control is a container for any other User Interface (UI) element. When you place a UI element inside of a ScatterView control, that element automatically gains the ability to be moved, rotated, and resized using one or multiple touches.

    ElementMenu

    The ElementMenu control implements a collection of items in a tree hierarchy that users can select.

    SurfaceButton

    The SurfaceButton control is a specialized version of the WPF Button control. SurfaceButton provides a different default look-and-feel, adds support for Touch Visualizations, and customizes the handling of input device events so that if multiple touches are targeting the control, the Click event is raised only after all touches are lifted.

    SurfaceCheckBox

    The SurfaceCheckBox control is a specialized version of the WPF CheckBox control. SurfaceCheckBox provides a different default look-and-feel, adds support for Touch Visualizations, and customizes the handling of input device events so that if multiple touches are targeting the control, the Click event is raised only after all touches are lifted.

    SurfaceTextBox

    The SurfaceTextBox control provides an unconstrained data entry field. The SurfaceTextBox control also provides the on-screen keyboard so that you do not have to specifically invoke the keyboard.

    SurfaceInkCanvas

    The SurfaceInkCanvas control provides a drawing canvas that you can use with touch input to create, modify, and delete drawing strokes.

    SurfaceListBox

    The SurfaceListBox control is a specialized version of the WPF ListBox control. SurfaceListBox adds support for panning, the ability to move the content by direct contact with the content itself, instead of using a scroll bar.

    SurfaceRadioButton

    The SurfaceRadioButton control is a specialized version of the WPF RadioButton control. SurfaceRadioButton provides a different default look-and-feel, adds support for Touch Visualizations, and customizes the handling of input device events so that if multiple touches are targeting the control, the Click event is raised only after all touches are lifted.

    SurfaceScrollViewer

    The SurfaceScrollViewer control is a specialized version of the WPF ScrollViewer control. SurfaceScrollViewer adds support for panning, the ability to move the content by direct contact with the content itself, instead of using a scroll bar.

    SurfaceSlider

    The SurfaceSlider control is a specialized version of the WPF Slider control. SurfaceSlider provides a different default look-and-feel, and adds support for Touch Visualizations.

    SurfaceWindow

    The SurfaceWindow control is a specialized version of the WPF Window control. SurfaceWindow provides and activates the necessary event handlers to make sure that it receives touch events.

    Sample Application Projects

    The sample applications that come with the Surface SDK show several different programming techniques in a complete application. You can use these applications as a starting point for more complete applications or just as examples of best practices in Surface programming. For information about obtaining the sample files, see Extracting and Installing the Surface Samples.

    Samples that use the Core layer and XNA Framework

    Sample

    Description

    Finger Fountain

    Draws small images for every contact at every frame. This sample emphasizes multiple touches and shows how to use the Microsoft XNA APIs.

    Framework

    Provides an extensive sample framework that helps you create controls by using the Core layer. The code in this sample eliminates inconsistent behavior among Core-based applications by using the Model-View-Controller (MVC) design pattern.

    Cloth

    An XNA-based application that demonstrates how to use the Core Interaction Framework

    RawImage Visualizer

    Shows how to use the RawImage APIs for XNA applications. This sample displays captured normalized (8 bit per pixel) images that are flipped vertically.

    XNA Scatter

    Demonstrates how to use the manipulations and inertia APIs to move graphical user interface (GUI) components around in a Surface application in a natural and intuitive way.

    Samples that use the Presentation Layer (WPF)

    Sample

    Description

    Controls Box

    Shows how to build simple application behaviors from touch-enabled controls that the Presentation layer provides, such as updating a text box when a user touches a button

    Data Visualizer

    Shows contact properties that are exposed in the Presentation layer (such as x, y, height, width, major axis, minor axis, and orientation) and how you can read and use these properties in a Surface application.

    Grand Piano

    Demonstrates how to integrate sound into Surface applications based on the Presentation layer.

    Item Compare

    Represents a simple tool that lets a user compare and contrast the properties of two "items" (tagged objects).

    Photo Paint

    Uses the SurfaceInkCanvas control to implement drawing and painting over pictures and video

    ScatterPuzzle

    Shows an implementation of the ScatterView and SurfaceListBox controls to create a simple puzzle game. The ScatterView and SurfaceListBox controls automatically provide some powerful features related to Surface.

    Shopping Cart

    Shows how to implement drag-and-drop functionality in a retail application.

    Tag Visualizer Events

    Shows how to incorporate hit-testing in the TagVisualizer control to let user interface (UI) elements react when tagged objects move over them.

  • Microsoft UK Faculty Connection

    What kind of Phone Developer are you?

    • 0 Comments

    WinPhone8logo

    One great thing about academia is that its always important to understand your skills, particular situation, objectives and what you are trying to achieve.

    So thanks to Joel Citzen and his blog The following guidance will help you get started to being the most effective developer.

    What type of developer are you?

    New to the Platform
    Typically you would have no existing apps and can’t wait to build and ship your app to Windows Phone Store or Windows Store. In this case the suggestion is that as a beginner you grab the free tools and start exploring building for either platform. You can explore:

    Windows Phone

    Seasoned in Windows Phone App    
    You already built Windows Phone Apps and now want to build apps for Windows Phone 8 and Windows 8. You will find a lot of similarities when you develop your apps for both platforms. To get started explore:

    Win8_logo WinPhone8logo

    Seasoned in Windows Store App
    You already built Windows Store apps and now want to build apps for Windows Phone 8 and Windows 8. You will find a lot of similarities when you develop your apps for both platforms. You can get started by exploring these sources:

    apple-ipad 

    Seasoned in another Platform
    You’ve built apps for other platforms, and want to ship them or port them to Windows Phone 8 and Windows 8. Many of the programming concepts will be familiar. Both platforms support C++, and the tools have templates to help you get started. To learn more explore:

    Games Creator from another Platform
    You’ve built games for another platforms and want to port them to Windows Phone 8 and Windows 8. We’ve invested significantly in native gaming support on Windows Phone 8 and this will make it possible for you to port your existing games to both Windows Phone 8 and Windows 8. Check these resources:

      Maximising Code Reuse.

      After choosing your approach, based on what type of developer you fall under, you can now decide what choices to make to maximize code reuse in your apps. As a developer, you want to streamline your development and make maintaining your app efficient. When building an app for Windows Phone 8 and Windows 8, you should look for opportunities to share code, designs, and assets as much as possible so that you maximize the return on your investment.

      imageimage

    • Microsoft UK Faculty Connection

      DreamSpark and Apphub account creation simplified

      • 5 Comments

      DreamSpark-2_bL_tapphub_logo

      New Updates - What’s new

      AppHub Integration: Linking your DreamSpark Account with a Microsoft Live ID

      I’m very excited to inform you that we’ve completed our “AppHub Integration: Linking DreamSpark Account with Live ID” 

      This will now dramatically improve the experience of those students that were having difficulties with App Hub registration.

      With the update to DreamSpark students and educators create a new DreamSpark account that is not a Windows Live ID. However for students who wish to produce application for Xbox or Windows Phone require a Windows Live ID, to create apphub accounts via http://create.msdn.com.

      We have now enabled the system, to enable educators or students to map their DreamSpark account to new or existing Windows Live ID. 

      Here is the workflow:

      - Student/Educator visits the page https://www.dreamspark.com/Product/Product.aspx?ProductId=26 and sees [Map your Live ID] button enabled and [Register on AppHub] button disabled.

      - Student/Educator Clicks on [Map your Live ID] button.

      - Student/Educator Sign in on DreamSpark site with their Verified account (or get the account verified).

      - Student/Educator then logs in using Windows Live ID account.

      - Student/Educator is shown the message “Are you sure you want your map your DreamSpark login (name@university.com) with your Windows Live ID (myname@hotmail.com) with [Ok] and [Cancel] buttons.

      - Student/Educator clicks on [Ok] button a Accounts will be mapped a User automatically signed out from Live ID account à User will be redirected to the page https://www.dreamspark.com/Product/Product.aspx?ProductId=26 with [Map your Live ID] button disabled and [Register on AppHub] button enabled.

    • Microsoft UK Faculty Connection

      HTML5 and Streaming Media Content

      • 1 Comments

      The following is a quick guide on HTML5 Video and the Microsoft Media Platform, I have recently had a number of question and interest from a  number of UK universities whom are looking at providing streamed media content both on and off campus.

      Microsoft has developed the IE Test Drive Video Format support page to see some examples of how various codecs work across the different browsers.

      Testdrive

      What this means?

      Web developers are generally happy to leave their existing solution in place to play their pre-existing video/audio content using plugins. However many are now supplementing these plugins with the HTML5 Video and Audio tag if the browser is able to play their particular codec of choice natively. This is ideal as the most popular mobile platforms H.264, AAC and MP3 are generally well supported using the HTML5 video and audio tags.

      How Do You Get Started?

      clip_image004

      The Microsoft Media Platform (MMP) frameworks are the glue that holds together individual pieces of the Microsoft end-to-end media solution.

      Are the services scalable?

      Microsoft MMP  is the the video platform that sits behind the Rugby World Cup 2011 event.

      The Microsoft Media Platform: Player Framework (that is licensed for commercial use under the Microsoft Public License Ms-PL) has recently added a preview of support for HTML5 (API Documentation) that enables you as web developers to compliment the Silverlight player framework with a HTML5 video experience that enables you to reach additional mobile platforms.

      Commercial Software offerings

      There are a number of commercial solutions available that do all the work for you.

      Example of these include

      JW Player™ (licensed for commercial use)

      SublimeVideo® (Player as a Service).

      What if You Want to use your Own Player or existing solution?

      It is surprisingly easy to utilise your own video solution using the default browser controls and codecs that the browser supports. The markup below shows what you need to play a video in HTML5 with a “Fall Back” to an unlisted video on YouTube.

      image

      Configuration considerations

      1. Video MIME types supported

      Cross Browser HTML5 video running under IIS

        Video Formats supported -

        • m4v,
        • mp4,
        • webm,
        • ogg,
        • wmv,
        • swf fallover.

      The order of your markup does matter please list them as above

      Add in the MIME Types support to IIS.

        Under IIS 7+ this is found under Website -> IIS -> MIME Types, and you’ll want to add:

        File name extension / MIME type:

        • .webm – “video/webm”
        • .ogg - “application/ogg”
        • .ogv - “video/ogg”
        • .mp4- “video/mp4″
        • .m4v - “video/m4v”

      Turn off Compression under Website -> IIS -> Compression, and unchecking “Enable dynamic content compression”, and “Enable static content compression

      Using Microsoft Azure Service

      Azure Storage Explorer also allows you to do this on individual files. of one of the following formats:

      • .mp4 - “video/mp4″
      • .m4v - “video/m4v”
      • .webm - “video/webm”
      • .ogg - “application/ogg”
      • .ogv - “video/ogg”
      • Set these in the web.config

      Video Fall-back settings

      • Fall-back content (like the YouTube example above) is only displayed by browsers that do not support the <video> tag.
      • If the browser supports the video tag but cannot play any of the media types that you have requested the fall-back code won’t fire. In this case you need to use JavaScript to detect this scenario using the canPlayType() method and provide fall-back content as shown in the example below.

      image

      3. Byte Range Requests (seeking)

      • Content should be served from a HTTP 1.1-compatible web server to enable seek ahead to the end of the video.
      • If you server is not HTTP 1.1-compatible (e.g. Azure Storage) you must encode the video with key index frames in the file & not at the end so that seek ahead still works. The “H.264 YouTube HD” profile in Expression Encoder 4 Pro does this.
      • Also note that if the video file is gzipped seeking won’t work. Since with most codecs the video/audio data is already compressed, gzip/deflate won't actually save you much bandwidth anyway.
      • IIS also supports Bit Rate Throttling to save you bandwidth on the server side when delivering video content.

      What’s next for HTML5 Video?

      There are currently a few key areas not addressed by the current W3C Video Standard (full screen support, live streaming, real time communication, content protection, metadata and accessibility). Recently the W3C Web and TV Workshop discussed some of these areas and offered some early thinking on how they may be adopted as web standards in the future.

      A real issues is the lack of a solution for live and adaptive streaming. Currently there are three proprietary solutions that support live and adaptive streaming.

      Dynamic Adaptive Streaming over HTTP (DASH) is currently in Draft International Standard. It looks likely that it will get W3C support if it is offered royalty free.

      DASH supports:

      • Live, on-demand and time-shifted content delivery and trick modes
      • Splicing and ad insertion
      • Byte-range requests
      • Content descriptors for protection, accessibility and rating

      Access to beta test and learn more about HTML5 media services?

      HTML5Labs is where Microsoft prototypes early and unstable specifications from web standards bodies such as W3C. Sharing these prototypes helps Microsoft have informed discussions with developer communities to provide better feedback on draft specifications based on this implementation experience.

      On the labs site Microsoft has released a Media Capture Audio Prototype that implements the audio portion of this W3C specification. The next prototype will support Speech recognition and will implement the Microsoft proposal available on the W3C website.

      Overall Conclusion

      If you are hosting progressive download video and audio on the web you should be looking to support HTML5 video and audio today to extend the reach of your content.

      Useful Resources

    • Microsoft UK Faculty Connection

      The Microsoft Windows Phone Camps – Powered by UK Tech.Days Fun, Free & Open to all!

      • 8 Comments

      1012_1a_Mango_Start_Phone_English_Red_061011_jpg

      Want to start developing for Windows Phone, but not yet taken the plunge?

      Then this free day of training is the quickest way to find out all you need to know.

      The Windows Phone Camps will show you how to learn and build Windows Phone apps from scratch. You'll be guided through the development process with a series of hands-on workshops and short tutorials, with some seasoned experts to give you one on one help when you need it. There'll be topics like; Introduction to Windows Phone Development, Controls & Control Toolkit, Execution Model, Storing Data, Launchers & Choosers, Accessing Cloud Services, Marketplace & Submission. Also, there will be informal Mango tutorial sessions on offer covering topics such as Multi-tasking, Debugging & Profiling, Motion API, Advertising SDK and Sockets. There's even an introductory design session to help you make your app look its best. Just pick the workshops that are most useful for you and work at your own pace.

      Once you've got the basics, you’ll be off and running and ready to develop your own apps. You can work on your own projects with assistance from our Windows Phone MVPs, and of course there's the all-important opportunity to meet up with likeminded devs.

      The camp kicks off at 9am and finish at 6pm. By registering and attending, you will receive (fanfare please) an exclusive Windows Phone Design Guide Sketch Pad as well as your own customized Hit & Run Windows Phone Camp T-shirt.

      Spaces are limited, so register your place in the Windows Phone Camp today!

      Got a question? You might find the answer below...

      How much do I need to know about Windows Phone to attend this camp?

      You don't need any prior experience or knowledge about Windows Phone or app development to attend. The purpose of the camp is to provide you with the basic skills and knowledge to get started with learning about Windows Phone app development.

      Who can attend these camps?

      Academics, Students, developers, hobbyist, technology enthusiasts. Everyone is welcome! All we ask is that you are ready and keen to learn about developing apps for Windows Phone.

      How much does it cost to attend this camp?

      Your luck's in - it's FREE.

      What do I need to prepare in advance to make the most of this camp?

      There are a basic set of things you should prepare before attending the camp. This includes bringing your own suitable laptop with the Windows Phone Developer tools installed (these are free), preferably the latest version of the tools.

      It would also be useful if you could read the following documentation:

      If you have a Windows Phone please bring it with you.

      Are you holding these camps elsewhere in the country?

      Yes, this is a series of Windows Phone Camps kicking off around the country. Follow us on Twitter (@ukmsdn) to see where we’re visiting next.

      What if I've registered already and can't make it on the day?

      Please let us know as soon as you can if you can't make the camp as there will be plenty of people who are keen to take your spot. Please respect the trainers and your fellow delegates by turning up if you've registered and committed. Thanks!

      Who are Hit & Run?

      They're do cool live on-site event screen-printing. You'll get the chance to create your very own t-shirt with your unique design at the end of the camp.

      What’s the Windows Phone Design Sketch Pad?

      In the spirit of highlighting good design, we intend to provide each attendee with an exclusive Windows Phone design sketch pad with Windows Phone design guidelines as well as open spaces and templates to sketch your next big Windows Phone app idea. Great stuff!

      Register at the event of your choice below. Go on. You know you want to.

      London - Saturday 17 September

      Manchester - Saturday 24 September

    • Microsoft UK Faculty Connection

      Cloud Gaming Architecture–A walkthrough of how to get started

      • 3 Comments

      Architecture

      The architecture has a logical layout (below). It looks complex, but the blog will hopefully explain it.

      image

      The Pieces of the Puzzle for a great cloud gaming experience.

      When architecting our game your need to consider what the  components, described below. Some are apps (the clients), and the rest are cloud services.

      Clients

      The clients are the apps that game players download to their devices. Each app must be developed for the particular device, but they must all have behave the same. The game is the same, just the UI changes.

      clip_image004

      When building a game today you want it to be played on the most number of devices so, ideally it should be capable of being  played on Windows Phone 7 and 8, Windows 8.0 and 8.1, iOS, Android, and Kindle.

      To enable maximum platform support communication is enabled using REST APIs. The experience of playing the game should be smooth and seamless. A key factor is to ensure that the client app makes the minimal number of calls (after authentication).

      When developing your client its key to ensure that each of the client has a thin hardware abstraction layer (HAL). the HAL must contains the code necessary to display and process the UI controls, along with the code that initiates contact with the Visitor Center and the code that interacts with a Game Room.

      Visitor Center (VC)

      The first stop for a player is the Visitor Center. So think of the Visitor Center as the landing page for your game i,e.  you’ll find the leaderboard results and a directory of the gamer IDs. You can also find a friend on the system through the leaderboard.

      clip_image005

      Identify Yourself

      When the player starts the game, the client app authenticates the player with either Facebook or another authentication services (using a username and password). The client app then sends the Visitor Center the identity of the player (via a token). The Visitor center confirms the identity by contacting Facebook or other authentication services to verify the token (and thus the player). Once confirmed, the Visitor Center sends the client app a new URL that goes to the Game Room where the user will be playing.

      Note that if the user does not sign I, you may want them to allow them to play as a Guest (guests may be simply unranked or wouldn't be issued persistent stats or friends).

      Game Room (GR)

      clip_image006

      The Game Room consists of 3 APIs that interact with the client.

      1) Game: Sends the current puzzle to the client.

      2) Post: Receives the user’s individual results from the client.

      3) Results: Sends the leader scores and relative ranking of user to the client, along with the next puzzle.

      Game Room Services and Locations

      You may want to geo locate each of your games rooms, best practice is to locate each Game Room on the continent with the greatest player base – so European languages are housed in European data centers, for example. The hard cases are English, Spanish, and Portuguese, which have broad, world-wide audiences. English is played from everywhere, but is most concentrated in the US, UK, India, and Australia. Spanish is split between Spain and Latin America. Portuguese is most heavily played from Brazil, but there are still plenty of players from Portugal and other parts of the world.

      The Aggregator

      When a game ends, each client sends the player’s results to the Game Room. The Game Room has an Azure load balancer in front of it that distributes the results to one of its three web roles. Because the results are randomly scattered, they must be gathered into one central spot—the aggregator.

      clip_image007

      The inner working of the aggregator is an Azure Cache. Caches are used in computing because they take the pressure off a system by holding recently stored data in memory and letting many operations access the data. Because the data is in memory, it can be instantaneously returned to any operation. The cache operates instead of a database engine that would otherwise query for a particular result. Multiply the queries and the database quickly reaches its capacity to respond. Caches are tried and true time savers.

      Here’s what happens between the GR and the aggregator.

      clip_image009

      After a game ends, each Game Room web role receives the individual client results. The web role then sends all of its accumulated results to the aggregator. Note that due to retries, there may be duplicate client results received by the Game Room and received by the aggregator. (Two people sharing the same Gamertag while simultaneously playing using different devices also causes duplicate client results to be received.) Then, the aggregator sends all of the Game Room web role results back to each Game Room web role, as shown in Panel 3 of the diagram above.

      Each Game Room web role removes duplicates and sorts the results, and sends the top results and individual results with peer ranking back to the client. After the next round starts, each Game Room writes its buffer of unsorted results to blob storage. Each blob is named in the form <puzzle language id>-<game id>-<instance number>.txt, and consists of Comma Separated Values (CSV) data.

      Leader Board Orchestrator (LBO)

      The LBO does the heavy lifting for the app. It works in close partnership with the two database stores that conceptually flank it to create the “best of” lists (best of right now, best of the hour, best of the day, best of the week).

      clip_image010

      When the Game Room and the aggregator have finished the results reporting work, the LOB starts.

      It first gets the results of the game from the newly written blob storage. It then processes the data to create in-memory tables that are inserted into an instance of Azure SQL Database. Once the data is inserted into the database, a large number of queries, in the form of stored procedures can be run against the data. To preserve the integrity of the data, stored procedures are the only way used to determine stats. The integrity of the data can also be checked during the process. The LBO can use more than one worker role to process the data. The results can also be compared. If any discrepancies arise, then the worker can be immediately stopped, and a new worker started to retry the processing.

      Headquarters

      There is another component, although it is more of an infrastructure piece. The “Headquarters” service is used to run tests against the various other parts of the game. For example, it runs the test-bot that makes sure the game rooms (in all languages) are working. It also checks the integrity of the database operations. If a worker role running an operation creates a result that is different from others, the worker is terminated and a new one started. The headquarters handles those administrative and quality assurance duties.

      clip_image013

      Deployment

      And finally, a server that is on-premises builds and deploys the whole system, every night. The build system is automated, and Azure REST APIs enable deployment. The function is key in protecting the integrity of the system by only allowing only the build scripts to perform the tasks. No one physically should have the permission rights to build and deploy manually.

      clip_image014

       

      References

      Azure Blob Storage

      How to use the Windows Azure Blob Storage Service in .NET

      Azure Caching

      Cache

      Azure Cloud Services

      Cloud Services

      InstanceInputEndpoint

      WorkerRole Schema

      Azure PowerShell

      Windows Azure PowerShell

      Azure table storage

      What is a Storage Account?

      Azure SQL Database

      SQL Database

      TFS Online

      Visual Studio Online

      Visual Studio

      Visual Studio

      Table-valued parameters

      Batching Techniques for SQL Database Applications in Windows Azure

    • Microsoft UK Faculty Connection

      Improvements to DreamSpark and FREE store access for Windows 8 student developers

      • 0 Comments

      Today we are announcing the following changes to www.dreamspark.com

      1. An new site design which is the result of improvements to the user experience based on internal and external feedback. Notably creating more clarity around the fact that the DreamSpark program is both a direct to student program and a subscription based program for academic institutions. As a result we have created two hubs with distinctive colour branding through the site to direct users to the right information and software access depending on their role:

      a. DreamSpark for Students – direct access to the individual students experience (www.dreamspark.com/Student/default.aspx )

      b. DreamSpark for Academic Institutions – information about the DreamSpark subscription such as program benefits, EULAs, usage guidelines, and the steps to purchase a subscription etc. (www.dreamspark.com/Institution/Subscription.aspx )

      The site today is going live in English only. Customers selecting other languages will fall back to English UI. The DreamSpark team are working as fast as we can to launch the localized versions. They should become available in the week of 24th of Sept.

      clip_image002

      As part of this site redesign we are rebranding the DreamSpark subscription to DreamSpark Standard in response to the feedback received by customers and to avoid confusion with DreamSpark for students.

      2. The new site has shifted from focusing purely on software downloads to bringing tools and resources related to development on our platforms (Windows 8, Windows Phone and Games) and most importantly a new section under Student dedicated to App Development) also accessible from the Student sub-navigation .

      clip_image004

      3. A page dedicated to Windows 8 App Development where students can find the resources and tools they need to start developing Windows 8 apps, including a pointer to downloading the getting started guide. .

      clip_image006 clip_image008

      4. Free access for students to the Windows Store: From the Windows 8 App Development page, users will be direct to the Windows Store Access Page on DreamSpark where they can verify their user status and then get a Registration code to use in the Windows Store to register for FREE.

      clip_image010 clip_image012

       

      Additional Resources

       

      a. Overview of the DreamSpark program explaining what it is? www.dreamspark.com/what-is-dreamspark.aspx

      b. New Software Deployment guide for institutions, www.dreamspark.com/Institution/Software-Deployment-Guide-en-us.pdf , detailing step by step how administrators can provide software access to students, faculty and labs via a DreamSpark MSDN Subscriber Portal and ELMS Webstores

      c. ELMS overview: www.dreamspark.com/Institution/ELMS-Overview.aspx

      d. DreamSpark Standard usage guidelines page added to academic institution overview section, www.dreamspark.com/Institution/DS-Usage-Guidelines.aspx

      e. DreamSpark Premium usage guidelines page added to academic institution overview section, www.dreamspark.com/Institution/DSP-Usage-Guidelines.aspx

      f. STEM definition page, www.dreamspark.com/Institution/STEM.aspx

      g. New DreamSpark Standard EULA:www.dreamspark.com/Institution/DS-EULA.aspx

      h. DreamSpark Premium EULA page to www.dreamspark.com/Institution/DSP-EULA.aspx

      i. Revised FAQ’s; more information, more relevant to each audience (student, educator, and institution) accessible from top nav bar.

      j. Separation of Student support from Subscription support with two dedicated pages: www.dreamspark.com/student/support.aspx and www.dreamspark.com/Institution/Support.aspx

      k.  DreamSpark for Academic Institution, and the Academic Institution Hub nav bar explaining how access an existing subscription:

      clip_image016

    • Microsoft UK Faculty Connection

      FREE Ebooks from Microsoft Press

      • 1 Comments

      Microsoft Press have a number of FREE Ebooks now available covering topics from SQL Server 2012, Office 2010 and Windows Phone, there is something here for everyone. 

      Many of our free ebooks are offered in three formats - PDF, Mobi (Kindle) and epub. Hope you find them useful!

      clip_image002 clip_image003 clip_image004 clip_image005clip_image007

      clip_image008 clip_image009 clip_image010Moving to Visual Studio 2010Programming Windows Phone 7

    • Microsoft UK Faculty Connection

      Channel 9 Windows 8 Application

      • 6 Comments

      Channel 9 is home base online for technical know how, how to’s and tips and tricks.

      Channel 9 is used by millions of Developers worldwide each month through videos, how to articles and events.

      We are excited to announce that the team has just released a Channel 9 application in the Windows 8 App Store. 

      So Install the application today on the Windows 8 Consumer Preview and easily browse the latest content on Channel 9, share content with your friends and view content on any of your Play To Enabled devices. 

      To find the app, Search the Windows 8 App store for Channel 9.

      clip_image002

    Page 6 of 102 (1,013 items) «45678»