Nostalgia is Playing Wipeout 2097 Again

Let me paint a picture for you. It’s 1996. Clinton is in power in the US and can do no wrong, while on this side of the pond John Major’s grip on power is weakening. One bright grey afternoon at my sister and brother-in-law’s flat my sister pointed out a new device on the floor of their living room. “Do you see what we’ve got?”. Not being familiar with the device in question, I asked “A Nintendo 64?”. The reply came smugly: “No… a PlayStation.”. Ace! I’d heard of that! It was supposed to be really cool. “Can I see?”.

So in due course Wipeout 2097 was loaded (I should say wipE’out” 2097, or Wipeout XL for our American friends) and I gazed in awe at the marvellous 3d graphics and smooth gameplay. Soon enough I was playing it myself, even more in awe of the power of this new machine.

So I took a trip down memory lane today and relived my first PSX moment. Despite being very rusty I breezed through the first four levels, but on the final two my lack of practice started to show:

It’s still a really good game, in my opinion. And while the music wouldn’t be my first choice for a lazy Sunday afternoon, it definitely complements the game.

Project Euler Problem 17

Check your spelling / letter counts. Seriously. Sixty is 5 letters long, not 6; a false friend numeral.

Also, from the forums: look at the use of the word and. The examples are your friend.

Project Euler Problem 11

Just a hint, so you don’t go down the wrong path. You probably won’t, but if you don’t want any hints, stop reading this article!

PS If you don’t know what Project Euler is, I recommend having a look at their website, or just getting an idea from the problems themselves.

What is Project Euler?

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

Now problem / puzzle 11:

In the 2020 grid below, four numbers along a diagonal line have been marked in red.

(snip)

The product of these numbers is 26 63 78 14 = 1788696.

What is the greatest product of four adjacent numbers in any direction (up, down, left, right, or diagonally) in the 2020 grid?

Just a hint for those of you who spent too long on this like me: it’s essentially a word search. One of these but with numbers.

You see, when I got the wrong answer a couple times I reread the question, and figure “adjacent” just meant anywhere beside each other – eg a square of four numbers, a t-shape. This is not the case! You don’t need to develop a path-finding bot that navigates 4 numbers, looking for the best options! Although, having done that, it’s actually quite fun! In python, at least, it’s quite concise and the code is pretty-looking.

Bonus points (or a packet of chocolate-coated raisins) to the first person who does implement such an algorithm. The answer I’m looking for is the highest product of the resulting 4 numbers, and leave it in the comments.

Bet I won’t get an answer!

Plain Sight Dedicated Server Crash Fix

Plain Sight was on sale for the staggeringly low £1.60 / £1.20, so I decided to get a copy. It is a very fun, fast-paced game, with lots of great moments – where you pull off an attack a split second before an opponent does the same, or when you detonate just as three people come gunning for you. However, it is not without issues. I am writing this post as I wait for the master server to let me log in and play, and matches will occasionally crash half of the people on the server to the desktop with what looks like an array out-of-bounds exception.

Frustratingly, the dedicated server software itself has problems. One problem occurs even before running – where do you get it from? It is not well-signposted on any of Beatnik Games’ websites. As it stands, you have to go to the members’ area of plainsightgame.com (http://accounts.plainsightgame.com/), where you can download both the server and the client.

(The TLDR version: If you have Steam, use the dedicated server included with that. Strip out whitespace and comments (//) from the example dediconfig.txt on the wiki. If you don’t have Steam or don’t want to faff about, use this zip.)

Now, it is good practice to have an example / default config file available for those that want to just run the server… which the dedicated server zip doesn’t have. So if you run it, it complains about not being able to find the config file and then crashes. Right, no problem, just copy from the wiki page on setting up a dedicated server and paste into the new file dediconfig.txt. Ah, hang on, that crashes the server on launch with a System.FormatException.

Show »

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: plainsightserver.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 4bc74e1c
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4a275af7
Problem Signature 07: c43
Problem Signature 08: 59
Problem Signature 09: System.FormatException
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 2057

Stripping out the whitespace and comments lets the server run. I would be more specific, but I can’t actually tell what is causing the problem. It disappeared when I got down to two / one comments, and reappeared when I added another. My debugging skills couldn’t detect any commonality though. Anyway, it runs… briefly. Checking the log file (plainsight.log) shows that it is exiting due to not having the “Updater” directory present. eg:

Show »

0 Connecting to master server(s)...
0 New master server connection status: AwaitingChallenge
633 New master server connection status: VersionCheckFailed
633 New master server connection status: NotConnected
633 New master server connection status: AwaitingChallenge
650 Error Updating: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:Gamesplainsightdedicated4UpdatercwRsynccwRsync.cmd'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at PlainSightServer.Program.LaunchUpdater()
650 New master server connection status: NotConnected
650 New master server connection status: AwaitingChallenge

Now, you can get this from the directory in your Steam directory that contains the dedicated server (!), or from this zip file: Updater.zip. Now, if you want to continue down this path that’s grand, but for me it *royally* screwed up permissions on that folder, to where I couldn’t even run the server executable file! It is possibly due to the rsync updater running as System / nobody, but even still I feel it’s a bit harsh! Of course, it might just be a Windows 7 thing. Despite that, even when I (think) I had sorted out the permissions, the game was still crashing with an error in KERNELBASE.dll (see below). Eeep. So, what I did at this stage was to make a copy of the Steam version of the dedicated server, copy over my dediconfig.txt file and run that. Then it ran.

For those of you who don’t have Steam, I have created a zip containing the dedicated server with a working dediconfig.txt file: DedicatedServer.zip

Show »

Problem signature:
Problem Event Name: APPCRASH
Application Name: PlainSightServer.exe
Application Version: 1.2.0.0
Application Timestamp: 4c6e7ef9
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdbdf
Exception Code: e0434f4d
Exception Offset: 0000b727
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 2057

Fix for “Current Password No Longer Matches Keyring”

A I may have mentioned, I recently reinstalled Ubuntu (had been using Windows 7 for a few months). Since the reinstall I had changed my common login password for the other computers on the network so of course I updated my user password for the new install.

The slight problem came when I used any application that accessed the keyring (say, network-manager), as there was a password mismatch between my credentials and the keyring. This was because I preserve my /home partition to keep my data (a good practice) and that is where the keyring data gets stored (logically). But it got tiresome to frequently see:

“Enter password to unlock your login keyring. The password you use to login to your computer no longer matches that of your login keyring”

It’s dead easy to fix though.

  1. Go to Applications -> Accessories -> Passwords and Encryption Keys
  2. Right-click on Passwords: login
  3. Select “Change Password”
  4. Enter your old login password (the one that it repeatedly asks for!) in the old password bit, and put your current login password in the new password fields.

And that’s all there is to it!

An Old Video (FEAR – Stolen Kills)

I’ve been posting a fair number of videos to another blog for the folk I play games with (including the other MIA author of posts on this blog Kenny). It’s a good way to relive some moments and also a way for me to practice my cutting and splicing skills.

Long story short, I encoded an updated version of a video I created about three and a half years ago. The old one was small resolution and tiny bitrate. This version is full (source) resolution and a relatively insane bitrate.

FEAR – Stolen Kills (pop-out player if you have JS enabled, non pop-out version here)

Synopsis: I shoot Kenny in the back (with friendly fire on) and I’m rewarded with two kills. Obviously a sounds strategy!
Continue reading →

Playing The Steam Version of Indiana Jones and the Fate of Atlantis

As someone who still has the original floppies for Indiana Jones and the Fate of Atlantis (or IJatFoA, it’s easier that way), I thought I’d give the Steam version a whirl. I picked it up (along with The Last Crusade) probably when it was on sale as part of a bundle.

My initial thoughts are: “what have they done to the music?”, “since when did the characters have voices?” and “this is a lot simpler than what I remember playing as a 7 year old”.
Continue reading →

[Solved] sshd Does Not Run At System Startup (Ubuntu)

Problem:

  • sshd does not appear to start on system boot, but runs fine when started from a terminal with /etc/init.d/ssh start

Update Dec 2010: Thanks to Jeremie here. Change the following in /etc/init.d./ssh to stop sshd starting before the network is ready:

Change:

# Required-Start:       $remote_fs $syslog 

to:

# Required-Start:       $remote_fs $syslog $network

Merci Jeremie!

Cause and Solution:

  • A ListenServer directive in /etc/ssh/sshd_config is making sshd attempt to listen on a not-yet extant address. Change the directive to ListenServer 0.0.0.0

(NB: if you don’t have an /etc/init.d/ssh, you can get one from here)

I had a problem with a machine I am using as a samba fileserver. It would seem that the sshd process was not running at startup, so I would have to log into Gnome and run /etc/init.d/ssh start manually, which was a pain in the arse.

A quick search turned nothing up, except “make sure openssh-server is installed”, which in my case it was. I was about to post to the Ubuntu forums, but first I had a quick look at the syslog (which sshd prints to), where I saw entries like the following:


Jun 27 13:18:56 hermes init: ssh main process (802) terminated with status 255
Jun 27 13:18:56 hermes init: ssh main process ended, respawning
Jun 27 13:18:56 hermes init: ssh main process (806) terminated with status 255
Jun 27 13:18:56 hermes init: ssh main process ended, respawning
Jun 27 13:18:56 hermes init: ssh main process (810) terminated with status 255
Jun 27 13:18:56 hermes init: ssh main process ended, respawning
Jun 27 13:18:56 hermes init: ssh main process (814) terminated with status 255
Jun 27 13:18:56 hermes init: ssh main process ended, respawning
Jun 27 13:18:56 hermes init: ssh main process (818) terminated with status 255
Jun 27 13:18:56 hermes init: ssh main process ended, respawning
Jun 27 13:18:56 hermes init: ssh main process (822) terminated with status 255
Jun 27 13:18:56 hermes init: ssh main process ended, respawning
Jun 27 13:18:56 hermes init: ssh main process (826) terminated with status 255
Jun 27 13:18:56 hermes init: ssh respawning too fast, stopped

My thinking is that sshd was trying to start up before the network interfaces were configured, which was causing it to fail as it had a ListenAddress directive in /etc/ssh/sshd_config.

Commenting out the specific ListenAddress directive and adding ListenAddress 0.0.0.0 to let sshd listen on any address solved the problem. The fileserver has only 1 IP address anyway.

My Short APB Review

(Note: I also posted this over on Slashdot on the story about the fact that APB is to use in-game advertisements)

Having played the beta, my short review of APB is: “drive here, shoot stuff, repeat”. Oops! Seems like I broke the embargo on reviews which was initially set at 10 freakin’ days after release! To their credit (I guess), they rolled that back to merely release day.

A more nuanced look at the game shows they have in fact done some things quite nicely. The “All Points Bulletin” mechanic works very nicely. You’ll be doing a mission when up pops up a notification that a comparable group from the opposing faction has been sent to stop you. It changes the dynamic of the mission and gives you a jolt of adrenaline as you listen out for the roar of the car engine signifying your would-be assassins drawing close. However, these adversarial matchups aren’t without their problems. Say 50% of the time they work and you get a comparable strength team sent against you, resulting in a pitched battle that culminates in either narrow victory or defeat. Perfect! Well, the other 50% of the time you get a team that is woefully underpowered, say one wee neophyte against our group of four. Or massively overpowered, so you “call for backup”, which works maybe 10% of the time. Perhaps the opposition are a full map away and have no way of intercepting you in time. Or they are already at the objective and virtually impossible to budge. The latter gets irritating as there are a few excellent camping spots should you get a VIP ‘escort’ mission. Oh, and I lied about the proportions. Things go right about 25% of the time rather than 50%.

Despite these problems, the gameplay is fun if you have a good group that you are in touch with through some kind of voice comms. The problem is that there is very little variety. Perhaps I’ve been spoiled by Saints Row 2 in this regard, but there seem to be about 3 basic types of mission which leads to the game getting boring quickly – pitched battles or not.

There is also a HUGE amount of customisation, if you’re into that sort of thing. I won’t say more about this as I’m not buying a game to play dress up…

…Which brings me to my next point: pricing. Pinning down the pricing details wasn’t easy, although I did eventually find it on Kotaku or similar. I’ll quote from RPS again:

You can purchase a retail version of APB either in-store or via digital download at standard retail price (SRP $49.99/£34.99/€49.99). The game includes 50 hours of action game play out of the box plus unlimited time in APB’s social districts customising, socialising and trading on the marketplace.

Once your game time is up, you have flexibility to top up your action game time from as little as $6.99 (£5.59, €6.29) for an additional 20 hours, while more frequent players can switch to a 30-day unlimited package for only $9.99 (£7.99, €8.99) with discounts available for 90 and 180 days.

The retail package also contains a bonus 100 RTW points towards your next purchases.

An additional benefit to this evolutionary model is the ability for you to convert your own customisations and rewards to tradable products to give to friends or clan-mates or to place on the Marketplace to earn more RTW points (convertible to game time) or in-game cash. Check back later for more details

The problem is, you are paying full retail price plus a decent fraction of 10 of your local denomination (£/$/€) monthly, for what? Progression seems limited – you can gain prestige with local NPC types to do more missions, but your character doesn’t seem to get much stronger as with more traditional MMOs. It’s not even like EVE where you can claim a small section of the virtual world for your particular gang. Frankly, I’m not sure it is worth paying for a glorified matchmaking service, but that is a judgment call each individual gamer needs to make.

Lastly, technical issues. I left them till last as I don’t like bringing them up for a pre-release version of code, but they need to be mentioned. I experienced frequent crashes, something which seemed to affect a small percentage of users, mostly running 64-bit Windows 7. A redownload of the full 7 GB and reinstall *seemed* to fix it, although I did not have enough time to check this fully. I did experience some graphical slowdowns as well, even on minimal settings running on a PC well above recommended spec. Perhaps this was because optimisations had not yet been applied, again due to it being pre-release.

Lag was also an issue, which I mention in a separate paragraph as APB is a shooter after all. However, there were only 2 european servers up during the beta (EU1 and EU2, natch) and so this may not be a problem if they deploy servers widely. Except if you’re in Australia, it would seem. Sorry, mates!

In short, the game is quite fun in the short term, but I question its longevity and value. I won’t be getting it, but you might.

Extract A Single Image From A Video Using FFMPEG

Dead handy, this:

ffmpeg -ss 0.5 -i inputfile.mp4 -t 1 -s 480x300 -f image2 imagefile.jpg

The various options:

  • -t 1: limit to 1 frame extracted
  • -ss 0.5: point of movie to extract from (ie seek to 0.5 seconds)
  • -s 480x300: frame size of image to output (image resized to fit dimensions)
  • -f image2: forces format

I use this to generate preview stills for jwplayer to use. Dead handy!

Edit: Thanks to reader DieBagger who pointed out it is much faster to place the seek argument before the input file.