Showing posts with label gaming. Show all posts
Showing posts with label gaming. Show all posts

Wednesday, June 10, 2015

Head Tracking with FaceTrackNoIR

I've been aware of head tracking solutions since I started playing Arma 2; the game (and it's sequel, Arma 3) has the ability to "freelook", meaning you can continue to walk or point your weapon in a certain direction, while you scan your surrounding environment. This is extremely useful from a tactical standpoint, but it's also particularly helpful when piloting vehicles (especially helicopters). Probably the most well-known commercial solution is TrackIR; this kit comes with everything you need to start using head tracking in games that support it, but it's a little on the expensive side (around £175). Despite some serious consideration, I never actually bought the kit myself; I didn't think it was worth it considering the relatively small number of games I play that would benefit from it, especially when consumer versions of both the Oculus Rift and HTC Vive are not far off. So I was extremely excited when I happened across a post discussing head tracking on the Elite: Dangerous subreddit that mentioned a free alternative: FaceTrackNoIR. As it's name suggests, this little bit of software can use a webcam attached to your machine to track your actual face; when you hit "start", it identifies the basic shape of your face, then translates your movements into the desired protocol for the game to understand.
Tracking my FACE!

The application has quite a few configuration options and it took me a fair amount of time tinkering with them to achieve the desired results, but to say I was impressed is an understatement: being able to simply move my head and look down at the spot where I was trying to land my heli was not only super cool, but useful too! Once I started using it, I didn't want to stop, however it does have a couple of drawbacks:
  • It's sensitive to poor lighting - I actually found if it was particularly bright outside, the software would often lose or simply not be able to recognise my face.
  • The CPU usage is fairly high - it seemed to fluctuate between roughly 5-10% when in use; that's a fair amount of precious CPU cycles that could be put to use by a game engine (Arma 3 being particularly CPU hungry)!
After having a play around with the different settings in the application and reading the FaceTrackNoIR wiki, I discovered that there are a few different tracking sources available, one of which works in a similar fashion to TrackIR. This helps to improve accuracy and/or reduce the CPU load, but unfortunately is still susceptible to poor lighting and also requires an IR clip providing three points to track. However, on the same Reddit post I mentioned earlier, somebody commented that they had bought a "relatively cheap" IR clip to use with this particular mode of operation: the DelanClip. Given the low cost, I thought I'd give it a go myself. The kit I bought is the most basic model and comes with a USB powered IR clip, two cable ties and a couple of sections of coloured film that can be used to create a light filter for your webcam:
Attached DelanClip

Webcam with filters attached.

After I'd finished setting up, I downloaded the latest version of the PointTracker plugin (overwriting the version that ships with FaceTrackNoIR), tweaked my config and fired it up. I found that I only really had to tweak the curves that define the translation between your actual head and your in-game character to my liking (here's my config file if you're interested) and make sure there were no direct light sources in the webcam's field of view.
3x IR point tracking

I've definitely had more luck using the PointTrack plugin than the FaceAPI; there has been much fewer incidents of the software "losing" me. If there's anybody reading this wondering just how beneficial free-look in games can be, let me just show off a couple of Elite: Dangerous screen caps I took while using FaceTrackNoIR:
Checking my flight path is clear before leaving the landing pad.

Tracking an enemy ship that would have otherwise flown out of my line of sight.

Of course, these actions could be achieve using regular input (mouse, keyboard or even a hat-switch on a joystick), but I honestly feel that head tracking provides a more natural and (sigh) immersive experience. The only thing that will surpass this (in my opinion) will be a full VR headset, which I'll definitely be wanting to get my hands on once consumer devices are available!

Wednesday, September 24, 2014

Nvidia Game24

I was very disappointed to not be able to attend the Game24 event in London last week; an unfortunate combination of poor connectivity and memory on my part! However, I was determined to take part in the 24 hour celebration of PC gaming (oh, and the launch of a couple of little products by Nvidia), so my wife and I set up a mini-LAN party in our lounge:
ALL THE SCREENS

The Two Towers: Icarus (white) and Daedalus (blue).

I watched a fair bit of the Nvidia Twitch streams; it was nice to see such a wide range of topics discussed and different interviews. However, we mostly just played a lot of Guild Wars 2!

Monday, February 17, 2014

Titanfall Beta: First Impressions

I have to admit, I wasn't too excited when I first heard about Titanfall. My prejudice against the "co-creators" of the Call of Duty franchise meant I anticipated something similarly lacking in substance from Respawn Entertainment's first game. However, the sci-fi setting combined with the inclusion of "Titans" (essentially, mechs) as part of the FPS's core mechanic certainly intrigued me, even though my expectations of the game were still fairly low.

When the opportunity arose to apply for the beta testing programme (which, in my opinion, are more akin to a free trial these days), I decided I'd sign up. Saturday evening, I received an email informing me I'd been accepted, so I jumped onto my machine to kick off the download via Origin. After the game installed, I moved it to my SSD and created a symlink (as I'd done previously for Battlefield 4) to give me faster loading times.

I've fired it up today and played through the tutorial to get acquainted with the core gameplay before jumping into a couple of multiplayer rounds of the Attrition mode; essentially Team Deathmatch. I recorded some footage from a couple of the rounds, which I've uploaded to YouTube:

The game does bring back some fond memories of playing old sci-fi shooters like Quake and Unreal Tournament, but with the added twist of being able to occasionally pilot a Titan during the round spicing things up a bit. The rounds themselves tend to be fast and furious and I found I actually quite enjoyed the gameplay. As a pilot, running along walls, double jumping and mantling up onto ledges feels really fluid and made me feel like I was free-running through the futuristic landscapes; particularly while playing on the Angel City map. The Titans feel suitably powerful when stomping around and the weapons/abilities are enjoyable to use; especially the Vortex Shield, which captures incoming ordinance to use against opponents. I also found waiting for my Titan to drop added to the suspense of the round, while being able to jump into or being picked up by it gives a rush of satisfaction knowing you'll soon be raining death down on your enemies!

One of the biggest weak points in my opinion is the 6v6 limitations of the multiplayer; despite what the devs have said in the past about the AI opponents fleshing out the rounds. The Star Wars Battlefront games used to employ AI in this fashion and it worked well; in Titanfall, not so much. I occasionally found myself wandering looking for the battle, despite the relatively small maps. However, it's not as big an issue as I originally thought it was going to be. I'd like to give the game a go with some friends, as I think the small team size would work well here.

I enjoyed my brief time with the game, and I'll try to play some more before the end of the beta. I'm not going to be fooled into playing too much; I did this with the Battlefield 3 beta and I was really disappointed when my stats were reset for the final release. So, I thought I'd see how much the game costs to pre-order and I was shocked to see a list price of £44.99. I supposed I shouldn't be too surprised - all of EA's major titles seem to be similarly priced at launch - but it's too much an asking price in my opinion. I'll stick it on my isthereanydeal.com waitlist and pick up a copy when it's cheaper in a sale.

Update - 18/02/14: So, I only just noticed that I didn't have any minimap or other HUD elements available to me. It turns out that playing the game with my Eyefinity setup results in the HUD elements being scaled off the screen - I found a post on the Wide Screen Gaming Forum that confirms the problem.

Monday, February 3, 2014

DayZ Me Rollin', Dey Hating - DayZ Commander without Admin Privileges

I arrived on the DayZ scene rather late; PC Gamer had been talking about the famous Arma 2 mod for months by the time I got around to playing it. In fact, it was only when the mod became a distinct title to install via Steam for owners of Arma 2: Combined Operations that I took the plunge.

Running DayZ through Steam is a cinch, however you only get access to the vanilla mod. In fairness, there's still a lot of fun to be had playing vanilla DayZ; I have clocked up 77 hours playing it according to my Steam profile. I know my friends have played for even longer and between us all we've had many amazing and terrifying experiences.

Vanilla is plenty of fun, but I have been watching YouTube videos and Twitch streams of other players, which made me aware of the many mods of the mod; Day Zero, Epoch, Namalsk, for example. Some of these mods simply fixed a few issues with the standard mod, others added whole new functionality such as base building, while others brought new maps to the experience.

Installing any of the mods isn't a trivial process, but then neither was DayZ itself originally. However, even before the vanilla mod was available through Steam, there was a tool that simplified the whole process.

DayZ Commander

I had my first experience with DayZ Commander a few months ago and I had unfortunately been put off using it for two reasons:

  • The download page itself was a mess of unrelated download links for software I didn't want and the installer itself was packaged with various third party pieces of bloatware. There was a tiny link to a version of the installer that was free of anything unnecessary, but it was a bad first impression. However, I have visited the tool's homepage again recently, and things are better; the download page is far easier to navigate, the default download link points to a clean installer and there was even a post from the developer apologising for going down that dark path (which I can't seem to find to link to any more).
  • The application required administrative rights to run. Many people that I mention this to are nonplussed by this requirement, especially the large number of people who are using an administrator account for their day to day computer use. I'm not going to go into detail here explaining why that's a bad idea, that's a topic for a whole other post, but suffice to say; this exposes yourself to additional and unnecessary risk.

The download/installer issue didn't put me off by itself, but the requirement that the tool run with admin privileges was a show stopper for me. After searching online for information why this might be necessary, I happened across a discussion on the DayZ Commander Google group from 2012. In the conversation thread, the tool's author states this requirement is a legacy hangup from when he originally wrote it, and mentions that this is something he'd like to review. Clearly, this hasn't happened yet, but I was intrigued to see a response from a user who had written a utility that would remove the administrative requirements, for which a download link was provided.

As well intentioned as that helpful user may have been, I'm not keen on downloading random executables (I'm quite a paranoid user, as you may have guessed by now). However, it did lead me to think how does somebody go about changing a binary in this fashion?

Windows SDK

It turns out that executable files tend to have a manifest containing metadata required by the OS to correctly run the program. The manifest itself is an XML document, and part of it can be used to specify the privilege level required by the application:

<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
  <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>

You can probably tell the above snippet tells Windows that the executable requires admin rights in order to run. Changing this XML requires the use of a command line tool from the Windows SDK: mt.exe.

Installing the SDK is a simple enough process; just grab the relevant installer directly from Microsoft. During the installation, you need to select the ".NET Development -> Tools" component in order to have mt.exe available to you.

Finally, the Solution

Before we start, it's worth noting the following preconditions that you will have to ensure are met before attempting the solution. The process may work if you don't, however, I have only tested the solution with given this system state:

  • To get myself started, I followed the instructions I found for working with DayZ Commander and Steam on the Steam community forums. However, I did not perform step 3c; running the Arma executables as an administrator.
  • To clarify, I only installed Arma 2 and Arma 2: Operation Arrowhead via Steam, not the Operation Arrowhead Beta or the DayZ Mod (DayZ Commander manages these for you).
  • Install DayZ Commander only for the limited user account you play games as, instead of for all users of the system. For me, this allowed the modified tool to work properly. I suspect the issue I had when I installed for all users was down to folder permissions. Maybe changing them would fix the problem, I haven't tried yet.

So, assuming the above criteria are met (or you're happy to try anyway), here's my step-by-step guide to stripping the admin requirements from the DayZ Commander binary:

  1. Install the Windows SDK, making sure you select the ".NET Development -> Tools" component when asked:


    NB: I already had the Debugging Tools for Windows installed, hence the reason it's selected (and greyed out) in the above example. It's a useful set of tools to have, especially if you want to debug BSOD crash dumps, so feel free to include it yourself.

  2. Install DayZ Commander, choosing the option to only make the program available to your own user. This will install the application into your user's home directory, at a location similar to the following (substitute "peter_000" for your own user directory):

    C:\Users\peter_000\AppData\Local\Apps\Dotjosh Studios\DayZ Commander

  3. Make a backup of the executable by copying it to another directory. The binary is called DayZCommander.exe and can be found in the Current directory from the installation path mentioned previously.

  4. Open an instance of command prompt.

  5. Navigate to the directory where the mt.exe tool is located. This depends on which version of the SDK you installed, but it should be something similar to:

    C:\Program Files (x86)\Windows Kits\8.1\bin\x86

  6. Use mt.exe to export the manifest (remember to adjust for your different installation path and output location if necessary):

    mt -inputresource:"C:\Users\peter_000\AppData\Local\Apps\Dotjosh Studios\DayZ Commander\Current\DayZCommander.exe;#1" -out:D:\tmp\extracted.manifest

  7. Open the resulting file and search for the following line:

    <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

    NB: I had to find the second instance of this line, as the first was present in a comment section of the document.

  8. Change the line so it reads as follows:

    <requestedExecutionLevel level="asInvoker" uiAccess="false" />

  9. Save the updated manifest.

  10. Us the mt.exe utility to overwrite the manifest embedded in the DayZ Commander binary with the one you modified in the previous step (again, update paths as necessary):

    mt -manifest D:\tmp\extracted.manifest -outputresource:"C:\Users\peter_000\AppData\Local\Apps\Dotjosh Studios\DayZ Commander\Current\DayZCommander.exe;#1"

    When I performed this step, I instantly could tell the change had worked because the small shield icon that denotes an executable will require admin privileges disappeared from the DayZ Commander.exe.

  11. Run DayZ Commander to check it no longer prompts you for admin privileges. However, it's worth noting that when using the tool to update the Arma 2: Operation Arrowhead binary, you will need to provide them.

Hopefully this gives those of you out there that are as paranoid as myself the peace of mind to install and use the DayZ Commander tool. I'm happy to report that I've been using it for a few weeks now without any problems.

Sunday, March 24, 2013

Razer Megalodon Microphone Issues in TeamSpeak

This is just a small post to describe a solution to a strange problem I experienced with my Razer Megalodon gaming headset. First, I'd like to say I've had these for a few years now and they've never given me any issues previously, whether simply making Skype calls, or in-game VOIP solutions. However, recently I started using TeamSpeak (version 3) in order to chat with friends while setting up and playing certain titles (World of Tanks and Day-Z to be precise) and a rather annoying problem presented itself:

Everything would work perfectly to begin with, but after a while I found that none of my friends could hear me. Alt-tabbing out of the game revealed that the TeamSpeak client was indicating I was still pressing my push-to-talk button, despite me having released it in order to hop out of the game. Thinking the problem lay with the software, I tried closing the the application expecting it to be unresponsive, but was surprised to find it exited cleanly. Restarting TeamSpeak resolved the problem, but only temporarily; the problem would reoccur after a short while. One of my friends even suggested we switch to Skype for the duration of the session, to rule out TeamSpeak, and while this seemed to last longer, the problem did eventually resurface, much to my dismay.

Searching online revealed others had been experiencing the issues themselves and two solutions were suggested, but there was no confirmation that they actually worked:

  • Use a powered USB hub for the headset - the logic here is that the USB port the headset was connected to was unable to provide enough current to the device. I doubted this was the problem, as I'd been using the front panel USB on my rig without issue for years! also didn't have access to a USB hub of any kind, so I could only try another USB port on my system to test this theory.
  • Ensure the device was using the latest drivers - something I had never done was look for updated drivers for the headset; they had always just worked with whatever system they were connected to. This was something I could easily check, so I began a search for a driver update.

The support page for the headset on Razer's site didn't point to any updated drivers, but there was a firmware update utility. Once installed, it walked me through placing the device into an upgrade mode, which involved holding down the central button on the devices's control unit while connecting it to my system. Sure enough, my headset was running an older version of the firmware (2.10 vs. the latest 2.12), so I let the utility perform the update. After the update, the device needed to be unplugged and reconnected to the system to switch it back into it's normal mode of operation.

Since I went through all the above, I have managed to get through a very long session of Day-Z (around 4 hours) without experiencing any problems! Good times!