background preloader

Game development

Facebook Twitter

Aggregating RSS Feeds in C# and ASP.NET MVC 3 | Wade Wegner. I’m working on a Windows Phone project that requires me to surface up multiple RSS feeds as a single source. I needed a way to do this quickly and easily, and with a little help from friends on Twitter (particularly a suggestion from @bertcraven) I found a nice way to accomplish this using the SyndicationFeed in System.ServiceModel.Syndication.

I’ve detailed the steps below, but if you want to get to the heart of it then here’s the code to get this working: It’s really quite simple – once you know how to do it! As you iterate through the list of feeds we use LINQ to union the feeds together – in the end this produces a main feed that has all the contents. For me I wanted to create a service that published the aggregated feed – I chose to use ASP.NET MVC 3 for this new feed. Create a new ASP.NET MVC 3 Web Application.

And that’s it! You might consider doing something similar. I hope this helps! Scattered Polaroids. Download source code - 334 KB Table of Contents Introduction Scattered Polaroids is the first part of a project I'm developing for my friend Janaina Rossi Moreira, who works in a Brazilian theater company named "As Bárbaras do Multeatro". The goal of the project is to publicize the work of the company, and at the same time provide the visitors with a nice audio and visual experience, relying on multimedia, videos, imagery, poems, and recollections that better capture the artistic essence of the company.

There are many ways one could develop to navigate through collections of photographs, usually in an orderly fashion. Scattered Polaroids is a different method, like when you take an old box full of pictures, drop them all on a table, and start picking them randomly. This article deals with this technique, and hopefully will be helpful for you in some way. System Requirements Internet Explorer 9 or superior Firefox Safari Chrome The Polaroid Box Loading the Images Creating the Polaroids History. Canvas Drop and Drag Test. » How to Drag and Drop on an HTML5 Canvas. We explored using keyboard input to move a shape on an HTML5 canvas here Now we’ll take a look at using input from the mouse.

With a few simple calculations, you can drag and drop shapes on the canvas with your mouse. UPDATE: I’ve added a companion post for IE compatibility. IE Compatible Canvas Drag and Drop With jQuery and ExCanvas This example is coded for readability and not for optimized operation. Here is the code listing that we will be discussing. <! You can copy this code and paste it into a new file called something like draganddrop.html and when you open it with an HTML5 friendly browser like Firefox 3.6 it will display the canvas with a draggable square on it. The details of how we create a canvas and draw our shape on it can be found in this previous post We create our draggable square with this call to rect() instead of.

How to implement DRAG AND DROP feature using HTML5 | bOtskOOl. There is no doubt that HTML5 is making life easy and fast for web developers. With its new attributes for elements, HTML5 is a boon of the decade. In this tutorial we will learn about one of the most useful feature of HTML5, that is drag and drop method and how to implement it. First have a look at demo, Drag and Drop Example Here is a list of online users, drag the users to list them as friends or others User1 User2 User3 User4 Download Link to demo How to implement this? We are going to use draggable attribute of HTML5. Suppose, we want to drag User1, so all we need to do is define its html attributes [as given below]. <div draggable="true" id="user1" class="user" ondragstart="drag(this, event)">User1</div> Here, ondragstart is the event which comes into effect when user starts dragging a selected HTML.

Next, we need to define a valid drop-target, <div id="friends" class="friends" ondrop="drop(this, event)" ondragenter="return false" ondragover="return false">FRIENDS</div> e.preventDefault(); #user1. Processing.js. Create an HTML5 Canvas Tile Swapping Puzzle. In this tutorial we will be working with the HTML5 canvas and Javascript to create a dynamic tile swapping game. The result will be a puzzle that works with any given image, and has flexible difficulty levels that are easily adjusted.

Here is a quick shot of the puzzle we will be building: Click to play A couple of notes: Cross-browser compatibility: This puzzle was tested and works in all versions of Safari, Firefox, and Chrome that support the canvas element.Mobile: The code provide here works in the above-mentioned desktop browser and is not optimised for mobile. To get started, create a directory for the project. Open a new file using your favorite text editor and save it inside your project directory, next to your image. All we need to do here is create a standard HTML5 template containing one canvas tag with the id of “canvas”. Now start by placing your cursor inside the script tag.

Ready? Let’s set up our variables and take a look at each one. Next is a series of variables: HTML5 Drag and drop demonstration. Draggable Demos. Untitled. ARIA Example: Drag and Drop Tic-Tac-Toe. Validate DOM (HTML5) Tic Tac Toe Game Keyboard Shortcuts Tab: Move focus between dragable objects and grid Up Arrow: Move focus up one grid cell Down Arrow: Move focus down one grid cell Left Arrow: Move focus one grid cell to the left Right Arrow: Move focus one grid cell to the right Space: Pick up / Drop game peice ARIA Roles and Properties Roles: role="application" role="grid" role="gridcell" role="alert" role="button" States and properties: aria-labeledby aria-disabled aria-grabbed aria-dropeffect HTML Source Code Show HTML Source Code: draganddrop1_inline.inc Javascript Source Code Show Javascript Source Code: globals.js /** * * The Globale Variables */ var KEY_PAGEUP = 33; var KEY_PAGEDOWN = 34; var KEY_END = 35; var KEY_HOME = 36; var KEY_LEFT = 37; var KEY_UP = 38; var KEY_RIGHT = 39; var KEY_DOWN = 40; var KEY_SPACE = 32; var KEY_TAB = 9; var KEY_BACKSPACE = 8; var KEY_DELETE = 46; var KEY_ENTER = 13; var KEY_INSERT = 45; var KEY_ESCAPE = 27; var KEY_M = 77; return str; }

Simple Drag and Drop. Clipping JPEG Images Into Non-Rectangular Polygons Using polyClip.js. A Gentle Introduction to Making HTML5 Canvas Interactive - simonsarris.com. I wrote a book on HTML5, including three chapters on Canvas! Buy it here. This is a big overhaul of one of my tutorials on making and moving shapes on an HTML5 Canvas. This new tutorial is vastly cleaner than my old one, but if you still want to see that one or are looking for the concept of a “ghost context” you can find that one here. This tutorial will show you how to create a simple data structure for shapes on an HTML5 canvas and how to have them be selectable. The finished canvas will look like this: Click to drag the shapes. Double click to add a new shape. We’ll be going over a few things that are essential to interactive apps such as games (drawing loop, hit testing), and in later tutorials I will probably turn this example into a small game of some kind. The HTML5 Canvas A Canvas is made by using the <canvas> tag in HTML: A canvas isn’t smart: it’s just a place for drawing pixels.

Canvas also has no built-in way of dealing with animation. So we’ll need to add: The things we draw . Implementing Drag and Drop Functions with HTML5 and JavaScript. With HTML5 and JavaScript, you can implement native drag and drop functions within the Web browser. This is one of the emerging HTML5 tools that promises to make websites more interactive without relying on additional technologies such as Flash. In this tutorial we will create a simple page with images the user can drag and drop into designated areas. Create an HTML5 Web Page Create an HTML file for your drag and drop function. Add Drag Targets to the Page Your page will contain elements that can be dragged and elements in which the dragged items can be dropped. The draggable images in the page will be able to drop within these elements. Add Draggable Elements to the Page Let’s use a couple of image elements to drag within the page.

Alter the width and height to suit your own images and give each one a unique ID attribute value. Alter the image elements to suit the name, location and dimensions of your own image files as well as your chosen IDs. Style the Elements Implement Dragging Conclusion. Edit this Fiddle. HTML5 Canvas Drag, Drop, and Resize Images. HTML5 Canvas Drag and Drop Multiple Shapes.