System.BitConverter

I have been writing a layer around our DCOM interface of the last few days, and today I needed to convert a double to 8 byte stream.

Low and behold a new .Net 2.0 helper class System.BitConverter, very useful. I chose to use the DoubleToInt64Bits method so I could control the order the bytes are written, but if I had found this class earlier I might have used for all conversions. There is still time to refactor…

This class would have also been helpful when converting Pascal 6 byte real’s to IEEE 8 byte double’s for my Curse of the Azure Bonds port. My previous code used unsafe code to write into the double directly… Hmm can’t find the old code…. will have to dig it up and rewrite it.

New build of Windows Live Writer

I was going to write a post about how Windows Live Writer has been causing me grief when posting with pictures..

But I decided to check first and there is a newer version, released Today! I then noticed I’m running 1.0 build 109, and the previous release was 1.0.1 Build 6. So I was running old software… oops

So I’m getting Beta 2 now! Better post, so I can start using the new version

[Update:]

Five seconds of thought:

  • Well the installer is different, but I like it
  • The UI is so much nicer
  • I love the save draft onto site option (can now edit from home/work) till done
  • It retrieves the last version from the web when you edit an previously posted entry
  • I really like how the Insert menu items are now on the right hand side
  • Spelling check as you go. Using it already!
  • Add new Categories, very nice….

I’m not sure it’s right, but I’m feeling pumped about this new update. It’s another improvement on a tool that made blogging easier to begin with.

Just have to test with some pictures later….

LEGO Technic’s

Jacob want to build my Lego Technic crane (well he has wanted to for ages) in the weekend, so we built it together. I brought it to work today to show it off to Conor who has the 8448 Super Street Sensation car.

Just for the share fun of it I went to the Lego web site and they have a new crane.

So I went search for pictures of my crane to post, and found this fantastic Technics web site

So my 8460 model looks like

Lego Technic 8460
Lego Technic 8460

Where as the new model 8421 looks like this

Lego Technic 8421
Lego Technic 8421

It’s so shinny. So Phat!

The other vehicle that I got at the same time was the 8443 Log Loader

Lego Technic 8443
Lego Technic 8443

Another vehicle I’d love to get is the 8459, or some of the fantastic custom models from Lego Construction Site.

Underwater Hockey Results

2nd in the B grade. Quite pleased with this. The Nelson Sharks beat us in the round-robin and again in the finals. Our team was playing really well in our offensive game, with some superb linking. Unfortunately Nelson’s goalie was a Premier player, and we mortals just couldn’t get past him. Most goals Nelson scored against us were bombs from him. So it was quite frustrating really.

The other frustration was getting sin-binned twice for arm “infringements”. As a left handed player to steal the puck of a right handed player you have to put your arm over there’s, this leads to easy entanglement, of which people are inclined to enact when you’ve just taken the puck off them. So I lost my patients a few times and just moved an entangled person arm “away” from the play, and got called for it.

I’ve got lots of bruises, but I had a lot of fun. Really the team just played really well together, and I felt I was adding value, so had a blast (this is compared to playing Premier/A grade where I mainly “occupy space”)

Curse of the Azure Bonds update

Well I’ve been making some fantastic progress presently. I have been working of getting things working correctly.

Stuff that has improved:

  • Interaction with the script engine and the main program memory. I’ve written some quite cool reflection code to handle “missed” hard coded mapping’s. This is good because then the program keeps running, but I also get a log of mappings to hard code. The main reason for hard coding is to getting an understand for how the memory is accessed, when/why sort of stuff. This was a cause of quite a few errors, as the scripting was altering variables that the main engine was not seeing as changed.
  • Interaction with the menu systems. There were lots of transcoding mistakes, and things are work much better now.
  • The combat system is now working, compared to not at all. Lots still todo here, the biggest been getting the graphic’s to work when in combat. But progress is been made.
  • Fixed the AND/OR script code to not using the flip instruction, this also was causing pain.
  • Cracked some core graphic/UI naming, so large chucks of API/variables are starting to make sense. This is so pleasing when it happens.

I’ve also (at work at least) changed how I have the project (code) displayed. I’ve started using both monitors, with the original assembly on the right, which is fantastic when stepping through functions where the code looks odd, or copying large chunks of static data.

So all in all, the project is back on track, after being stalled for ages and I’m feeling really good about progress that is been made.

The one thing I’m putting off but needs to be done before it’s ready for “others” is rewrite the graphic subsystem to throw away the many pixel puffers, and compositing subsystems, and using a layered sprite API, ether DirectX (most likely) or OpenGL. But I’ll leave that till the current burst of effort starts to wane. Or the other way of putting it, I need to understand more of what is happening before I re-write it.

Updated: Just noticed someone was searching google for curse of azure bonds chr file, so if your wanting my current understanding (in C#) you might want ot read this

7 Days short of 1 Year….

Well as I was told almost a year ago, “you will forget your security badge one day” when going to get a coffee from the other building… and today was that day… I had been so proud of not having forgotten it (solved by me always wearing my badge on a lanyard), I had just assumed I was wearing it. I was shocked when I found I wasn’t.

On the plus side that means I’ve been here mostly 1 year! Time fly when your having fun.

Windows Update broke Google Desktop?

I used Google Desktop yesterday, all worked fine.

This morning I installed the two windows updates: Update for Windows XP (KB927891) and SQL Server 2005 Books Online (February 2007)

Now Google Desktop just will not run….

There is a chance the IS guys altered my machine during the reboot cycle…. but why now, and why not an email asking us to stop running the program? I’ve now paid my IS tax, and acknowledged the the IS guys could if the wanted to, in fact they can do anything, but today it was not them that have broken/blocked Google Desktop.

So now it comes down to did MS break it on purpose, or was G Desktop doing something “dodgy”

Update: Thanks to Hemil’s advice I downloaded that latest setup, and now it works. The part of the puzzle the confused me yesterday was the file version on GoogleDestop.exe was 5.1.705.4505, which is the version of the latest setup.

So this is the versions of the exe’s in my Program Files\Google\Google Desktop Search

File

Before

After

GoggleDesktop.exe

5.1.705.4505

5.1.705.4505

GoggleDesktopSetup.exe

4.2006.825.1629

5.1.705.4505

GoggleDesktopCrawl.exe

not there

4.2006.825.1629

GoggleDesktopIndex.exe

4.2006.825.1629

not there

I didn’t think to check the .dll versions… anyway it’s working now.

Streaming Video to the Wii

As the Wii is the computer in the living room, I want to stream video to it. The current solution I have found (but not tested yet, download currently) is TVersity. I very keen on it working out. Will post more once I tested it.

One week later…

I got it working that evening, then broke it, then re-installed it all, and got it working again the next morning. Using the doc’s on-line were good to follow. Things went wrong when I tried to improve the quality of the stream. The default transcoding resolution is 400x300, which is kind of limited, compared to TV screen spec’s. But as soon as I started tweaking the settings, things stopped working. Not sure if flash video has a max frame size or if the Wii (via Opera) can only handle default settings.

Also the only test “file” I have has two audio track, with the primary been french (thanks Martin), and using the default AVI codec in installed by DivX Player has no run-time options. I installed the Matroska Splitter codec pack, and it’s AVI codec has better support. So now the file plays my chosen language at later showings.

Entering the URL on the Wii was a pain until I got it working, and then I could save it as a favorite. On the Wii you need to use this URL http://tversity_host:41952/flashlib or you get memory problems.

I do have one HDTV file that cannot be played, so I’m not sure what the problem is there.

Next things to experiment with (later) are:

  1. Pre-transcoded files, and the supported resolutions/frame rates, these can handle.
  2. Getting the HDTV file to transcode/play.
  3. Get faster computer (transcoding)/XBox360/Media Center PC

Oh the other really odd thing about TVersity is the UI is done in Flash, so you have a installed windows app but with odd widgets, and no right click. Very strange!

Underwater Hockey: South Islands on this Saturday

Updated: The schedule changed.

This Saturday (26 May 2007) I’m playing in the South Island Champs. I’m in the B grade team this year. This is a change from playing A grade for the last few years. This is not due to me getting worse, but the number of good players in our club has grown substantially, so now I get to be a big fish is a little pool, verse the little fish in a big pool. Yippie!

The current schedule is

Time

White

Black

Court

10:15am

Bravehearts

Killer B’s

2

12:45pm

B 52’s

Killer B’s

2

2:25pm

Killer B’s

Plan B’s

2

3:15pm

Sharks

Killer B’s

1

4:30pm

Killer B’s

Southern Belles

1

So I’m really excited about the competition, the only problem is underwater hockey has to be one of the worse spectator sports around.

Paul Stovell’s Fantastic Binding Oriented Programming Example

Paul Stovell has one of the best examples I’ve seen on how to-do Binding Oriented Programming (BOP). I’ll be honest, I’ve not seen many, in fact I’ve been keeping my eyes open looking for a better way, than the classic VB6.0 do it in the form, that the Visual Designer encourages so much. In fact in the only larger that one day’s work .Net app I’ve worked on was Visually Designed. It felt wrong, but I wasn’t in the position to say how it should be done better.

So I’ve understood the merits of MVP/MVC, but never seen a simple how to. I’ve always felt overwhelmed by the here are our 60 Models, and here are our 60 Views, and our 60 Controllers. But Paul’s simple example shows for one case how to binding it all up, why to segment it, and I had that “Ah ha!” moment.

So now I’m really happy! I’ve got it printed out, and hanging on my wall. Cheers Paul.