Showing posts with label Silverlight. Show all posts
Showing posts with label Silverlight. Show all posts

Thursday, 19 June 2008

Silverlight Viewport

As part of the Resolve Evolve Solve entry for the Imagine Cup I have been looking into some game programming with Silverlight 2 and one thing that struck me was that there wasnt any support for viewports within silverlight.

A viewport is basically a small selection of an overall image that will be displayed to the user, imagine looking out of a porthole in a ship.

Our proof of concept game EnviroHouse uses a static layout where the whole game surface is displayed to the user from the begining of the game, however in the new game under development we are looking to have the user able to move further than the original size that is display, and so would need to use viewports and viewboxes. So, I decie to set out on an epic quest on the interwebs and find this rather nifty viewport class that has been pre-made. Hopefully this will solve all my worldly problems and get me home in time for tea. :)

The Silverlight viewport can be found here.

Wednesday, 21 May 2008

Silverlight MSN Toolbar

Microsoft have released a new MSN Toolbar for IE which as far as toolbars go looks pretty cool. It seems more like a snazzy RSS agregator, with added search facility.

The toolbar as well as having the RSS streams for various content areas such as news, sports and autos. It has the ability to know when a user has done a search using any of the search websites such as google, yahoo! or Live and using the search parameters does its own search using Live and aggregates the results such as news, images, and websites into the toolbar so that the user can jump straight to the live results if required.

The toolbar has been created using Silverlight, however it is currently only supported by Silverlight 1.0. Which means it wont currently work for all us eager dev's who have installed Silverlight 2.0, however a SL 2.0 version will be realesed soon I hope.

Channel 8 offer a really good video walk through of the MSN Toolbar and some of its features right here.

Saturday, 29 March 2008

Pacman Silverlight Updae

Having been left with the previous application we have been able to get a moving sprite going around a game board and boundaries within the board to stop Mr Pacman walking through walls. Now I've decided to start adding some "dots" onto the board which will get eaten as pacman goes past.
There have been 2 approaches that I've taken, the first is a bit more clunky but and time consuming used to create the bigdot. With this method being so time consuming i looked into a more benificial way of doing it (especially with the ammount of smaller dots).

In this section of code the big dots are being created exclusivly in the C# code, first a Rect is created so that we can check to see if Pacman intercepts the dots, the width and fill of the big dot is then configured and finally the positoning is specified using the Ellipse.setValue() method.

These rects and dots have then been added to an array so that the rect in the rect array corresponds to the ellipse in the bigdots array so that when an intersect happens we can get rid of the dots.

The bigdots array is then added to the canvas, so that they can be seen on screen.

The second method that has been used to add the smaller dots to the board is much nicer and uses a combination of Expression Blend 2.5 to create and place the dots within the canvas and then using C# code to apply a rect to each of the dots.

Straight away you can see that this method reduces the ammount of code needed, and creates 158 dots compared to the 4 big dots.

The code loops through each of the ellipses on the canvas using canvasname.children.oftype which returns all ellipses in the specified canvas. For each of these ellipses we must then add them to a littledots array and then create rects based on the values of the ellipses using the Rect constructor and add that to a corresponding littlerects array.

A small section of code is then also generated so that Pacman can eat up the dots, this uses a very similar approach to checking the boundarys by creating a rect in the direction pacman is moving and then see if it intersects the dot.

One the dots have been intersepted the visibility of the ellipse is set to collapsed so that it cant be seen anymore. And the player score is then incremented and displayed.

A problem that did occour is that originally when the ellipse disapeared the rect was still there in the background and would rack up the score each time pacman intersected with the rect, and high scores of a couple of thousand were attainable in a second.

This was solved by creating a new Rect in place of the one which had just been intersected. Im sure there must be a nicer way of doing this, however there dosnt seem to be a destructor for Rect, ~Rect() doestnt want to work for me.

The current version of the game can be found at the bottom of the main page of this blog. Go test it out and give some feed back.

Thursday, 27 March 2008

Pacman Game




Finally found a way to get this baby online. WARNING Application is no where near complete


Because of the width of the app it looks real bad on such a narrow blog, so either scroll down to the bottom of the page or use this link.

Tuesday, 18 March 2008

MACH Final Assesment

I had my final assesment for the mach graduate scheme this week and it consisted of a group work assignment, followed by two interviews and finally a presentation which I had previously prepared.

My presentation was on "Search & Advertising on a Rich Mobile Device" showing how the power of Silverlight on mobile devices could bring benifits to both Microsoft and its Customers.

Below is a link to my presentation, feel free to have a look through it and tell me your opinions.

http://cid-9ae2ab5b779a00fe.skydrive.live.com/self.aspx/Public/Location%20Based%20Search%200%20Advertising%20on%20Rich%20Mobile.pptx

Hopefully I performed well enough in the interviews, and will post when I get told the results of the application process.

Thursday, 29 November 2007

Silverlight V2.0

Silverlight V1.0 has been going for a short time now, with V1.1 adding parts of the .NET framework still in Alpha. However there is already news of Silverlight V2.0.

Version 2.o will add more of the .NET framework to Silverlight including a set of rich controls such as textboxes, buttons and. lists, all the common controls you will need for a basic Silverlight app. This really exitetes me as it will make it much easier for people to develop with Silverlight and will be less of a faf than it is currently. There are also alot more content of the V2.0 release that MS are not willing to make public at the moment, but be sure that come release date, Silverlight V2.0 will deffinatly be crowned a Flash killer.

For the full article check out Scotts full blog post here.

Wednesday, 7 November 2007

Building Dynamic Web Applications with Microsoft Silverlight

Want to learn about the latest internet technologies? Well now’s your chance, Mike Ormond a Microsoft Development Evangelist is coming to Manchester on the 15th November to give a presentation on developing web apps using Microsoft’s latest web technology Silverlight.

Silverlight is a cross-browser, cross-platform plug-in for delivering rich media experiences and applications for the Web. Silverlight provides a highly productive platform for designers and developers to collaborate in building a new generation of web experiences enabling you to build visually stunning interactive content and applications that run on multiple browsers and operating systems.

Mike will also be taking a look at XMAL a mark-up based language based on XML, which is currently being used to develop rich media experiences such as those you will see when developing with Silverlight or WPF.

For more information on the free event go to:
http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032355901&Culture=en-GB

or check out Mike Ormond’s blog at:
http://blogs.msdn.com/mikeormond/default.aspx

Hope to see you all there!

Tuesday, 25 September 2007

Scott Guthrie MIX Interview




Scott Guthrie was kind enough to give Kevin Pfister and myself an interview during his busy schedule at MIX:UK. This is just a preview of the finished video which will be uploaded onto Channel 8 as soon as the audio is cleaned up.

If you like this take a look at my MIX mashup as well.

Monday, 24 September 2007

MIX:UK Video

Check out my Mashup of what happened at MIX:UK




I originally used silverlight streaming to host this video, however blogger as yet dosn't seem to support the featue. Therefore couldn't get the silverlight video to be embedded properly in blogger, however I will still make a post shortly on what you have to do to use Silverlight Streaming.

For now enjoy the youtube vid.

Tuesday, 11 September 2007

MIX:UK Day 1

Yesterday was the first day of MIX:UK 2007 and it couldn't of been better.
The day started of with a brilliant keynote, presented by a large numbe of people it gave a brilliant overview of what MIX is all about. Starting off by wowing the audiance with brilliant footage of silverlight in action. The keynote was made up of a number of demos from Microsoft employees and companys who use Microsoft technologies to develop great solutions.
There was a demo on how to build a silverlight media player application, using expression blend which took under five minutes to get a stunning end peice with rich animated graphics.

After the footnote and a short break, Scott Guthrie went on to explain silverlight development in much more detail, starting with the basics of how to use XAML to create a brilliant GUI by using different shapes and effects. The main thing that struck me in the design and creation of the GUI was how similar it was to creating SVG with XML. Once Scott had got the basics done with the GUI he went on to show us some more advanced techniques such as using transform matricies to transform and rotate buttons and shapes. Also connecting Silverlight to the users local machine to use folders from there pc was really interesting. This presentation has really given me the silverlight bug, and once I download VS 2008 beta (as Express dosn't support SL) I will get progamming and designing some small applications.

The next presentation was all about harnessing the power of Windows Live apps in your own web sites so using such things as Virtual Earth to create websites such as Track Me and another sports tracking system which allows uses to track there excercise by using a GPS device which is then synced with a map to show the route that the user has run on a map. There was also talk about a Silverlight hosting system where you can get up to 4Gb of FREE storage for your silverlight videos and applications. When you upload your apps you are then given a section of JavaScript that you can copy and paste into your own web site for free video hosting. For more information on using Windows Live apps on your web sites have a look at http://dev.live.com/.

Throught the day we managed to get a number of interviews and am really looking forwards to an interview with Scott Guthrie on the second day of MIX.

The day ended with a final show down between the people attending the event fighting for the crown of Guitar Hero. I think this was a billiant competition with all competetors putting on a great show. The winners ended up bagging themselves a great graphics tablet and also means I will now start training my Guitar Hero skills for the next MS event that I go to.

Overall the first day was a great experience and I can't wait for what they have in store for us in the second day of MIX. There is a number of talks on Orcas and the .NET 3.5 framework that I am particularly looking forwards to not to mention whatever tricks they have up their sleeves.

Thursday, 6 September 2007

WWE Silverlight

Everyone has to check out this new site from the WWE (Wrestling) built using silverlight it is apsolutly awesome. It has some cool vids on there Wrestle Mania 3! Check it out!

http://www.wwe.com/inside/silverlight/launch/