talideon.com

Blackout Ireland

Entries for June 2008

June 4, 2008 at 7:25PM Old ideas: my DroidWars VM

Years and years ago, I started work on a game I called “DroidWars”. It was based on some misunderstood third-hand information I got about Core Wars, and rather than having program battle each other directly, each of the programs controlled a robot in a 2D virtual world.

It was written in BBC BASIC V, about the only BASIC dialect I’ve used that wasn’t braindead. I hadn’t got around to learning ARM assembly language just yet, though I did have a smattering from reading other people’s code, and didn’t have a C compiler that would run on my, at the time 1MB but later upgraded to a whopping 4MB, A3010, so the thing crawled like you wouldn’t believe. Oh, if I’d only had a copy of the awesome StrongHelp sooner...

I got a reasonable amount of it done. The arena visualisation worked but was incredibly simplistic looking, and I developed a simple VM for the robots to have their code run in.

The reasons for the VM were twofold: I wanted the robots to be isolated from each other, and I wanted them isolated from my code. Aside from practicalities of namespace collisions, I wanted to make sure that competing robots couldn’t reach into the game code or the code of another robot and interfere with it.

The project was abandoned when I got bogged down writing a compiler for the high-level DroidCode language. To imagine what it looked like, imagine the primitive bastard child of BBC BASIC, Logo, and Lua. It never got very far because I didn’t understand very much at the time about the subtleties of lexing, parsing or anything compiler-related. Oh, the naivety.

The one part I did get done was the VM. It had one nifty idea I thought I’d share. I can’t remember any specifics of the VM’s workings, mind, so don’t bother asking. If I manage to dig up the code for it from the floppy it was on and if entropy hasn’t got it yet, I might post up more details.

The VM was a kind of a hybrid of a stack machine and a register machine. The stack started at the bottom of memory and grew upwards, and all the registers except the stack register itself, including the program counter were mapped directly onto the stack. If this was implemented in silicon, the processor would probably have a small amount of on-board RAM that would shadow the top of the stack for fast access.

The layout of the stack, if I remember correctly, was as follows. The top-most element was a 32-bit process counter similar the ARM’s R15. It consisted of a number of flags, the counter itself, and the size of the current stack record. A subroutine jump consisted of pushing a new stack record containing the arguments and a new PC onto the top of the stack, and returning was a matter of removing the topmost record. I vaguely remember that the instruction to do this came in two forms, one of which preserved the current PC’s flags and one of which ignored the current PC’s flags.

After the PC came the other registers. There were fifteen, if I recall, including the PC. R1 was the topmost, continuing onto R14, the bottommost. R15 was the stack register, and, as mentioned previously, was an on-board register.

Because each stack frame was variable sized, this meant that it was possible for a routine to see its calling routine as the registers of the calling and called routines overlapped.

I’m not sure if there’s any other machines, real or virtual, that use a similar design, but I thought it was interesting enough to share, and it might have some virtues over conventional register architectures and stack architectures, but I think I’ll leave that to people more knowledgeable than myself.

June 5, 2008 at 12:05AM Ordering electronics in Ireland makes me want to cry

This is me:

A photo of me

And I’d like to buy one of these:

MSI Titan 700

I waited weeks in anticipation for its release, and when it came out, I went here:

Play.com

I didn’t go here:

Amazon.co.uk

Because apparently Irish money isn’t good enough for them.

So there’s me, ordering the nice shiny machine when I run into this:

Electronic or gadget items can only be delivered to UK addresses.

Right.

But I have friends in Northern Ireland, so I figure I’ll ask Grannymar if she minds taking a delivery for me. We had a nice friendly chat and she said she’d be happy to help me.

So I head back and enter her address as the delivery address, and lo-and-behold, I get this:

Electronic or gadget items valued at GBP50 or over must be delivered to your credit/debit card billing address, which must be in the UK.

Well, that’s no good to me, is it. It seems Irish money’s no good to them either.

With that shot down, I went back to finding another possible seller. I was left with three: PC World Business (spit!), LinITX.com, and LambdaTek. It wasn’t entirely obvious if LambdaTek would ship to Ireland, so I discarded them. That left PC World Business and LinITX.

I tried PCWB first, but hit two snags. First, Maestro/Switch is listed as one of the cards they’ll take, but not Laser. My Visa card hasn’t arrived yet, so as this is their Irish site, my assumption is that as a Laser card is also meant to be a Maestro card, my Laser card would be acceptable.

But further down is another hiccough.

The want a VAT number, and it’s compulsory. However, it’s not necessary for a business in Ireland to register for VAT unless their turnover is over EUR35,000, this shouldn’t be a required field, but it is. So, what do I do? Not much, it seems. Sorry PCWB, you suck.

So that leaves me with LinITX.com, who will, it appears, ship to Ireland. However, it’s unlikely they’ll accept a Laser card as a Maestro card, so I’m left waiting for AIB to get off their arses and send me out the card I ordered from them a fortnight ago.

Sigh.

June 9, 2008 at 8:03AM Snowblindness

...or why it’s sometimes a good idea to just completely walk away.

I’ve been working on something here at work that really, really ought to have been done a good long time back. But between this and that, being pulled hither and thither, and having lots of other stuff to do at the same time, I could never get this particular task finished.

The thing is, the task itself is important, very important. However, because it’s so important, it became impossible to do even the slightest things on it without screwing it up. I was snowblind.

So this weekend, rather than going anywhere near a computer, I did the very opposite: aside from starting an update on my laptop, I left computers and computer programming completely and did something completely different.

The gig itself was yesterday in Electric Avenue in Waterford, and it was awesome. Seeing as it was on pretty late, and I’m working today, I didn’t bother sleeping and just rode the bus back to Carlow.

Sure, I’m tired, but my head was clear. I started back on the project and it was immediately clear what the problem was, and it was so terribly simple to fix.

And that’s the thing about snowblindness: sometimes it’s good idea to just completely walk away.

June 12, 2008 at 12:01PM Isaac Browser IV improvements

I was bored on the bus, so I wrote up a list of possible improvements to IB4 (download here). There’s a fair bit of stuff, and I haven’t decided what order to attack it in. Here’s what I came up with:

Better descriptions

Image descriptions to complement the directory descriptions, and a method of specifying directory descriptions that’s better than the current one.

Along with the images descriptions would be proper titles: while the filename is fine in many circumstances, sometimes you want something better.

Tagging

Complementing the images descriptions would be tags. A non-hierarchical tag view would complement the hierarchical directory view pretty well. Here’s my ideas on how it’d work:

Refactored handlers

The code for handling the various views is all a bit of a mess. Instead, it would be broken up into handler functions:

Handlers would be selected based on the presence of a particular query string parameter, and would take the following as arguments:

I can probably come up with a better design that will encapsulate the request better than this, mind.

Aesthetics

It’s currently not too pretty, but I’ve ideas in my head on how to further improve the interface, part of which involves putting the view heading into the banner, moving the logo down to the footer, putting the navigation in its own horizontal strip, rendering the directory list and image list in a nicer manner, and a host of other thing.

Lossless thumbnails

Using JPEG files for thumbnails in all circumstances is hardly ideal. I think it might be better to experiment with using PNGs instead, especially seeing as they support transparency, which would be useful for the top and bottom borders, and far better than the current use of white there.

Online management

It would be nice to be able to create directories, upload images, and edit descriptions, tags, and the like without having to fiddle around on the server with files. Some kind of simple management interface would be essential, but the question of how that can be done in a secure manner remains and allowing that would remove some of the file-and-forget aspects of Isaac Browser.

A new name

IB4 might have started out as a fork of Isaac Browser III, but even in its current state, hardly any of the original code remains. Of course, it has to stay true to its lineage, so it would still record that it was derived from IB3, but the new name would make it obvious that it’s not the same piece of software. I’ve no good name for it yet, mind. My best so far is to call it Yeats Browser after fellow Sligoman and painter, Jack B. Yeats. Another name that came to mind was PictureBook, but that’s bound to be long gone. Pictoria might be ok, but it has the same problems as PictureBook. Answers on an IP packet to....

Update (June 17th): Pictoria it is! I was chatting with Paul, who uses it for his galleries, and I think I’ll adjust the plans to that it uses a plugin system in much the same fashion as Blosxom. That’ll mean it would be able to have a comment system without having to build it into the core. I also might be able to make some of the parts outlined above use the plugin system.

June 12, 2008 at 12:32PM Lisbon: I’ll be voting yes

‘nuff said.

Update: Done and dusted. Apparently the local turnout as of 18:30 was about 30%. Not particularly high.

June 13, 2008 at 4:54PM Lisbon rejected

Ah well, we know we’ll probably be voting on it again anyway.

i can haz anuther go?

Simon’s got a great analysis of why the treaty was voted down on Irish Election.

There’s a great comment on Donncha’s blog concerning voting either way for the treaty that I really think is completely spot-on and worth repeating (edited for punctuation and grammar):

But if you don’t understand either, then how can you justify a vote for either?

One of the no slogans that got to me was Ms. Sinnott saying you wouldn’t sign a contact without reading it. Well, I wouldn’t reject a contract without reading it either.

That said though, I totally agree with you on the lack of knowledge thing, if the result is no, then it’s totally down to the yes campaign’s poor ability to get the reasons for voting yes across.

If the EU believes the reforms are truly necessary, there’s a few things that can be done to salvage this mess:

  1. Get it across to people that the number of commissioners was already reduced in the Nice treaty and that all the Lisbon treaty did was state their method of selection.
  2. Break the treaty up into independent, self-contained fascicles that can be approved or rejected separately. Make sure these are clear and readable, and make sure no arguments about their incomprehensibility can be made, which means no diffs this time around.
  3. Make it clear that the EU presidency proposed in the treaty is not the same as the one currently in place. I know of people who misunderstood that the treaty was extending the current rotational EU presidency from six months to two-and-a-half years. Why would people see this as a bad thing? Because the next country up is France, and France have an awful habit, more than any other nation, of putting their desires above those of the rest of the union. It’s not: it’s scrapping the rotational system and replacing it with a elected official.
  4. Don’t be so bloody patronising.

Update: Reread the third point and cleared up the language. Oh, the irony...

June 16, 2008 at 2:08PM Project WTFU: Success!

My plan to use my laptop and MP3 collection as an alarm clock worked! It worked a little too well, mind: I ended up staying in bed listening to music rather than getting up straight away. [smile]

The first song to play was Ciaran Byrne’s “Where’s Miss 999”. I can only describe the experience of waking up to it as akin to being beaten to death with a cloud, but in a good way.

I’d like to stream it here, but I’m not sure of the legalities, so I’m just going to point to an earlier post of the video for Ode to Able Sail.

June 16, 2008 at 2:20PM Cheese

Sure, some people might describe it as just predigested coagulated mammory gland secretion that’s been left to sit around for a while, but I like to think of it as a block of pure awesomeness. Yum!

June 17, 2008 at 11:29PM Firefox 3 upgraded (properly)

Firefox 3.0 about box

There! Now, hopefully this won’t have the stability issues the release candidate Ubuntu made everybody on Hardy put up with until now had.

June 18, 2008 at 8:04PM Star Wars Gangsta Rap

Stumbled over by George. Genius! Wait for Yoda!

June 19, 2008 at 12:57PM Incorrectly automoderated comments

George noticed that the comment he posted to the last entry disappeared. I’d a look about and I think the problem might be that he didn’t provide a homepage. I took a poke around and it seemed there were about sixteen other comments over the past two years that have ended up in the spam archive table after being automoderated as spam.

I’ve pulled them out and added them to the moderated list so those posters shouldn’t end up being binned again. Still, I have to look into why they ended up where they did and if there’s any more of them in the spam archive.

All I have to say is I’m happy I never permanently delete my spam.

June 23, 2008 at 2:35PM Quick review: “Alone in the Dark” for the Wii

Oh, dear. I’d such high hopes for this. I’m not saying it’s a bad game; it’s not. But it falls far short of the game it could have been.

First of all, let’s start with the things I’m not too bothered about. Sure, the graphics aren’t exactly the best. I’d go so far as to say its looks to be only slightly more sophisticated than those used in PC games around about 2002. Far Cry this is not. One of the worst bits of graphics in it was the effluent animation when you’re down in the sewer, and I think they really could have put more effort into making the lipsync look more realistic. The textures used were much more flat and bland than they could have been.

The physics are good, but I get the feeling that they could have exploited the Havok engine so much more than they did, and in doing so make the canned sequences far less annoyingly repetitive. The best piece of physics in it is probably the rope swinging you have to do occasionally, which works brilliantly, even if the level design makes this annoyingly finnicky in places. The movement of the main character is, um, a bit odd in places, with him suddenly being displaced a half a foot so that he can climb something rather than having a fluid movement into position.

Which brings me on to the initial two episodes of the game. While I know that to a degree these were meant to act as trainers, in places it was far from obvious what to do. The most frustrating of these for me was one place where the player has to position a table to get out of a room with a partially collapsed floor. Maybe it’s that they were expecting it to be played on a TV with 4:3 ratio rather than 16:9, but I only managed to find the place where you can climb up by accident.

The save system is annoying because, well, it doesn’t really do much. You see, each episode is broken up into sections, each of which starts with a save point. However, you’re also able to save from the game menu, which doesn’t make it obvious where you’re saving your game from. I found this particularly annoying once I managed to get outside the burning building for first time. I was only getting used to the controls, and some of the physics puzzles in that section are tricky unless you’ve got the hang of them. It’s not nice being almost at the end of a section, then dying and being thrown back to the start again.

The controls are a mixed bag. For the most part, they work quite well, but fall down due to inconsistency. Getting into the inventory system is one of these. The gesture for opening it works well, but if you’re wielding the gun at the same time, you’re blocked from opening it and instead Edward will pop the clip to show you how many bullets you’ve left. Now, while I appreciate that this means that the game doesn’t require a distracting HUD, I’d gladly have accepted that in exchange for getting rid of the fiddliness of the controls. The on-screen hints compensate for a lot of the control system’s weaknesses, but they’re essentially deoderant, and their presence indicates that the developers got a bit lazy after they’d their initial ideas and just gave up on getting their execution right.

The acting’s quite good, but can get a bit irritating due to the positioning of some of the cut scenes. It tries to do the whole Half-Life thing by mixing some of the cutscenes into the gameplay, but annoyingly freezes the controls so you can’t do anything. This completely misses the point. Whoever had that dumb idea should be slapped about the head repeatedly.

In parts of the levels, there’s poorly designed barriers. One that sticks in my mind is the exit of the underground parking lot. The exit is open, but there’s flames everywhere, so you have to use an extinguisher to put them out. And that’s the problem: there’s an invisible barrier right at the exit and, in spite of having a fire extinguisher, you can’t go any further. If there was a door here, it would have been understandable, but this immediately broke my immersion in the game world. Again, the level designer deserves a slap.

The camera, oh the camera. Seriously, if you allow switching perspectives, it should be possible to do so everywhere, not just where it suits the level designer. There are parts of the game where the camera is locked and the player inexplicably is unable to change perspective. This did my head in.

The combat system, which takes a wee while to get used to initially, is great. It makes rather good use of the motion sensors in the Wii Remote and once you get used to locking on to a bad guy, it’s simple and natural.

The NPCs are annoyingly dumb. They stand around impassively doing nothing like manniquins and then suddenly spring to life. If they’d at least strode around like they were caught up in their own little world or interacted with the player a little, I might have actually cared about them, but I couldn’t. At best they tended to be annoying automatons. It’s bad when the zombies have more life in them than the humans!

The above-ground driving section was dumb. It was like something you’d have found in a game ten years ago. Maybe I’m spoiled by the GTA games, but if you’re going to do something like this, at least make it interesting. This would have been better as a cut scene or something.

One nice thing about its episodic structure is that the later sections are all there to play initially without having to first complete them. Of course, there’s a certain spoiler factor involved, but if you’re that impatient to play the very last section, that’s your choice.

But for all its flaws and annoyances, it’s still a good game, even if it falls short of how good it could have been. Maybe it’s because it was caught in development hell, maybe it’s because Atari/Infogrammes didn’t put enough time into proper playtesting or ignored what their playtesters were telling them, but it could’ve been so, so much better.

7/10, and but if they’d fixed the flaws I’ve noted above, it could easily have been a 9/10. I’ve yet to finish the game as I’ve only played it for seven hours or so, so I’m guessing there’s about fourteen or fifteen hours of gameplay in it, making it a wee bit short. The game gets better as it goes on, I must admit, so when I’m finished I’ll post up a short review of the rest of the game.

June 24, 2008 at 11:01PM Tenori-On Personal Demo

June 25, 2008 at 5:49PM I’ve been sucked into twitter!

I know I’m going to regret this! I’ve resisted it for ages, but I’ve finally given in and created a twitter account because somebody who’s a Blacknight customer was having some problems and I thought I could give a hand.

You can see my stream at http://twitter.com/talideon.

June 26, 2008 at 2:02AM Archive index pages no longer indexed

There! By having my blogging engine include this tiny piece of HTML markup into the head of all the monthly index pages, they should no longer be indexed by search engines, which means having nobody stumbling on them by accident:

<meta name="robots" content="noindex, follow"/>