Pages Menu
TwitterRssFacebook
Categories Menu

Posted by on 4th April, 2008

Chase Game in Silverlight 1.0

Chase Game in Silverlight 1.0

Another brief experiment in Silverlight 1.0: this time a simple game. Originally I wanted to have an object that the player would drag around, but apparently Silverlight 1.0 does not have a hittest method for objects. It does in the next version… As the instructions say, keep your mouse pointer away from the wall and the bouncing box… If you do touch anything, the wall you touched or the box itself will highlight with red. My next experiment will be in Silverlight 2.0, because it is quite a bit different and I don’t want to fall behind… [note color=”FFFFCC”] [/note] javascript code var mouseX = 0; var mouseY = 0; var moveX = 0.0; var moveY = 0.0; var X = 170; var Y = 10; //------------------------------ var canvas = null; var plugin = null; var ball; var txtTicks; var lineLeft; var lineTop; var lineRight; var lineBottom; //------------------------------ var gravity = 0.1; var interval; var seconds=0; var ticks=0; function onCanvasLoaded(sender) { plugin = sender.getHost(); txtTicks = sender.findname("txtTicks"); lineLeft =...

Read More

Posted by on 27th February, 2008

Silverlight 1.0 Video Slidepuzzle

Silverlight 1.0 Video Slidepuzzle

I decided to take some time to learn Microsoft Silverlight. Since version 1.1 is still in Alpha and 2.0 is about to come out, I wanted to make sure I understood the technology, from the ground up and decided to stick with version 1.0. Version 1.0 works only with Javascript (JScript) while version 2.0 will work with any of the .NET languages. As usual, it started out with a small directionless project, just to try to get some experience under my belt; then I saw a cool video about a somewhat unrelated technology: Microsoft Surface. What a cool technology… they had a demo of a video playing that would divide itself in puzzle pieces. Ok, back to Silverlight, so I started reading about using a VideoBrush object, which allows you to “paint” a surface of a shape with raw video. That sounds exactly what I need to emulate the effect I saw in that Microsoft Surface video. So my small project morphed into a video slidepuzzle, just like we...

Read More

Posted by on 21st December, 2004

Polaroid image manipulation in ASP.NET

Polaroid image manipulation in ASP.NET

In this experiment I show how to take an URL of a regular image and then return a manipulated image with the looks of a Polaroid picture. In other words, it requires retrieving and loading the image provided in the text box into memory, convert the text provided in the text box into a graphic, load a background image into memory and then putting it all together. Finally, rotate the finished image in memory and return to the browser as a binary stream. All this on the fly… [button link=”http://old.miguelmoreno.net/sandbox/polaroid/default.aspx” color=”#FFFFCC” size=”1″ style=”4″ dark=”1″]read...

Read More