Of Lux, the strategy game and bane of productivity

Today we're going to be going through a strategy game for Mac OS X, Windows and Linux called Lux, for a few reasons:

  • I like games, and Lux has an interesting history and I had some chats with the author that others might find interesting.

  • There's a certain shiny absurdity to Lux in general that has thoroughly charmed me. The fact that someone went out and recreated the old board game RISK for Mac OS X, and then ported to it to Windows, would be amusing by itself, but the author went way beyond that.

  • It's on my system, yet it's not really installed -- only its preferences are. I keep it within its archive, because its too dangerous to have hanging about in the 'Recent Applications' part of the Apple Menu where it could be easily launched while I'm supposed to be doing other things.

This isn't a real software 'review', more just jotting down my thoughts on it, as otherwise I'd have to go breaking it out "5 out of 5 white russians" or "4 out of 5 cows" or something, and then I'd have to make up a pretty badge in different sizes... Still, you should be able to grok the soul of Lux via this, and why The Cow and myself dig it muchly, later caveats notwithstanding.

Some context

I don't talk about it on the site much, but I love games, and it's worth talking about a bit here so you can take my following thoughts in the right context, as if your frame of reference differs, your view probably would too. I wouldn't say I'm a hardcore gamer by any stretch, but that's primarily due to a lack of opportunity, and that's primarily due to denying myself the opportunity. Obsessive and addictive personalities need to be careful about these things, and if you can't tell, I'm a man of vices.

Without embarrassing myself too much with specifics, lets just say there were 'incidents' where I'd become way too absorbed, to the exclusion of things that were arguably more important, which is why Lux stays within its .dmg until I know I have time to kill -- conquering an addiction is often not about learning to control something so much as learning to avoid something. Avoidance behavior really just needs a better PR team.

It all started as a kid, and the Atari 2600, and my love for a game called Joust. Later, my best friend and I would walk to an arcade which never had any business, and the bored teenager there would open the machine and flip the quarter-slot lever on Kontra a hundred times just so he'd have someone to hang out with.

There was also the Pin Ball phase, and of course there was the SNES and Sega Genesis phase: Super Mario Bros., Shinobi, Double Dragon, Duck Hunt, Zelda, and Metroid. An entire summer in my teens was lost to the discovery of telnet and a MUD in Berkeley, and then there was the Marathon incident, and we won't even discuss Deus Ex or Fallout or Diablo II or, more recently, the digicrack known as Zoo Keeper. I'm not allowed to look at the box of any of the Civilization games. My productivity gets a shiver of fear if I even read the name "Sid Meier".

If we fast forward to the present day, I stick to little mini-games that can be played in 10-15 minutes, or less. I follow everything going on on the other platforms, because the technology in them is so cool, but limit it to voyeurism. And then there is TV, and now TiVo, which brings with it Discovery and History Channel crack.

The smaller games are still cool though, and I still love playing them. Sometimes its just because I don't want to think, and sometimes its because I want to clear my head of everything else before I ask myself to think. Lux is, um, global domination, so that helps.

Basics & Expectations

If you're a geek, chances are you've probably played Lux before, except it was called RISK and involved a sheet of painted and coated cardboard and -- ideally -- lava lamps and Zeppelin.

The basics are simple. Select a map (Classic Risk being the default), and start choosing sections of it as your own, and then distributing the armies you're given where you want them...

There are a bunch of variations here: You can have the computer randomly select which countries you get to start (If you were choosing yourself, you'd probably want to cluster them) as well as where armies are placed, etc.

Time to take over the world, Pinky.

Click on any country owned by another that is adjoining one of yours (Assuming you have armies there) and you're all set, and once his armies are depleted you take it over. Pay attention to the white lines, as they're basically where you can jump the gaps: RISK is all about choke points (fronts), whether funneled in via bridges or adjoining countries. When you're done attacking you can click 'Fortify' and distribute armies around to retreat a bit or better defend what you already have.

Every round you get 3 more armies to distribute, plus bonuses. The bonuses are directly proportional to what you have: If you have North America, you get 5 armies as a bonus because it's harder to defend than South America. Some areas actually give negative bonuses, and some countries give you cards which you can eventually cash in for more armies... You'll figure it out.

It's all very RISK, which is part of its charm and part of why I'm so amused with it, but if it was just RISK I'd probably give it a passing plug here and there. No, I'm so amused by Lux because it's RISK extended to a level that's easily silly and borderline absurd.

The maps

Lux first made my radar back when Quinn did (A Cocoa Tetris game), for most of the same reasons: Solid little apps that weren't too noticeable on the CPU or battery while you were hanging out in the airport, and didn't crash. I lost track of it during an install or another, but back then, it was just the Classic Risk map.

I was a little wigged when it hit my radar again awhile ago -- there are like 1,000 maps now...

There's a lot of replay value by fiddling with the various options for the standard map: Mixing difficulty levels, fiddling with how armies are distributed per round, etc. However, with the addition of the extra maps, plus the user-supplied ones, its just off the charts.

Much of this has to do with how Lux's gameplay works. Splitting the continents into more countries/segments surely adds to the dynamic, and really adds to the length of time it takes to complete a single game, but more bridges will screw you up as it creates extra fronts all over the place. I.E., an example might be the "Ancient Empire" map...

A hell of a lot more complicated than the base original, but it just doesn't stop. Want to take over Texas? Yes, someone created a map of Texas -- sectioned into counties -- and you can battle over your home town. WWII Europe, Germany, Vietnam, the Civil War, California, Japan, Russia; the list just goes on and on...

It's not just geography; Some got really creative and whipped up maps that really change gameplay in a big way, adding 'drop zones' and airports or even changing it to a 'cell' based style of play, which while similar really does change things up...

The maps are actually where things can start to get really weird, as some of the designers are -- and I swear -- designing on 30" monitors and are forgetting the rest of the world doesn't have them. To an extent this hard to avoid with the detail they are putting in, but it can grate. From what I can tell, Lux actually generates the maps on the fly depending on your resolution, and on say, a PowerBook screen you'll be squinting.

While you can go in and tell it to generate a few of the problem maps as 'large', then you end up having to pan all over the place. The "North America" map is a perfect example of this...

It may not look that bad, but imagine it with armies and such on the little slivers and it can get pretty maddening -- more than once I thought I'd secured my rear only to find out the hard way they had a little sliver piece somewhere I couldn't see, or I'd have armies on either side of a sliver, and trying to attack it was frustrating because I couldn't see it. I'd just end up clicking blindly a pixel up and down until I got some feedback. I'm glad its not my problem to solve, but I do know that more than once I was wishing for a 'zoom' command.

And really, only a small amount of the maps have these problems, the majority can be played at 800x600 or less just fine, and the maps really show off how just how many people fall in love with this game.

Of the geeks, by the...

I have friends who play Lux now that aren't what I'd call hardcore geeks, but hey, RISK is RISK and to be fair, those who are going to become obsessive about are probably going to come from a certain persuasion. One of the things that's impressed me so much about Lux is that you really get a sense that it's almost like a weekend-project-to-make-my-buddies-laugh gone completely out of control.

As an example, those who are going to get into Lux in an unhealthy way are often going to be the types who will want to hack it, and the app seems to embrace that.

It's artificial intelligence comes as GPL-licensed plugins in Java, and there's an SDK for whipping up your own, or modifying the existing default.

There's one for messing with the map generator too, which is very cool. It's the kind of touch where they didn't have to do it, and 98% of their customers wouldn't care and won't touch it, but the author knows if he bought an app like Lux he'd want to be able to hack at the AI, so there it is.

It again cracks me up with how understated it is in some areas, and it's "Make your own maps..." menu item is a good example. Obviously if they're going to let people make maps they'll need a tutorial or something, and normally you'd end up hacking together your art and feeding it the app a file with some coordinates so it knows what's a country and such.

Maybe it would have a way for you to graphically designate what's a country and how they're linked. After all, this is like one guy putting this together, but nope, that menu item takes you to a full-fledged editor, complete with drawing tools and such.

There are some rough edges around Lux, depending on what you care about, but this sort of thing is just... absurd, and not in a bad way. When you're creating software and you're short on time and you have a feature the majority of the user base won't ever bother to use... These are features only a small amount of people will care about, but they're features those people will really want. I.E., your normal user may well want to skin their app, but won't want to create their own.

Since the feature will be used by such a small percentage of your base, you want to minimize the amount of work you're putting on yourself, as the developer, to support that feature and put as much as you can get away with on the user.

If you're a small developer, let alone a single developer, every bit of time you spend on one feature is time you aren't spending on another. You generally -- if you can get away with it -- don't sit down and integrate map-making engines into your software, let alone code them, when you're a small shareware developer.

And if you do, you market it to high heaven -- you don't throw it on the site as a bullet point and then throw it under a low-key menu item in the software. It's absurd, and in a nutshell, that's probably why I'm so charmed.

Network

After awhile I got a little uppity when it came to the AI, and was whipping it at the highest levels, so checked out its network play feature, and promptly got 0wned. Hard. When you play long enough, you're going to subconsciously pick up on patterns of play in the AI, and adjust how you play accordingly, and for awhile get completely nailed when you try your kung-fu against another human, and I wish I wouldn't forget this every single time.

Still, bygones, because network play is both a really cool feature of Lux. Creating a networked game is surprisingly easy, you just click a check box before starting a game and you're set.

You can keep it private for playing with friends and/or coworkers, or throw it up and let anyone join via the net.

There's a decent little network browser built in for finding ongoing games online which didn't give me any problems whatsoever...

This is also where the fact that Lux is a cross-platform app really, really comes in handy. There aren't a lot of games out there which:

  • Are cross-platform --- Lux works on Mac OS X, Linux and Windows.

  • Aren't resource intensive, so you don't have to worry unduly about the capabilities of all the machines.

  • Actually allow for networking between the platforms. Hopefully this will improve, but over time, while Macs still get releases of Windows games, their patches and such often leave their networking capabilities spotty at best, and in some cases, developers just don't include that feature.

While networking works great in Lux, there is a small problem: The other people. Actually playing against them works great, but Lux is a turn-based. Like a lot of strategy apps or puzzles -- even something like Chess or Checkers -- this means you have to wait on another person to do something before you can do your next thing.

It's pretty much the bane of all board games in general. One person will finish their turn and go to the restroom, and someone else will use it as an excuse to run and get a snack, and then one of them takes longer than they thought and its their turn, so you're waiting on them, and someone gets tired of waiting and goes outside for a smoke, and eventually you have two people there yelling into the other room, "Are we still playing?"

This isn't such a big deal when it's one person, but there can easily be 6 to 7 people playing a networked game, each having a minute to make their moves, which means you can just be hanging out watching others do nothing while they're thinking for up to 6 minutes until its your turn. You can start doing something else, like email, but you could well end up missing your turn then.

Basically, Lux could really use something akin to Growl support, so you could work on emails or TV and have an alert thrown up when its your turn, or the turn before yours has started, etc.

A few other problems

One of the problems with all those maps is that you have to be able to find them, and Lux does have decent browser built in which allows for previews, rating, and easy installs. Additionally, when Lux starts up it pings the server and checks for new maps, then lets you know...

The rough spot here is that if you click yes, you're taken to that very capable map browser without a clue as to what is actually new. You can make guesses and all, but the selection is now so large it could certainly be improved with some visual feedback on what's been viewed and what's brand new.

The other problem of note I encountered is that Lux may very well show you sides of yourself you prefer to not have to acknowledge consciously...

I'm sure there are other issues I'm not covering, but I really just haven't noticed much wrong with it, at least in areas that would really bother me. It's stable, plays on a spectrum of hardware, and -- assuming you like the gameplay style -- has replay value out the wazoo.

Enter the author

I had a small problem when it came to Lux: It just felt a little off. I hadn't used it for quite awhile, but it didn't completely feel like a native Cocoa app anymore. It didn't feel like it wasn't native either, but screens like the one below through me off a bit.

There hadn't been a Windows version of the game available back when I first played either, so I was guessing they were using a C/C++ engine on the platforms and then wrapping it with native API glue, which would explain most of it. I noticed it was also slower to launch, and upon checking, sure enough: It was a Java app, not Cocoa.

I didn't really mind that it was Java -- in fact I was quite impressed, as its been awhile since it wasn't immediately obvious to me that an app was Jav, but for some reason I'd had it in my head that it was a Cocoa app. I fired off a very short email to the author -- Dustin Sacks -- asking if I was losing it, or if something had changed.

This was entirely amusing, as it turns out Dustin was aware of the site, and had some time on his hands, and sent me an entire tome on the history of Lux. I've edited out a bit, but am including most of it because I think it gives some insights into the life of a small developer that'll be interesting to some and helpful to others...

You are not hallucinating (at least not about this). Here's the sordid story of Lux's history:

From the start the game engine that Lux uses was written in java. It was the first part that was created, before any sort of GUI existed. I wrote it in java since I was creating it for fun (during my spare time in university) and java was the language that I was most comfortable with. When I was looking to add an interface for it I decided to try out Apple's "cocoa-java bridge". Basically it's a java wrapper around all the cocoa classes that lets you to create a native cocoa user interface from a java app.

You can do this using Interface Builder, which was 1000000 times better than my (single) experience trying to write an interface using swing (the normal java GUI library). So when Lux first launched in November 2002 it was a Mac only application using a cocoa UI. Technically it was still written completely Java, but it was tied to a platform specific UI.

The cocoa UI worked well for a long time. I only use a Mac, so I was happy that Lux could take advantage of all the cocoa goodies that Apple provided. From the start I always knew that it would be possible to make a pure java interface to run it on Windows if I ever wanted. I started it just for fun, so I didn't really care that it was Mac only, since it still scratched my itch that way.

Lux was shareware from the start (the version 1.0 price was $10), and as it got better and better the extra cash it sent my way walked the path from peanuts into a nice little income stream. I kept adding new stuff that I wanted to see or that users requested, and Lux went to version 2 and then version 3. Somewhere in there I raised the price to $15. Lux got included on the MacWorld CD and people kept buying it.

After a while I figured I could quit my day job (which I had started at a while back after graduating) and support my meager existence just off of Lux. So I figured I should get it together, write the pure java GUI and get out a Windows version.

I quit my job and enlisted a friend of mine (who had already sold his soul to MS) to help me create a pure java version and get it looking as much like a normal Windows app as possible. All the underlying logic code was reusable, it just meant redoing all the GUI bits in swing. A lot of this was one-by-one duplicating a cocoa-tainted class and changing all the cocoa bits into their swing or java2D equivalents.

This was eventually finished and in June 2004 a Windows and Linux version of Lux was released alongside the OSX one (which continued to use the original cocoa-java GUI, since it was much more mac-like). At the same time I raised the price of Lux from $15 to $20. No cheap ride for the Windows folks.

This is probably how it would have continued, except for an unexpected occurrence. When Apple released the Mac OS X 10.3.5 update in August 2004 the cocoa-java version of Lux started to crash. A lot. I was doing some real nifty (in my mind) threading stuff around the cocoa-java bridge, and something in the OSX update didn't like it. I tried my best to find the source of the problem, but it wasn't looking good.

I was faced with a tough choice. I could try rewriting a large part of the cocoa-java UI in a different manner (I was using NSSelector's for a lot of threading things - it's possible switching to NSEvent's would have helped) with no guarantee that my problems would go away, or I could ditch cocoa completely and move the OSX version over to the java-swing GUI.

The decision was eased somewhat (in a strange way) by the fact that I had always experienced some unexplained instability in cocoa-java-land. Previously it had been rare in occurrence and I was able to work around it. I was under the impression that I was doing things the correct way, but it's possible I had been naughty the whole time and been lucky to get away with it.

The cocoa-java bridge had never really taken off and the support for it (from both Apple and the community) was pretty lacking. Getting any info about it was quite tough.

Dustin sent this awhile ago, before it was announced that Apple was going to do away with the Cocoa-Java bridge, but his message was actually really helpful as a heads-up harbinger of emails to come from others. Still, we can go into that whole chicken and egg situation another time, as Dustin isn't done...

So I decided to give cocoa-java the boot and move the OSX version onto the java-swing interface. Java-swing seemed like a much stabler foundation to base my app on, compared to the ignored step-child of cocoa. It took a lot of reworking to get the java-swing version to look mac-like, but after a while it was accomplished pretty well (albeit no more drawers and palette windows...). Almost a year later and I feel good about the move. No regrets =).

That's most of the drama. Since then Lux was selected as a finalist in the Independent Games Festival at this year's GDC. It didn't win - but I was honored just for the nomination ;-).

Last month I released Lux version 5, which adds a host of neat features that users had been requesting, and I upped the price to $25. Of course, all the updates in Lux's history have been 100% free for all registered users (special thanks to all the early supporters who bought in at $10).

Whew, that ended up being a lot longer then anticipated. Any questions?

Dustin Sacks

It was certainly nice to know I wasn't hallucinating, but I have to say, Lux doesn't feel like a normal Java app, let alone game. Admittedly he's not really pushing the envelope in terms of graphics, but I'm not used to using a Java app endlessly on the Mac and not having it crash or just act wonky, or not wishing my computer was three times faster.

Wrapping up

The reasons notwithstanding, game authors are a rare breed on the Mac. Mac OS X users don't really have a lot of options when it comes to games, let alone titles where Macs are taken into account while it's actually being developed, let alone games that are at the same level as their Windows and Linux counterparts.

There are gems on the platform, but they're rare, and should be rubbed shiny so they can really show off what they're made of. Lux certainly isn't for everyone, and you shouldn't go in expecting Halo or Doom 3, but after a few games with the demo you should have an idea if its for you.

[ Lux Homepage ]

yummy alcohol posted button Posted by drunkenbatman
    August 11, 2005, at 05:42 AM


Comments (20)




Post a comment



Anonymous comments are allowed, but please enter something for a name.

And do endeavor to appear sane.









Remember personal info?