Thursday, January 19, 2012

Simple TCL script for renaming files

So, I got this bundle of files from work and the file name formatting weren't to my liking. Capitalizations and spaces are things I tend to avoid in Linux when possible as you need to use the backslash escape to get the filenames interpreted properly. Tab auto-complete would allow me to use them, but I just didn't like to see my filenames with all the backslash stuff on. So, I decided to whip out a TCL script to do the work for me. It's largely based off the first simple script I did and only took a few minutes to do.

To use it, you just supply the filepath with all the files you want to be renamed and it'll go through each one for you. The script isn't properly tested, so keep that in mind when using this. Its clean up is basically to change the capitalizations to lower case characters and replace all spaces with dashes.


Sunday, January 8, 2012

Another Update (and mini-review): Sniper - Ghost Warrior

I've played Sniper - Ghost Warrior on Windows just to see if it's worth anymore headaches and while I see some merits on the game, there's one very serious problem with it. First, we should cover the good stuff.

The game looks great and it gets the basics of shooting targets down, which is nice. Audio department is well done though not entirely unique. Using the same engine as Call of Juarez ticks all of those boxes very easily.

There are merits to the game but there are also serious issues with the AI and stealth mechanics. The game has a bar at the bottom which tells you if you get spotted by enemies. On paper, it should help with the stealth elements of the game, but in practice, it's severely broken. Sometimes, enemies will be able to find you for inexplicable reasons despite the fact you are well hidden in the foliage. There are moments that when you pop out, the meter serves something of a countdown timer for enemies to spot you. And sometimes they can find you even if they are no larger than an ant, just because your head pops out. The AI is aggravating, but rectifiable with the age old save/load. This however turns the game into a case of trial and error. This crazy problem easily takes down the game several notches, which is a shame for a game with high presentation merits.

I'm disappointed in that the game fails to live up to its potential, but it's not beyond playing. That being said, I will no longer work on getting this running on WINE. It just ain't worth that kind of effort.

Saturday, January 7, 2012

Update on Wine and Sniper - Ghost Warrior

Having read through a bit more debugging channels with dsound and alsa, I've figured that the game is using mmdevapi to scan through the different possible devices in /dev/snd/ to see which one to use. This bit is very interesting as it seems that after scanning each of the hardware and opening plughw:0,1 device correctly, it attempts to reopen it to play the sound and that is when it gets the device or resoure busy error. I wonder if Wine currently honors the Alsa Driver registry settings enumerated in a forum post I found on archlinux.

[Software\\Wine\\Alsa Driver] #disable auto scan sound card "AutoScanCards"="N"  #specify number of output device "DeviceCount"="1" #point it to your hw number "DeviceCTLn"="hw:1" #same as above "DevicePCMn"="hw:1" #optional: direct hardware interface "UseDirectHW"="Y"

I'm pretty sure at some point this was still honored but I didn't see whether or not Wine still looks for this (a simple grep should suffice, I suppose).

Friday, January 6, 2012

Sniper - Ghost Warrior with Wine

This is just a minor update of my battles with Sniper - Ghost Warrior and sound. Wine says the game should be running without problems, but I'm getting no sound. After doing a bit of tracing, I found this and I'm not sure why the audio device would lock up like that.

trace:alsa:AUDDRV_GetAudioEndpoint "plughw:0,1" 0x86e8b40 0 0x86e94f4
warn:alsa:AUDDRV_GetAudioEndpoint Unable to open PCM "plughw:0,1": -16 (Device or resource busy)

This is the only game to do this. I checked with Dragon Age 2 demo (nice game, by the way...) and I didn't get that problem.

I ran lsof /dev/snd/pcmC0D1p and it looks like pulseaudio is using the device, which is nothing out of the ordinary when I'm playing Dragon Age 2. More debugging needed.

Wednesday, January 4, 2012

ARMA II = Mouse Wheel

I've had ARMA II sitting on the Windows drive for a while now and everytime I played it, I am just boggled at how to do stuff. Pressing 'Enter' to perform action as suggested by the tutorial has got to be the stupidest control mapping in the world. That all changed last night.

Deep down, I felt that there was no possible way this game would gain a following with such controls and decided to roll the mouse wheel. Lo and behold, everything became playable all of a sudden. If the tutorial had once mentioned this, I would have been playing it more often.