Size Matters

By
Dave
2011
Jan
24
21:08
Posted in

There's plenty more features I'd like to add to this blog engine, but it's currently serving me well.

One of the things I found refreshing about this project is that I now have a reasonably-spec'd personal blog-engine in just a 75Kb download (the source code is 80Kb). OK, the downloads are .zip files, but they expand to 176Kb, and 225Kb respectively (including images).

Disk-space and bandwidh may be cheap, but such a small download to run a blog site appeals to me. Could this be one of the smallest .NET-based blog engines available? :)

Multitouch Game Loop Input Processing

By
Dave
2011
Jan
21
19:37
Posted in

There are multiple potential sources of input for an XNA game component, such as keyboard, gamepad, mouse, Surface multitouch, .NET 4 Touch, etc. Dealing with multpile approaches to gathering input in the Update loop of each component can become complex, and adding support for a new input type further adds to this complexity.

I divided my input handling into two different categories:

  1. Controller-based input such as keyboard and gamepad.
  2. Manipulation-based input such as mouse, Surface multitouch, and .NET 4 touch.

For the latter, I wanted to abstract input handling such that a given game component only had to deal with a custom Manipulator type. In this way, I would be free to change or add input source(s) without affecting the implementation in a game component.

Clearly, different input sources provide different types and degrees of information. Surface multitouch Contacts for example, provide information on size, orientation, type etc, whereas a mouse only provides position. In many cases only position information is necessary, however additional properties can easily be added to the Manipulator type and supported by a game component if available. In this case I decided to sub-class my Manipulator type to the following:

  1. Mouse and finger-touch
  2. Surface Tag contacts
  3. Surface blob contacts

In order to deal with multitouch manipulations, I could process input using my previosuly-discussed Manipulation classes and processor.

The following video demonstrates the use of multiple input sources:

Video 1. Input processing from multiple sources.

Since a mouse can only deliver single-touch input, when demonstrating mouse input in Video 1 I switch the pivot type to "Tracked" in order to be able to demonstrate rotation and scaling, as shown in Figure 1.

Figure 1. Input processing from multiple sources.

Of course, it is unlikely that a scenario mixing both Mouse and Surface input would ever be used in practice, however it serves to illustrate how a game component can handle input in a consistent way, without being aware of the input source. For example, the buttons on the left of the screen are "pressed" using either Surface v1 Contact or a mouse-click, however the buttons only tracking Manipulator state.

A useful application of this approach is the ability to write XNA applications which work with both Surface v1 multitouch input and .NET 4 multitouch (and mouse for single-touch if multi-touch hardware is not available) without any code changes, i.e. multi-platform targetting.

Blog Engine v1.2 Released

By
Dave
2011
Jan
05
23:13
Posted in

I've made some improvements to my personal, lightweight blog engine from version 1.0 as follows:

  1. Added <meta name="keywords"> and <meta name="description"> tags to the post detail view and post model to help SEO.
  2. Corrected various HTML formatting issues, and provided new, more flexible CSS styles.
  3. Added a blog index showing posts by category.
  4. Added a simple CAPTCHA for comment submission.
  5. Added a gallery.
  6. Added support for site-pinning with Internet Explorer 9 Beta on Windows 7.

You can download version 1.2 using the following links:

  1. Dr Dave's Blog Engine v1.2 (binaries and ASP.NET pages) (zip'd), 75Kb. Files required to run Dr Dave's Blog Engine.
  2. Dr Dave's Blog Engine v1.2 (source code) (zip'd), 79Kb. Visual Studio 2010 project for Dr Dave's Blog Engine.

To install the blog engine using the binaries, follow these steps:

  1. Un-zip the archive and copy the files to your web site.
  2. Browse to your site and you should see the following:

    front page

    Figure 1. Front page after installation.

  3. Click "Sign In". The default username is "admin" with a password of "password". Click "Edit Account" in the Admin menu and change the password. A combination of upper-case letters, lower-case letters and numbers is recommended, with a length of at least six characters. You can also change the username if required.
  4. Click "Settings" on the Admin menu, and update the blog title, sub-title, and feed-title accordingly. Update the other settings if required.

If you decide to use this engine to run your blog, please keep the "Powered by" link, and I'd be grateful if you could inlcude an acknowledgement.

This project remains under active development as and when bugs are identified, or further features are required and I have the time. Note that I do not have time to support the installation or operation of this blog engine, however I will endeavour to answer questions in comments.