Ubuntu 9.10 (Karmic Koala) Sound Not Working Issue

I run Ubuntu 9.10 x64 using PulseAudio (the Ubuntu 9.10 default) on my primary computer for everything except gaming. About kernel 2.6.31-17 I noticed my sound stopped working. The volume controls still seemed to work but, alas, no audio. I tried everything I could think of or find online. As it turned out there was nothing wrong with PulseAudio. The problem was that my modem was grabbing the sound device before PulseAudio could (which also accounted for why every ~25th boot my sound would work fine).

Below are the simple steps I took to fix my issue.

sudo fuser -v /dev/dsp* /dev/snd/* /dev/seq*
sudo killall slmodemd
sudo killall pulseaudio

Note that fuser is only used to confirm the modem is the issue while pulseaudio will restart after killed, thus properly grabbing the sound device.

Since I not using my modem these steps worked for me. Obviously this would cause a problem for you if you were using your modem. If that is the case check out one of the other proposed solutions and see if one of those works for you.

[Source]

One-Man Wrecking Ball

I have been working from when I wake up into the late hours of the night every day. For weeks I have designed, built, and tweaked. My projects and visions for them are coming closer and closer to completion. Most of my work has been secret and the information I have shared with the few has been intentionally sparse. It has been a long time since I have felt such pride and worked so hard for it.

If I can keep up this pace up for a few more weeks big things for everyone who wants them are coming.

Creating is Hard 2

In a previous post I talked about a failed board game idea and I implied I might try it as a web-based game. Well after a lot of work on that I decided to take a break and try a game on Steam. Turns out I bought a game a while ago by the name of Mayhem Intergalactic but never played it.

Upon reading the text on the Help screen is when I realised this is basically the same game. Liking the basic concept– obviously– I started up a quick single player game versus the AI. Turns out it is nearly identical to my vision. Sure, I previously figured out my ideas were not all that original, but how many clones of the same game can the public tolerate? If someone likes my game over the competitions I would like to think it has to do with the features. Not because they simply did not already have alliance to another, similar game.

I still feel my version brings something to the table that the others lack (at least as far as I have seen). However, I need to ask myself if I still want to continue; Time is not something I have a lot of and I might rather work on something a bit more unique. After all, the sub-systems I have already built (login, chat, security mechanisms, ect) could be moved to another project virtually unmodified so it is not like scraping this project would mean I wasted most of my time…

Missing JavaScript Functionality

JavaScript does not offer a lot of things one would imagine would be included in such a seasoned scripting language. Below are a few functions I wrote to fill some gaps.

Trimming the whitespace off both sides of a string

function trim(str) {
return str.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
};

Padding the start of a string

function pad(str, len, padding) {
str += "";

if ( str.length <= len ) {
var str_new = "";
for ( i = 0; i < len – str.length; i++ )
str_new += padding;

return str_new + str;
}

return str;
};

Getting the mouse position

var mouse_x = mouse_y = 0;

function mouse_position_update(e) {
if ( document.all && !window.opera ) {
mouse_x = event.clientX + document.documentElement.scrollLeft;
mouse_y = event.clientY + document.documentElement.scrollTop;
}
else {
mouse_x = e.pageX;
mouse_y = e.pageY;
}
};

Getting an elements absolute position

function element_position(element) {
var x = y = 0;

if ( element.offsetParent ) {
x = element.offsetLeft;
y = element.offsetTop;
while ( element = element.offsetParent ) {
x += element.offsetLeft;
y += element.offsetTop;
}

return [x, y];
};

All of these were tested in Microsoft Internet Explorer 8, Mozilla FireFox 3.5.8, Google Chrome 5.0.307.9 beta, and Apple Safari 4.0.4.

Please note I have not touched JavaScript in years and I am a bit rusty.

Update 2010.03.02
I noticed an extra bracket in element_position() which is now fixed. Sorry about that.

Creating is Hard

I was working on a combat-based board game for a number of months. I started off with some ideas I thought were unique and built from there. After a lot of work and begging threatening bribing asking people to help me play test I was slowly forced to either modify or remove my unique ideas (it turns out that it is difficult to be objective in these situations). It became clear that no matter how cool my ideas were they may simply not work. It seems, in retrospect, that these ideas were never all that unique in the first place but were absent from the market place because of the same problems I ran into.

I grew up playing video games a lot more than playing board games. As such while designing board games I brought to the table a lot of odd things; Some were good, some were bad. One of my biggest problem to this day is the limitation of the human brain for computation vs a computer. When I think of the gears of gameplay I think in numbers. Numbers, however useful, are not fun. I need a way to mix these two worlds.

One idea that comes to mind is the web as a gaming platform. I am not necessarily talking about Web 2.0 or AJAX. I am talking about a technology that even mobile phones have access to. The World Wide Web is so ubiquitous and easy to script for that I would be dumb not to at least consider it. A lot of my ideas transfer very well to this platform and I think I may give an old, failed idea a shot in this medium.