18 December 2008

Cool board games

... On FreeBSD, of course. There're many great games in ports of course. In the area of board games, gnuchess, gnugo, and gnubg have been around for a while and are all excellent. gnubg (backgammon) is a very tough opponent! Turns out computers are a lot (lot!) better at backgammon than they are at Go.

So, I like board games. I also like to play board games against humans because, well, I guess I'm not that good at them. :) If you've got your java web-plugin working, you've got a great variety of games you can play against other people on-line. Yahoo! games uses java and has a large user-base and selection of games.

Recently, though, I've discovered this website called BoardSpace. It also uses java and works great on FreeBSD. They have bots available for many games -- which is nice, it gives you a chance to learn the basics before playing against other people. And, they have a large variety of unusual games. They all (mostly?) are in the category of abstract strategy. The site has a modest user base. Very international,too. I guess I wanted to play Hex which I've heard alot about. (Be warned, the bot for Hex is pretty awful.) Then I noticed Hive, a newer game which I'd heard something about. I've tried out Lines of Action, too. It caught my eye because it's played with nothing but a standard checkerboard and pieces. It is a very complicated game, though!

Hive (as seen in the screen shot) is a very engrossing game. For a game with no actual board (beyond the pieces themselves), it is amazingly chess like. I won't bore you with the rules here, but it is cool! It has few enough rules and different pieces to be easy to learn, but still enough for great gameplay and strategy. I'm definitely hooked. If you like strategic board games, you've got to come give this a try.

Labels:

17 June 2008

Firefox Download Day

Download Day - EnglishHere is a fun thing that Firefox is trying to do: set the Guinness World Record for most downloads in a day, to promote their new browser. Wow, I have been using Firefox on FreeBSD since well before version 1.0 and it has served me well.

So, the question is, how do we FreeBSDers (and other non-Windows users) participate? I can't say for sure -- I looked over their FAQ and they didn't go into that much detail. However, I will assume that if I download the source code from a mozilla.org server during the "Download Day" that that will count.

How should we go about figuring out what to download? The make target 'fetch-list' is your friend here. The new Firefox is located at '/usr/ports/www/firefox-devel/' in the ports tree. If you go to that directory and run 'make fetch-list' it will output all locations that the ports system knows about to download the source code from. Just pick out the ones that are in the 'mozilla.org' domain, and you should be in business. It looks like this for me (with a little sed magic to make it more legible):

$ make fetch-list | sed 's/ || /\
> /g'
/usr/bin/env /usr/bin/fetch -ApRr -S 33867426 http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/granparadiso/alpha2/source//granparadiso-alpha2-source.tar.bz2
/usr/bin/env /usr/bin/fetch -ApRr -S 33867426 http://www.gtlib.cc.gatech.edu/pub/mozilla.org/firefox/releases/granparadiso/alpha2/source//granparadiso-alpha2-source.tar.bz2
/usr/bin/env /usr/bin/fetch -ApRr -S 33867426 http://mozilla.gnusoft.net/firefox/releases/granparadiso/alpha2/source//granparadiso-alpha2-source.tar.bz2
/usr/bin/env /usr/bin/fetch -ApRr -S 33867426 ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/granparadiso/alpha2/source//granparadiso-alpha2-source.tar.bz2
/usr/bin/env /usr/bin/fetch -ApRr -S 33867426 ftp://ftp.belnet.be/packages/mozilla/firefox/releases/granparadiso/alpha2/source//granparadiso-alpha2-source.tar.bz2
/usr/bin/env /usr/bin/fetch -ApRr -S 33867426 ftp://ftp.fh-wolfenbuettel.de/pub/www/mozilla/firefox/releases/granparadiso/alpha2/source//granparadiso-alpha2-source.tar.bz2
[snip]

Oh yeah, I need to update this ports tree bad! But, after that I should be getting a later code tarball in this output that should count. I may also manually ftp to their site and make double sure it's the latest for the new version. The ports tree could be lagging if they are releasing the code right before download day.

I sure hope this will count toward the record!

(Update: [Updated again] I checked the Mozilla ftp site and the release code for 3.0 can be fetched from here: ftp://ftp.mozilla.org/pub/firefox/releases/3.0/source/firefox-3.0-source.tar.bz2 . ('http' should work too.) Be sure to leave this tarball in your '/usr/ports/distfiles' directory so it will be there when the port is ready for it!)

Reports are that the official download day begins at 1000 PST today (June 17th, 2008). That's confusing, since I'm in the states and on daylight savings time right now. (I hate daylight savings time.) So, didn't they mean PDT? Argh. So, it starts at either 1700 UTC or 1600 UTC (or, let's be honest, it may be 1800 UTC, because humans and time zone conversions are not compatible).

Another Update! I don't believe grabbing the RC source is sufficient. After rereading the DLD FAQ, I see that it says that Download day (DLD) starts with "the general availability of Firefox 3". So, I'll check for the release source tarball later. (Wasn't there this morning. (Was now and I've updated the ftp link above.)) ... Also, the 1700 UTC DLD launch has been missed. (ended up being 1816 UTC, as per Twitter.) See this post on the Mozilla blog. ... If the RC download page is any guide, linux users may be able to download an official binary. ... Finally, this Twitter page may be useful for up-to-the-minute information.

Really, really last update: The official DLD page confirms it -- you have until 1816 UTC today (June 18th) to complete your qualifying download. A commenter has pointed out that only downloads via the Mozilla web site will be counted.

Labels: ,

24 May 2008

Windows game high scores not saved

Something possessed me to install Snood on the kids' computer again. That's a great, little game. (If you want the same basic game in FreeBSD, take a look at "games/frozenbubble" or "games/monkeybubble" in ports.)

But, after a day of play, we noticed something horrible. Most high scores were not being saved! I've had this issue before with some other Windows games so it was no great mystery. On the kids' Windows XP, only I have administrative rights.* So, after I installed the game, the high scores file (whatever and wherever that was) was only writable by me. When they log in and play, their high scores are not saved.

So, let's fix this. As far as I know, this must be done via the command-line. (I'm doing all of this in XP, BTW. If you're running another version of Windows I don't know which parts of this will work, if any.) Open the "Command Prompt," found under "All Programs> Accessories" in the Windows menu.

Next, you've got to find the file where the high scores are saved. This is not necessarily as hard as it sounds. In the case at hand, I've played and saved a high score successfully, so the file in question should have a modification time that is later than any other file. I've installed the game in the directory "C:\Program Files\games\Snood 4" and if I "cd" there and then run "dir /o:d", I can easily see that "SnoodPrf.40W" is that file:
C:\Program Files\games\Snood 4>dir /o:d
Volume in drive C is SOMETHING
Volume Serial Number is X-YYYY

Directory of C:\Program Files\games\Snood 4

11/08/2001 03:27 AM 237,568 glut32.dll
07/31/2006 02:14 AM 38,928 Agency.fnt
08/08/2006 09:31 AM 6,022 HelpLB.txt
05/18/2007 12:41 AM 268,304 Lexia.fnt
01/22/2008 03:31 AM 77,204 Snood 4.0 ReadMe.rtf
03/15/2008 05:04 PM 18,182,144 Snood.exe
05/22/2008 12:37 AM 685,849 unins000.exe
05/22/2008 12:38 AM 2,332 unins000.dat
05/24/2008 08:40 PM <dir> .
05/24/2008 08:40 PM <dir> ..
05/24/2008 08:40 PM 10,820 SnoodPrf.40W
9 File(s) 19,509,171 bytes
2 Dir(s) 80,384,868,352 bytes free

Now for the fun part. We'll need to use the little known Windows program "cacls" to make that file world "changeable". Use some care with this utility. First, run "cacls /?" to see the basic usage. Of special note, always (always) use the "/E" switch so that your changes to the file ACLs don't replace ALL of the existing ACLs. (Yes, it's stupid by default.) Next, just run "cacls <file-of-interest>" to see what the existing ACLs are. There are several in most cases (and if you forget the "/e" switch, you'll have to replace them all, so be careful).

In my case, I can see that what I want is for the unprivileged "BUILTIN\Users" to change from "R" (read access) to "C" (change access). I say "in my case," only because some people may have a more complicated set-up with network users -- but I'd expect the vast majority of people to be in the same boat as myself. So, here's the command that made our high scores work correctly for Snood:
cacls SnoodPrf.40W /E /G "BUILTIN\Users:C"

I've done this once before for another old Windows game, Worms Armageddon (WA). (A great game, BTW. Check "games/wormux" in ports for an open source clone.) With WA, this process was a bit more difficult. First of all, it has a large, multi-directory structure, so it was tough to find the right file. (It was "<WA-top-level>\User\Teams\WG.WGT".) Second of all, the "C"/change access was not sufficient for the regular users to update the file. I don't know why, but in that case I had to grant full access to the file for the scores and saving to work correctly. Keep that in mind, in case you're trying to fix high scores on some other game. Good luck!

Update
I just (re)installed ThinkTanks for the kids. (Another fine game.) But, it also has score/profile saving issues in Windows. To fix, change to the "<TT-top-level>\game\client" directory and update the ACLs (as above) of these four files:

prefs.cs.dso
players.cs.dso
players.cs
prefs.cs


Update 2!
I'm not intending to catalog every Windows game with this issue. But, I've found another one that has put their save files in an unusual place. It is "Luxor 2" by MumboJumbo. It creates a directory, "C:\Documents and Settings\All Users\Application Data\MumboJumbo\luxor2", that all users need to have full access to. And, the files within and sub-directories as well. So, 'cacls luxor2 /t /e /g "BUILTIN\Users:F"' ought to do it.

* I'll have to write about Windows security some time. But, a big part of any reasonable security plan for Windows is ensuring that everyone logs in under their own username and not with administrator rights!

Labels: , ,