Kevin Vance (weblog of)

Entries | Archive | Friends | Friends' Friends | User Info


05:38 pm

Commander Shepard

Tuesday, October 5th, 2010

While myth is blogging about Mass Effect, I feel compelled to post my Commander Shepard. She was the definitive main character for me, in ME1 and ME2 as an import.

I have the same dilemma about replaying the game. I want to take a new character in ME1 all the way through the good ending in ME2, which would also be a male renegade. I've tried to do this in both KOTOR games (male darkside), but I never get very far.

Anyway I'm still in the unrelenting grasp of Civ 5, so I suppose it's not a matter of immediate concern :P

Link )7 Comments )  ( Comment on this )

03:08 am

Friday, September 3rd, 2010
Thanks, GNU project. Thanks for this:
xargs sh -c 'emacs "$@" < /dev/tty' emacs

Launches the minimum number of copies of Emacs needed, one after the other, to edit the files listed on xargs' standard input. This example achieves the same effect as BSD's -o option, but in a more flexible and portable way.
It is a great relief to know how flexible and portable GNU xargs is every time I have to look up that incantation in the man page. Taunting me with BSD xargs' -o option is an especially nice touch.

Current Mood elated
Current Music Mick Rippon - Existing
Link )5 Comments )  ( Comment on this )

11:23 pm

Storing Integers with Android ListPreference

Thursday, July 29th, 2010

Android has a nice built-in preferences framework, but it's a bit half-baked. A key ingredient of that framework is the ListPreference, a UI item that displays a list of options when clicked. The ListPreference is populated with an array of labels and a corresponding array of values, but the arrays are String-typed. Nectroid uses ListPreferences to select polling intervals and the IDs of database rows—integer types!

Here's a hackish solution that allows you to keep using ListPreference while having it store integers back to your app's preferences:

Read more...Collapse )

Stupid, but not as stupid as copy-pasting the original ListPreference.java and modifying it to use an int array!



Current Music Reyn Ouwehand - Asian Legends
Link )Comment on this )

09:12 pm

Sunday, July 18th, 2010
I finally finished my first proper Android app: Nectroid 1.0! It's also the only application I've ever written in Java, despite learning the language in 1997.

I covered a lot of the Android API with this one: animated transitions, resource/asset management, background tasks, sound playing, message queue handlers, file cache, preferences, foreground services, notifications, simple network access, XML parsing, and a decent chunk of the UI widgets and drawables. It was also the first time I got to use Java generics and its for-each loop. And this was my introduction to the Android Market and Google Code platforms.

As learning experiences go, that's pretty good!

It took about two weeks for Java to stop being aggravating to work with. I've found this to be true in the past with Objective C and even StarBasic. Java's rigid structure and relentless verbosity do not work well with my development routine. I struggled to Not Repeat Myself using single inheritance and closures that are 90% boilerplate syntax. Vjde took a bit of the edge off. Eventually, I just got used to it. But it never became fun like Objective C or Python.

Next, I'm going to look at some game development. I've heard skeptical voices about paid apps on the Android Market, so I'm also looking into the "ad-supported for free or pay" model that seems to be popular.

Current Music Skaven - Space Hulk I: Captured Sun
Link )11 Comments )  ( Comment on this )

01:25 pm

Dealing with 32-bit Flash on Linux... AGAIN.

Tuesday, June 15th, 2010
Tags, , ,

Adobe recently patched a vulnerability in the Flash plugin. But they didn't release a fix for the 64-bit version, officially (and effectively) abandoning it. This posed a problem for me, since I can't get audio out of a 32-bit program.

Back when I built my current Linux machine, I decided that the motherboard's included "Bernstein audio module" daughter card was good enough. The only killer feature it was missing was hardware mixing. This turned into a huge problem. Most Linux distros' solution to software mixing is PulseAudio, and a perfectly reasonable thing to do with Pulse on a new Linux install is to remove it entirely. Pulse has a lot of nifty bells and whistles, but it's built on a terrible foundation. Integral to the Pulse experience are stutters, pops, and wandering audio-video synchronization.

After giving up on Pulse, I turned to JACK. JACK has some features too, but more of the kind that are useful to musicians and professionals than to home users. Where Pulse can automatically downmix a 5.1 audio stream to my 4.0 speaker setup, JACK would require that I manually edit the channel mappings, or use a program like JACK Rack to filter the audio through a LADSPA plugin. However, JACK makes up for this by providing reliable, low-latency mixing.

It turns out that there's one more problem with JACK. Its wire protocol is not compatible across different CPU architectures. A 32-bit JACK client cannot talk to a 64-bit JACK server. This didn't affect me until the 64-bit version of Flash was dropped. Now I have a problem: if I want Flash videos to have sound, I have to run PulseAudio and endure its many problems, or give Flash exclusive control of the soundcard like it's 1997.

There's only one thing for it: jam Pulse in between the audio source and JACK.

Details & DiagramsCollapse )

Now programs that need good audio support (e.g. MythTV, MPlayer) can use JACK directly, and programs that don't (or can't) can use Pulse. This is really stupid, and only barely seems to work. I've been manually killing and restarting the Pulse audio server and the Flash plugin a lot (thanks, Google Chrome!). But it seems to be the best of a bunch of bad options.

Link )6 Comments )  ( Comment on this )

02:10 pm

Nexus One Spinny Cube

Friday, June 4th, 2010
Tags,

I bought a Nexus One 2 weeks ago, and I've started learning its programming environment. Since I've gotten into the habit of making a spinny cube for every platform (previously: V3 RAZR, NDS), here's my Android one:

This was my first experience with OpenGL ES, and gaaaaaaah it's not fun. I think some of that is also Android's Java implementation of it, since you have to jump through hoops to make the now-required geometry buffers in the required hardware format. For complex game engines, it doesn't matter. But for "my first OpenGL", what a difference! For example, drawing a quad:

Example code follows...Collapse )

Anyway, continuing on with more Android this weekend. My goal is to write a little app for interacting with Nectarine. That should cover a range of GUI, network, XML parsing, and IPC tasks.

Link )3 Comments )  ( Comment on this )

11:08 pm

It's like long twitter, right?

Thursday, May 20th, 2010
Like a lot of old MZXers have this month, this is the time I notice that this LiveJournal is TEN YEARS OLD today. TEN.
Link )3 Comments )  ( Comment on this )

06:55 pm

Monday, March 8th, 2010
I have a PS3 slim! If you want to be Playstation friends, I'm FarChime. (ParTime, my online gaming nickname since the mid-1990s, was taken.) I bought it to play FFXIII, and my copy is currently in the hands of UPS.

Trying to find a PS3 this month was like being in alternate universe 2007. I went to four stores and came back empty handed. I had to resort to ordering one online from RadioShack, because Amazon was out of stock at the time.

I really have to commend Sony for not nickle-and-diming me to death with it either. Everything I needed was in the box, and it's all normal stuff. The controllers charge with a plain USB cable, my normal USB keyboard works, there's a standard HDMI video port in the back, the internal wireless adapter is included, no stupidly expensive memory cards are required, and there's no subscription fee to play online. THANK YOU.

It's still a stupid waste of silicon and plastic considering I have a more powerful general purpose computer, but obviously I've thrown up my hands at that years ago ;)
Link )Comment on this )

06:09 pm

Friday, February 19th, 2010
So when I first read about Ubisoft's new copy protection requiring a constant internet connection, I figured it would be a short time before someone with common sense interceded. This has not happened. Instead, they're rolling it out for Assassin's Creed 2. The "value added" for requiring the constant internet connection is storage of your saved games on their servers; not a trade-off I'd choose.

When the connection fails, your game stops until you can reestablish the connection or you give up. If you give up, you get dumped back at the last save point once you have an internet connection again. On a single player game. All for a feature that I don't care about.

The typical knee-jerk shouts of "boycott it" and "pirate it" were predictable, but I'm not interested in doing either. I enjoyed the previous game so I want to pay for the sequel. But I don't want to encourage the most heavy-handed copy protection I've ever heard of, and I especially don't want to communicate that I prefer console games by purchasing the 360 version.

So here's my promise to Ubisoft: I'll buy Assassin's Creed 2... once the crack is out.
Link )Comment on this )

12:04 pm

Oh, hi.

Thursday, February 18th, 2010
Icicles

Last week, wikle asked me if I gave up on my LiveJournal. I might have inadvertently abandoned it. Twitter and Google Reader have subsumed most of the functions I was using LJ for. I still have no other place to post rambling rants, but I haven't felt the need. I'm still reading my friends page every day.

Not much else is going on. I switched from Firefox to Chrome a couple months ago, and the benefits outweigh the drawbacks on 64-bit Linux. I want to redesign my website, I have about 5 projects I should work on, and there is a massive amount of snow outside.

Link )6 Comments )  ( Comment on this )