Silverlight Tips of the Day - Blog by Mike Snow

Game Programming with Silverlight

Browse by Tags

All Tags » game programming (RSS)
Silverlight Tip of the Day #33: How to Scale your entire App and its Elements to your Browsers Size
Let’s say you have a Silverlight application that you want to be scaled to the same width and height of your browser window. This way the application takes up the entire window and not just a fixed sized within the window. To illustrate this I have created...
Silverlight Tip of the Day #32: How to Declare a Custom User Control from a XAML Page.
UserControls are a great way to separate objects into smaller, more manageable chunks of logic. These controls can reused by different applications and are independent from other controls. Each UserControl can contain any amount of content and logic and...
Silverlight Terrain Tutorial Part 3 - Creating Smooth Tile Transitions using Opacity Masks
This tutorial will look into using the Opacity property on the tiles to create smooth, natural looking transitions between tiles. For example, blending a dirt tile into a grass tile, a grass tile into a rock tile, etc. Run the demo here: http://silverlight...
Silverlight Tip of the Day #31: How to Detect Alt, Shift, Control, Windows and Apple keys with Left Mouse Down in Silverlight
When clicking on your Silverlight application how do you know if the <Alt>, <Shift>, <Ctrl>, <Windows> and/or <Apple> key is down as well? To do this, you simply need to check the Keyboard .Modifiers member which returns...
Silverlight Tip of the Day #30: Fast Sprite Animation in Silverlight
For this tutorial I will be demonstrating how to create a fast, optimized Sprite animation class. In my demo, you will be able to: Increase the speed of the sprites. Increase the count of the sprites. To stress the sprites further, I have added random...
Silverlight Tip of the Day #29: Creating a Transparent, Draggable Dialog with Rounded Corners
For this tutorial we will step you through the basics of what you need to do to create a dialog that you can: Drag/drop. Add transparency (opacity) to. Round the corners. To preview and run this application please visit this link: http://silverlight.services...
Silverlight Tip of the Day #28: How to Implement a Custom Mouse Cursor
In Tip of the Day #27 we talked about how to change the mouse cursor. But what if you want to have a cursor icon that is not supported by Silverlight? This tutorial will show you how to do it. For a complete demo of this tip visit: http://silverlight...
Silverlight Terrain Tutorial Part 2 – Using Transform Matrices to Create 3D Looking Terrain.
For this tutorial we will make use of matrix transforms to skew and scale an image in a terrain tile while moving the individual vertices of the terrain tiles. This will give the terrain a 3D look and feel. Make certain to read Part 1 of before reading...
Silverlight Tip of the Day #27: How to Change the Mouse Cursor
Let’s say you want to change the mouse cursor when hovering over a UI element. You can do this directly in the XAML by setting the Cursor property. For example, if you want to change the cursor to be the Hand     cursor when hovering over...
Silverlight Tip of the Day #26: How to Change the Output XAP File Name.
Don’t like the default name given to your XAP file? Good news! You can change it but there are two steps you will need to take. Step #1. Right click on your Silverlight application node in the solutions explorer and choose “Properties”.    Choose...
Silverlight Tip of the Day #25: How to Build the XAP File to the Debug/Release Folders
By default when you build your Silverlight application you will notice the XAP file is placed in your web sites ClientBin folder: This is regardless of whether you are building under Debug or Release configurations. In Visual Studio 2008 you can choose...
Terrain Tutorial Part 1 – Creating a Scrolling Map
For this tutorial we will be generating a 2D terrain map. Preview and Run App: http://silverlight.services.live.com/invoke/66033/Scrolling%20Terrain/iframe.html Source Code : Scrolling Terrain The view is a straight down birds eye view. As shown in Figure...
Silverlight - 3D Simulated Terrain Tutorials for Silverlight Games
My next set of blogs will be about creating realistic terrain for games that have a birds eye perspective on the world. To start, I will be creating this tutorials: Creating a scrolling map. In this tutorial we will go over the basics needed to create...
Silverlight Tip of the Day #24: How to Apply a XAML Template to a Class
Let’s say you have a class where you want to declare elements via a XAML template instead of dynamically creating them. For example, the XAML to declare an image and add it to a canvas would look like this: <Canvas x:Name= "MyCanvas" >...
Silverlight Tip of the Day #23 – How to Capture the Mouse Wheel Event
Silverlight currently does not support mouse wheel events. However, you can attach an event to capture the mouse wheel movement through the HtmlPage object. This tutorial will show you how to do it for IE, Opera, Mozilla and Safari browsers. To start...
Next