Jul
27
2009
0

Hey Hey 64k

OMG, a sequel!

YouTube Preview Image
Written by Kaluriel in: General, Programming | Tags:
Jul
27
2009
0

Hey Hey 16k

I had nearly forgotten about this song and video, only just got reminded about it when I started to hum it to myself.

16k for a letter, that is 64×64 for a 4 component texture. Given that they are usually luminance alpha, I reckon its more likely to be 64×128, given a font texture of 1024×2048.

That is one high resolution font pack. Clive Sinclair would be rolling in his grave…

YouTube Preview Image

Just completed Red Faction: Guerilla on Saturday. I’m quite disappointed by the guerilla part of it (its worse than accidentally picking someone up in Prototype), however the destruction is fun :).

Written by Kaluriel in: General, Programming | Tags: , ,
Jul
18
2009
0

London Comic-Con 2009

Jewel Staite AutographI only found out that there was going to be a Comic-Con on in London on Friday afternoon, and when I found out Jewel Staite was going to be there, I was set in mind to go.

There were some people I wanted to meet: Jewel Staite (Stargate Atlantis, Firefly), Eva Myles (Torchwood), Danny Trejo (what hasn’t he been in), Michael Ironside (Starship Troopers), Michael Shanks (Stargate SG1), Tom Baker (Dr. Who), Scott Bakula (Quantum Leap), and Sean McGuire (Off Center).

Unfortunately, Eva Myles was only there on the Sunday so I didn’t see her… or the pillow fight :(. To the left however is now my pride and joy of that day when I got to meet Jewel Staite and she signed a picture for me.

The Comic-Con Weapon ShopJust like in any SquareEnix RPG, there was a weapon shop setup at Comic-Con, selling replicas of well known anime and game weapons, as well as clothing.

It was a tough choice between getting the Master Sword and Tensa Zangetsu, but Zangetsu won since the Master Sword didn’t look as great as it could have been.

I suppose it might have just been banged up a little from being a display model for so long. I’d imagine there will be another chance to get it in the Anime Convention in November.

Stargate JaffaAfter wandering around a bit looking at what was there me and my friend Glyn went over to the main guest area to see who we could see.

This is where I got my first picture taken with a guy dressed like a Jaffa from Stargate.

Michael Ironside was amazing, he was standing up, talking for a bit with people, poses for pictures.  generally nice bloke who didn’t seem to want to be rushing things along. Not only that but he was doing this from the morning til late afternoon (apart from his lunch break).

The DoctorsNear the second stage, we came across a group dressed as the Doctor from Doctor Who, my favourite of which was the girl dressed like Tom Baker.

Looking back if I hadn’t spent all my money on the Saturday, I would have loved to gone back on the Sunday dressed up as well.

Jul
05
2009
0

C# – Mono on Mac OS X

Mono Project LogoI’m always up for trying new ways of not having to boot up VMWare Fusion, and when searching for C# code, I came by a blog about something using Mono. Mono is a cross platform solution for using .NET and it is open source, which means I can write, compile and execute C# in MacOSX.

I found its strangely easy to setup, though I have yet to get WinForms to work from the examples, I have got console apps working. And with the console app, I have been able to use XPath.

The only downside was it took an hour to download from their website, which is quite bad for only 50MB.

Written by Kaluriel in: Code | Tags: , , , ,
Jul
04
2009
0

C# – XPath and Converting a Relative Path to Absolute

Star Ocean - The Last HopeToday whilst doing some C# programming, I came by a path within a file that was relative to the path I was reading it from. Since my application wasn’t in the same place, and I didn’t want it to be be for it to be, I needed to convert it to an absolute path.

This is C#, it should be simple right?

Well apparently System.IO.Path.Combine() doesn’t take into account “./” or “../” and just concatenates and added an additional forward slash if needed.

After a bit of searching, and many different examples (most of which just converted absolute to relative), I found what I needed. This method used System.IO.Path.GetFullPath() with System.IO.Path.Combine() (If I used the relative path on its own with GetFullPath() I just got the relative path from the current executable directory).

I made it into a single function I can call but I was surprised that there wasn’t something already to do this considering what C# has impressed me with so far for thinking ahead.

//
//
using System.IO;

//
//
static string GetAbsoluteFromRelative( string inBasePath, string inRelativePath )
{
return Path.GetFullPath( Path.Combine( inBasePath, inRelativePath ) );
}

It hasn’t tainted my image of C# though, I still adore it for its XML XPath node iterator library thing that has MySQL searching features.

I also found a spiffy thing I didn’t know about XPath as well. If I have a set of data like so.

<FileList>

<Folder>

<File>MyFile</File>

</Folder>

<File>MyOtherFile</File>

</FileList>

I can iterate through all file nodes within file list with a double-slash before “File” within my node select call.

XPathNavigator nav;

// ...

XPathNodeIterator fileNodes = nav.Select("/FileList//File");

while( fileNodes.MoveNext() )
{
Console.WriteLine( fileNodes.Current.Value );
}

I still seem to have problems with namespaces in some XML documents though (ones without them seem to make searching a hassle).

Written by Kaluriel in: Code | Tags: , ,
Jul
01
2009
0

Athena: Wiimote and Mac OS X

Wiimote USB DrivesSince solving the problem of the rumbling on the XBox 360 pad, I’ve grown bored of it, and decided to branch out trying to get more controllers working in my engine.

So a few days ago I started with the Wiimote, I had planned to try to the PS3 controller but I didn’t have one, so borrowing one of my housemates Wiimotes I set to work.

There is quite a lot of documentation on the Wiimote at the moment, whether it is the correct way to do things is questionable, since there are cases like “1? – it is set to 1 by the Wii” and “set this to 0×55 at memory address X and set to 0×00 at memory address Y to enable it”.

I started with website called The Wiimote Project, but as their documentation grew scarce I found a better site (which it seemed to copy it all from anyways) called WiiBrew. The WiiBrew wiki is quite comprehensive and within a few minutes I already had the LEDs flashing.

I won’t go into a lot of detail, I’ll just show the basics that I’ve got to grips with from the documentation on WiiBrew – LEDs + Motor, Buttons, and Battery.

Connecting the Wiimote

Connecting the Wiimote to a Mac is far simpler than it is for XBox 360, for a start its a Bluetooth device that operates using the normal protocols and it doesn’t require a key to activate. To connect, first turn on Bluetooth on your Mac, and then select “Set up Bluetooth Device…“.

Follow on the onscreen instructions, and when it gets to the point where it is searching for nearby Bluetooth devices, press 1 + 2 to soft synchronize if the Wiimote isn’t bound to another device, or the sync button to hard synchronize (unbinds the Wiimote from anything it remembers).

When it appears, select it and click the “Passkey Options…” button. Select the “Do not use a passkey with this device” option and then OK. Continue on and the device will be setup and connected. You can’t actually tell since the LEDs are still blinking, but if you have done it correctly, the Bluetooth icon should be different, or the menu will have a disconnect option for the device just setup.

Written by Kaluriel in: Athena, Code, Tutorials | Tags: , , , , , , , ,

Pages: 1 2 3 4


Theme: TheBuckmaker.com Blog Themes | The best Webhosting Plans, Eigenes Internet Radio