12.06.2009

sfxr in Flash

A programmer named DrPetter wrote a program called sfxr. It's a cool little utility that easily allows one to create synthesized sounds reminiscent of 8-bit era video game and computer sounds. Others have ported his program over from Windows to OSX and Linux. I've had the pleasure of using the Windows version and it's a very tight tool. However, the Linux version is a different story. I've done everything I can think of short of going into its source code to get it to make reliable, quality sounds. What usually ends up happening when attempting to use the Linux port of sfxr is that it will only produce sounds for the first ten or so requests. Then it refuses to make any sound at all, which is a major flaw for this type of program. Not to mention the fact that the sounds it does make are not of the quality of the Windows version. They are choppy, quiet, and almost monotoned. Finally, adding insult to injury, the program hangs when you try to close it. I end up having to use xkill every time. I should note, however, that when a sound, whether heard within the program or not, is exported as a WAV file, it play just fine with the sound quality I'm used to from the Windows version. This seems like SDL_sound is being using poorly. (For bug-tracking purposes, I'm using Ubuntu 9.10.)

Thankfully, another port has saved the day. Believe it or not, it's a port in Flash using AS3! Now, I'm really not a fan of Flash. I was fine with it until I stepped over into the Linux world. Enough said. But here's a rare case of Flash actually serving a purpose: cross-platform compatibility.

Check out the completely functional Flash version of sfxr at http://www.superflashbros.net/as3sfxr/

11.26.2009

Makefile vs. Shell Script

I'll just come out and say it. I hate Makefile. Well, I've learned to live with it from a user's perspective. It's not terrible to install things with Makefile. But I hate, hate, hate it from a developer's standpoint. I hate making makefiles for my stuff. It's all so very cryptic and I feel like I have so little control. So, here's my point. I've been playing around with SDL via C++ lately and it's a pain in the butt to have to keep typing in long compile commands.

Here's a sample Makefile for a given C++ SDL project:

SDL_CFLAGS := $(shell sdl-config --cflags)
SDL_LDFLAGS := $(shell sdl-config --libs)

all:
g++ -W -Wall ${SDL_CFLAGS} -o test test.cpp ${SDL_LDFLAGS} -lSDL_image


Here's a shell script that does basically the same thing:
#!/bin/sh

SDL_CFLAGS=`sdl-config --cflags`
SDL_LDFLAGS=`sdl-config --libs`

g++ -W -Wall $SDL_CFLAGS -o $2 $1 $SDL_LDFLAGS -lSDL_image

exit 0

I like the shell script version a lot more. To me, it just feels more versatile like I have more control. I wouldn't ship the shell script to users with a finished product, but I find it easier to use while I'm just playing around and testing things since I'll be compiling often. Just thought I'd share.

10.30.2009

Ubuntu Karmic Tweaks

With a new version of Ubuntu comes new hardware configuration tweaks!

SOUND

I had a hell of a time with the sound this time around. First off, I was getting strange popping noises every ten seconds or so. After a bunch of searching around the nets, I found this solution that worked like a charm for me.

In the file "/etc/modprobe.d/alsa-base.conf" there should be a line that looks something like this:
options snd-hda-intel power_save=10 power_save_controller=N

Change it to this:
options snd-hda-intel power_save=0 power_save_controller=N

I also had a hard time regarding system volume. I learned from previous releases that the PCM volume needs to be set low while the master volume is what changes with the hardware volume buttons on my laptop. However, this time around the PCM volume changed with the master volume. The solution to this lies in the file "/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common".

Under the [Element PCM] heading of this file, "volume = merge" must be changed to "volume = ignore". Now the PCM can be set low and it will stay there.

FAN CONTROL

A file must be created called "/etc/modprobe.d/thinkpad_acpi.conf". The contents of my file are "options thinkpad_acpi experimental=1 fan_control=1 brightness_enable=1". This allows the root account to change fan settings via "/proc/acpi/ibm/fan".

Since my laptop's firmware absolutely sucks at regulating the system fan in a way that makes any sense at all, I decided to replace it with system scripts. Luckily, I didn't have to write my own. I used the scripts offered here. Once those scripts are in place, simply run "sudo update-rc.d tp-fancontrol defaults" and the script will be all set to regulate the fan at every startup.

GRAPHICS

The "/etc/X11/xorg.conf" file should be created and show read as follows:

Section "Device"
Identifier "Configured Video Device"
Option "AccelMethod" "uxa"
Option "EXAOptimizeMigration" "true"
Option "MigrationHeuristic" "greedy"
Option "Tiling" "false"
EndSection

10.24.2009

So-called "Gamer Girls"

I was recently perusing a popular video game magazine/website and happened upon a feature about hot girls who play video games. Now, it's not the first time I'd seen such features. While my better judgment told me that these were simply models being posed with various peripherals, my natural naiveté took over. Perhaps these attractive young women actually were classic hardcore gamer freaks like myself.

...until I arrived at a particular picture which effectively broke all my happy delusions. After seeing it, I knew these ladies' gaming experience is probably limited to playing "Tetris on my iPhone, and I played my little sister's Nintendogs a couple of times." The picture in question was of a brunette holding an N64 controller. Lo and behold, her left thumb rested squarely on the d-pad.

I've long been a critic of the design of the N64 controller. I know what they were going for, but you need three hands to hold it comfortably! And that's how I knew! The vast majority of N64 games (or at least those worth playing) use the "analog stick" to achieve primary control. In fact, going for the d-pad first is a telltale sign of an N64 noob.

This revolting display of hardcore gamer ineptitude flew in the face of all I was led to believe about these gamer vixens! This phony button-mashing beauty probably couldn't discern a Dreamcast from an Intellivision! I bet the descriptions of the ladies were fake as well. This was the equivalent of a gamer Penthouse! If there are any gamers as gullible as I, beware of "gamer girls." Learn from my experience.

10.12.2009

Gimmick! Cheat Codes



Gimmick! is a wonderful Famicom game, but it sure is difficult. I made up some Game Genie codes that should help improve your skill without chucking the cartridge out the window. "But, wait!" you say. "You can't use the Game Genie with a Famicom!" You're absolutely right. However, you can play Famicom games on your NES using an adapter which should work with the Game Genie. Or, you could use the Pro Action Rocky with your Famicom. There should be resources to convert Game Genie codes to Pro Action Rocky codes out there on the internets. Also, all these codes should work in your favorite NES/Famicom emulator.

UPDATE! New shorter codes! Now they're only one line each so you can use a decent number of codes together.

Infinite Lives:
XVVTTSVK

Invincibility (except for pits and spikes):
XVOEEKVK

Enjoy! I'll add more codes for some of my other favorite games once I craft them.

9.18.2009

Abandonware: Miner VGA

Here's a game from 20 years ago that I recall from my childhood. It's called Miner VGA (or VGA Miner depending on where you look). I first played it from my old shareware compilation CD called Game Empire from SoftKey. Back in the days of DOS games, this CD-ROM kicked ass! This was before the age of the Internet, keep in mind, and my family didn't subscribe to any bulletin board systems, which I really can't fault them for. So these bargain bin discs available at your local office store were treasure troves of games for your PC. Although 99% of the games were shareware with the other 1% being freeware, this CD was still packed with fun. Shareware back then simply had fewer level packs than the registered version. Many games were identical to the registered version save for the nag screen when exiting the game.

But enough of this trip down memory lane and on with the game itself. The point of this game is to make as much money as possible by mining below a tiny gold-rush town. The dynamics of the game are a combination of really basic rogue-like principles and commodities trading. It takes money to make money and this game is no different. Each time you mine a square it costs you money. Hopefully you'll find silver, gold, platinum, or better in that space. Most of the time, you won't. And once in a while your mine will flood from a natural spring or cave in on you. Above ground you have the store for your tools, a hospital to help you recover from unfortunate mining accidents, and the bank where you can appraise and sell your precious minerals you've found. But watch to make sure that the man doesn't scam you. The going rates for each mineral will fluctuate over time.

This game is fun to play in short bursts. The controls are easy and the concept isn't hard to pick up. However, it's not without its faults. It is so easy to die or run out of money in this game. The worst part is that when you are mining, which is most of the game, it's really just a crapshoot. As far as I can tell, there's no way to tell whether or not you're close to anything valuable. There are no veins and there are no hints. I'd imagine a system somewhat like Minesweeper's number system to help you do some prospecting.

So the game isn't spectacular. It's good, though. It shows a lot of promise. Unfulfilled promise, as the game was released in 1989, but promise none-the-less. I find the basic dynamics of the game compelling. It reminds me of the mining portions of Harvest Moon: Friends of Mineral Town for GBA. A similar dynamic has also been employed by none other than Dwarf Fortress. Dwarf Fortress also has its fair share of digging and collecting minerals as well as cave-ins and water trouble. Of course, Dwarf Fortress has implemented this on a much larger scale, but it turns out that its makers were influenced by Miner VGA.

I'm not the only one who has been influenced by Miner VGA. Justin Sharrad has ported the game to the PSP, calling it MinerPSP.

If you have a second to play around and you already have DOSBox set up, I recommend you give this game a minute of your time. It might just inspire you like it has me.

Here's a link to the game files at the original author's site:
http://www.beachnet.com/~hstiles/bin/minervga.zip

9.02.2009

A Haiku About Installing Haiku Alpha 1

Still rough 'round edges
But simplicity is good
Intriguing OS...

This install bores me
Wait! Were those just python scripts?
My heart skips a beat

Love me some Python
These windows borders kick ass
Haiku might be good.

(Download Alpha 1)