UDK 3 and Rigid Body Physics Headache

I have been experimenting with UDK for the first time, and wanted to share my experiences with basic physics.

Problem: Add a static mesh Actor, start the level, and it's just floating mid air until you shoot it.
Solution: Convert to KActor to get the 'Wake On Level Start' property, or roll your own UnrealScript to call .WakeRigidBody();

Problem: Start the level, watch the KActor placed in the sky fall down through the floor and disappear.
Solution: The default map 'Kill Z' is stupidly set exactly level with the floor. The falling velocity makes the KActor briefly go lower than the floor, causing it it to be destroyed before the collision physics take effect. View the World Properties and set the Kill Zone to something like -9999.

Problem: You want to prevent players from being able wake scripted physics events or use Kismet to wake KActor physics.
Solution: Set wake on start, but set Physics=PHYS_None then use UnrealScript or Kismet to set Physics=PHYS_RigidBody on demand.

Problem: Create a StaticMeshComponent class that extends Actor, you cannot walk through it, but it will Move() through you.
Solution: Along with bCollideActors=true and bBlockActors=true, you must also have CollisionComponent=YourMeshName for it to collide properly.

Dyn SLA Update Alternative

Long time ago I got a DynDns.org address, as it was the only thing my Linksys router supported. They then stopped the free service for new users, but allowed existing users to remain free. To their credit they have kept their promise for a number of years, but this week I got an e-mail informing me I must log into their website every 30 days to keep the domain.

This is obviously just a polite way to get rid of free users, as I doubt anyone will want to log in that often. So I made the switch over to freedns.afraid.org (http://freedns.afraid.org) who I have been using as a free secondary DNS on my websites. At home my dynamic address is updated by my DD-WRT based router, and for my parents home, where the router is more basic, I use a free client that sits in the tray at logon (http://freedns.afraid.org/scripts/freedns.clients.php).

Experiencing the Oculus Rift

When I saw the Oculus Rift on KickStarter, my gut instantly told me to back it, and so was lucky enough to be around order 4700. I’ve had my Rift for a couple of weeks, it gives a great sense of scale, and my first reaction was wow! Shortly followed by, oh wow I feel incredibly sea sick…

The head tracking is very responsive, but currently not being able to lean does confuse your brain, so I found keeping a strict upright posture helps reduce the motion sickness. The biggest problem for me is the resolution, things at close range look good, but in the distance it’s like a scaled up NES game. The result is less detailed worlds work better, lots of lush foliage like in Far Cry and any on screen text ends up a pixelated mess. While I knew this when backing, my concern is the consumer version is going to need a truly amazing DPI screen for regular usage.

At the moment I am using my spare time to look at various foot control methods for the Rift, as standing in an immersive world but navigating with your hands just… feels wrong. Ultimately I have high hopes, the Rift does show that VR headsets can take gaming to the next level, and at the very least I hope developers pay more attention to 3D support so the alternatives like NVidia 3D Vision, will also work better 'out the box' for more games.

32Feet Under

I have been using InTheHand 32Feet.NET Bluetooth Library (http://32feet.codeplex.com) and wanted to post a solution that took me far too long to find.

To get callback working for pairing authentication, use NULL for a pin when calling PairRequest(Address, Pin);

new BluetoothWin32Authentication(Win32AuthCallbackHandler);
var btDiscoveredList = btClient.DiscoverDevices(255, false, false, true);
foreach (var btItem in btDiscoveredList)
BluetoothSecurity.PairRequest(btItem.DeviceAddress, null);
btItem.SetServiceState(BluetoothService.HumanInterfaceDevice, true);

Blu-Ray Software

A friend lent me a blu-ray copy of 'Cabin In The Woods' horror movie, When trying to play it using AnyDVD and MPC, the playback order was scrambled.

Turns out there is a type of content protection where dodgy playlists are added.
You have to use 'Navigate, Jump To' and try to pick the correct .mpls entry.
Either take an educated guess ( shortest over an hour ) or look for a forum post.

I also decided to try some commercial alternatives:
– PowerDVD 13 trial required registration, interface was more horrifying than the movie.
– WinDVD 11 trial required registration, puts you on mailing list, tries to install a toolbar.
– ArcSoft TotalMedia 5 trial, no registration, more than just a player, but I liked it.

None of them would play over my wireless HDMI link or if I was remotely connected, and would to disable aero during playback. So I will be sticking with AnyDVD.

LGSL 5.8 for Joomla 3.0 Update

Updated the code to the latest Joomla XML / OOP / design requirements.
The new version has been tested as working on Joomla 2.5 and 3.0.

I also submitted a new entry to the Joomla directory listing, but there are so many
commercial, crappy, and malicious submissions, there is a months worth of
backlog while a few JED volunteers test each one to make sure they are OK.

LGSL may not even pass as they ask for a Joomla loaded check in every PHP file, which is not practical for me to maintain as a lot of the code is a cross CMS library.

We will see if common sense prevails, but I have nothing to lose or gain from it 🙂

Programmatically restoring files from a Volume Shadow Copy


A specific file has been corrupted on many home directories.
Within a Volume Shadow Copy backup is a good copy of the file.

The corruption is easy to detect, but how do you code something
to automatically go through previous versions on multiple servers.

Here are my findings with some snippets of C# to help.

Command Line:

When you open a previous version, explorer shows the date in brackets:
\\server\folder (‎01 February ‎2013, ‏‎12:34)

But try that same path in the command line or code and it will fail.
Shift Right Click on a folder, 'Open command window here' and you get:

Using a VSS time in a file path:

That @GMT path can go anywhere you would expect a directory, for example:
Both shares go to the same place, providing a copy the previous version.

Finding a valid VSS date and time:

The GMT/UTC path has to be the exact moment the 'Shadow Copy' was started.

Tests showed the starting seconds varied daily, even the starting hour changed
as the VSS schedule was local time and 'daylight savings' had taken effect.
In short, using the schedule and guessing paths was not going to be practical.

As a starting point I found the command line: VSSAdmin List Shadows
But this has no remote parameter, gave local time, and would require parsing.

Remote WMI query to rescue:

Using "SELECT * FROM Win32_ShadowCopy" and the "InstallDate" property you can
get a list of shadow start times, but they need converting from local time:

var dmtf = wmiProperty["InstallDate"].ToString();
var vssTime = ManagementDateTimeConverter.ToDateTime(dmtf).ToUniversalTime();

WMI results can be returned in any order and we want the newest shadow first, so we put the query results into a list and date sort descending:

vssTimeList.Sort((a, b) => b.CompareTo(a));

The dates can then be converted into a usable directory path format:

var vssPath = "@GMT-" + vssTime.ToString("yyyy.MM.dd-H.mm.ss");

Using the VSS paths:

The shadow times returned are for ALL drives on the server, so when looping
through the times and combining them into a share path, some may be invalid
when the time is for a shadow on another drive.

AVOID Lightworks Video Editor

It silently installs an invisible license manager that screws with your PC.

I needed to do some lite video editing and a site recommended Lightworks.
Used by the professionals and a free version? Great! I will give it ago.
Except it fails to mention it requires an account, so immediately uninstalled.

But later noticed something weird, my hard drives were no longer winding down.
( I have a very quiet PC with a SSD, so you hear when drives are spinning )

Fired up ProcessMonitor and see a 'hasplms.exe' constantly polling everything.
Not something I had seen before and no new entries on Programs list.

Quick google search gave me a helpful blog, had to download the license installer
and run it with the purge command. Shortly after my disks spun down. Hurray.
And that's the story of how I wished harm upon developers I have never met.

The Undeletable File

Came across an undeletable file today at work on a network drive.

The only thing that stood out was it had an @ ( AT symbol ) in the name.
It wasn't hidden or system, just plain ascii, but gave either:
"Could not find this item" or "You need permission to perform this action".
The normal tricks of using Attrib, 8DOT3 name, Robocopy, all failed.

Narrowed it down to any file, in a subfolder, over a network share, with:
@GMT-0000.00.00-00.00.00 ( zeroes can be any digit )
anywhere in the file name becomes protected from rename or deletion.

Seems it was intended to guard Volume Shadow Copy data files, but anyone is allowed to create or rename a file with the above in the name.

The solution was to log on to the server and delete directly from the local drive.

GreyColorViewer 1.1 Released

This is a niche tool to help people with total colour blindness.

For more details about what it does, visit the download page:

Back story of its creation:

A good friend of mine ( Hi Pete ! ) is completely colour blind, in other words he views
the world as shades of grey. After looking at a pie chart, he told me his frustration
when things rely on colour coding.

Out of curiosity I converted various charts and maps to greyscale, and saw for
myself just how confusing they can become. See download page for examples.

I was disappointed at the few bits software available, they were either color pickers, hue shifters for partial blindness, no longer available, or just a pain to use.

So after various experiments and learning about how oddly we perceive colour, this little tool was born. Most importantly it was fun to make 🙂