Browse by Tags
All Tags »
game programming (
RSS)
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 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