I was just reading about this great class designed to aid program debugging. The idea is that you insert these as you code, and then they significantly cut debugging time, but the great thing is that this code is only compiled into the Assembly (the EXE) when you are in debug mode. Once you compile to release the compiler strips all this code out. So that makes this great for seeing what your code is doing and running extra validation to catch bugs before they happen, but without adding any overhead to your final code.

Imports System.Diagnostics

Debug.WriteLineThis will help you keep track of what your code is doing at the time of an error by displaying a custom message on the Immediate window (from the menu strip at the top Debug > Window > Immediate). So for example before you access a file you could write:

debug.writeline("Starting data access")

Or before you run a validation algorithm:

debug.writeline("Starting validation")

Debug.AssertThis one is great because it allows you to do validation purely while debugging. So say a passed variable should contain something, then you could use:

Debug.Assert(passedVal <> "") 'passedVal is not equal to nothing

The program will only get past this point if this line of code between the brackets is true. And you can also add helpful text that will appear on an error screen when the result from the code is false. So say you where going to do some integer maths from a function that deals with floating point calculations.

Debug.Assert(passedVal >= 0, "Number is less than 0 and so can't be used in integer maths")

When a Debug.Assert is triggered because the code inside it isn't True then an error window is displayed with the error message (if you have typed one that is) and pressing Retry will highlight the Debug.Assert that caused the error so you can fix your code.

Tuesday, June 28, 2005

Monday, June 27, 2005

If you are viewing this blog in a web browser then you will have noticed a huge gap between the post title and the post text (see pic for archives sake). This is Blogger's fault. I just hope they fix it soon because it is getting annoying.

p.s. Blogger now has a built in image host. They will host images upto 300MB per blog. That makes me wonder wither I should keep using Imageshack or start using a combination of both because I would fill that quicker than I would like to.

Sunday, June 26, 2005

I would like to start this by saying that I didn't like the Area 51 Demo. It consisted of two bad levels, one a fake moonlanding and the other a vertical level for setting-up a communication link to a commander on the surface. Both where bad choices for the demo because in both you are attacked from above and below, making it very difficult to find where you are being attacked from. Then there is the limited FOV (Field Of View) that after putting together this FOV screenshot (see below) from UT2004 (which allows you to change the FOV in the player options) leads me to believe that the FOV in Area 51 is a mear eighty degrees. This annoyed me because it gives almost no peripheral vision and in those two demo levels you are attacked from all sides, so the limited FOV just adds to the awkwardness of the demo.I only decided to play through the full game because a lot of reviewers had positive comments about it from playing the console version, and I am not one that is afraid of being proven wrong. I was right about the demo, but the demo is no reflection on the full game.

Area 51 has the voice talents of David Duchovny (Fox Mulder in The X-Files) who plays you (or your character's voice at least), Marilyn Manson (Rockstar) who plays an Alien named Edgar that is trying to help you and Powers Boothe (Senator Roark in Sin City) who plays your commander on the surface. The game benefits greatly from the excellent voice acting. David does short monologue entries at the start of each stage of the game and these paint a dark an sinister scene, that frankly the gameplay lacks, but the monologues are shout and done well.

You play Ethan Cole (voiced by Mr Duchovny) who is the science guy in a squad of four who get sent into hazardous combat zones. And in this mission the squad is sent to Area 51 after somekind of virus escapes from a lab and starts infecting the scientists.

I wouldn't say the plot was deep, but for a FPS it is more than what we as gamers are usually privy to. My only concern is that a lot of the plot points aren't developed. So for example at one point Ethan injects some of Edgar's Alien blood in his body and this is then forgotten despite Edgar's warnings of the consequences. I was expecting something to change in the game or for this to be backreferenced, but Edgar is never heard from again after that, so the whole sequence is unrewarding.

Gameplay wise Area 51 is just your usual run and gun affair. There are two types of grenades, a pistol, shotgun, semi-automatic, sniper-rifle, an alien weapon that charges itself so doesn't need ammo pickups and another alien weapon that can clear large areas. There is also a mutated form that you can morph in that increases your speed, gives you a strong melee attack and a yellow virus blast attack. That sounds like a lot, but it isn't because each weapon is only useful in one given situation and there aren't many enemies either, but the selection is varied and so are the levels, so the gameplay doesn't get dull at any stage during the game.

Being a scientist you have a scanner that you can use to scan alien bodies and other objects throughout the game. In each section of the game there are five special items that when scanned will unlock an item description on the games menu screen. This then allows you to read more about the item that you scanned. By unlocking these descriptions you then unlock video diaries for Dr Cray and the leader of the Illuminati.

I setout to hate this game because the demo was so bad, but I ended up likeing it. Not because of anything in particular, but it has an easy going nature about itself, the presentation isn't taken too seriously and since Area 51 is a multiplatform title that is understandable because it isn't the nicest looking title out. The game however makes up for all this with textbook FPS gameplay, varied environments and small rewards that make give the player a desire to see how the plot plays out and what secrets are locked away in the deepest levels of Area 51.

Thursday, June 23, 2005

The XBox360 has twenty Seven launch titles and I have had a look at them all for your convenience, but the launch list is OK, not great, but then it is the longterm game portfolio that counts and that is why I think the Revolution will not do so well.

Alan WakeAbout a writer, looks like a survival horror, but is described as a psychological action thriller.

Burnout: RevengeThe next gen followup to the current king of the XBoxLive racing games.

Call Of Duty 2As if nobody was sick of them a year ago, yet another WW2 FPS.

Frame City KillerFree roaming action game like GTA, set in the future where you play an assassin named Crow.

Gears Of WarThird person Survival horror shooter, a cross-genre title, but the game looks sweet. Set on a distant Human colony where aliens have emerged from underground to kill the conalists, you have to stay in the light and kill to survive.

The OutfitThird person shooter set in WW2, now that's something different.

Perfect Dark ZeroFPS made by Rare, and if that isn't enough to get you to buy it then don't bother.

Peter Jackson's King KongAction game about the big ape, but everything I have hared from people who have seen this running behind closed doors has been screamed. There is apparently no HUD display and you play as one of the human guys and the big ape himself.

To sum it all up:Three racing games.Two survival horror games, one with zombies and the other withoutTwo WW2 games (WTF)One beat em upOne possible point and click adventure titleThree third person shootersFour EA castoffsFour MMO games, one RPG, one first person shooter and the other racingZero singleplayer RPGsZero strategy gamesOne GTA clownOne game by Mr BThree games based on old movie franchisesOne game that will be said to be a kiddie gameTwo first person shootersTen third person shooter

I think the most surprising thing on that list apart from the fact that the industry is still churning out WW2 games, is that there are three MMO titles there.

This because it creates a legal cold war. Some companies just patent stuff so they can sue bigger companies and their competitors for damages. And this stifles innovation because it makes it impossible to compete alongside competitors.

They sue you for your websites one-click shopping cart, then you counter-sue them for the interface they used on their site. They sue you for a javascript for some scrolling text then you patent a unique button design used on their site just so you can sue them back again.

In the cold war this kind of buildup of arms or in this case patents ready for legal engagement, was called MAD (Mutual Assured Destruction) and this is wrong.

I was looking at the Dr Who website when I seen This news story titled Series Three!.

Now assuming they meaning of the newly stiled Dr Who, this should be talking about series 29 because we have just seen the first series of the new reimaged Dr Who which was series 27.

It goes on to say the Ciybermen Will be back (YAY) and that Billie will have a more central role in series 28, but she leaves in the next series so expect her to save the world by dieing in some last symbolic gesture of free will.

Expect series 28 in March, according to that page anyway, but the real series three was shown in 1965.

Tuesday, June 21, 2005

I thought I would have a go with a split keyboard for a change because when I do a lot of coding I sometimes get a pain in the tendons down my arms. I found one for only £14.04 or you can get it with the Microsoft mouse I have for £18.74.

At the mo the keyboard has slowed my typing and honestly my wrists don't feel right typing with it because they are at a sight angle, but I will let you know how it goes.

It has been another hot day and I keep looking at the temperature of my GeForce6, after spending the last half an hour on FreeCell it is still reading 62C. Where as the system temperature is doing great at just below 40C.

I had a go at learning how to play FreeCell, and it isn't as easy as Spider Solitaire.

And yesterday I started watching an Anime called Great Teacher Onizuka and it isn't the nicest looking Anime, but it got a 9.3 on AnimeNfo which is the IMDB of Animes. So I gave it a go and I am only on the second episode, but it is growing on my faster than a drunken whore. It is about an ex-bike-gang-leader who wants to become a teacher. His only motive is that being a teacher he can look at cute girls all day, but he only knows how to fight, so a lot of his classroom methods are very unorthodox.

Monday, June 20, 2005

It is too hot to go bed, too hot to get frustrated coding (not finding what I want in the class library), I can't run any 3D games because my GeForce6 would explode, being a Sunday there is no news and I don't want to start reading another chapter of Building Applications and Components with Visual Basic.NET until tomorrow. So as a last resort I learned to play Spider Solitaire.

It should be underStart -> Games -> Spider Solitaire

You have to create a matching set of the same suit to remove it from the row and after you have removed eight rows you win the game. The only real challenge is having a good spread of cards on the table, but after a few attempts on easy I won my first game tonight.

Some products like films get hyped in hope that many people will go and see the film, but sometimes this marketing has an interesting effect in that it will effect people's opinions after seeing the film.My point is that sometimes the hype around a product can influence people's opinions on that product. So even if the product itself is crap, people still believe that it is good. They might even tell other people that it is good, when in actual fact they do not enjoy the product at all, maybe instead the feeling that owning that product gives them is good, but this wouldn't be so if it wasn't for the marketing.

This makes me wonder wither I really did enjoy the new Dr Who series or wither it is the collective marketing that is making me want to think I enjoyed it.

Microsoft has a Benchmark Document studying the performance difference between an online shop built on VB6-ASP and VB.Net-ASP. The document's conclusion reads:

The benchmark demonstrates that the Nile application implemented using Microsoft ASP.NET running on Windows Server 2003 outperforms the same application implemented using Visual Basic 6.0 and COM+ by 584 percent on an 8-CPU system running on Windows 2000 and 716 percent over NT 4.0. In all tested scenarios, it is demonstrated that a customer can obtain significant value if Windows Server 2003 platform is adopted in the customer’s enterprise.

The differences are staggering, but I have also heard that PHP gets a performance boost when compiled as a .Net language too. So anybody running an online shop should take note.

Major Nelson (an XBox Live programmer) is running a Faceplat Contest on His Blog to win one of the limited edition E3 faceplates that where given to everybody who attended the E3 Microsoft conference.

To win you have to design a custom faceplate, but if you are one of thoes people who aren't convinced by the faceplate feature yet, you will be after taking a look at the many exceptional entries on the Contest Slide Show.

A couple of gamer movies have caught my eye. Party because two of them are in the top ten most downloaded files on FilePlanet, but after going through thoes and a few other, I present what I believe to be the better ones.

Counter Strike - Live ActionI have seen movies before that have tried to do live action counter strike, but this the most game like and shows some of the game's quirky features.

Thursday, June 16, 2005

On Tuesday I had a few drinks with a good friend whose family comes from a Malaysian background, and he was saying that his Mum doesn't like the work ethic in this country because people are too lazy. She means that people don't give 100% all the time, and I have to agree because in the west we try and find elegant or innovative solutions to challenges, instead of tackling them with brute force or hours of monotonous labour.

The philosophy for getting rich in the west is to invent something or start a trend that makes you rich, but in the east it is believed that people get rich by giving it your all and working hard. I see this as a work smarter Vs work harder difference viewpoint, but I don't think anybody could say either was wrong.

So I was reading an article over at Gamesutra (registration required) which talks about some developer comments on the next gen consoles from the Japanese magazine Famitsu.

One of the comments was by Keisuke Kikuchi (Fatal Frame) about the PS3 and he said

It has a very attractive high machine spec. It may be difficult to design a system that can balance out the use of its power, but it should be worth the effort.

So that makes we wonder wither the XBox360 is using a work smarter development approach and the PS3 is requiring developers to work harder to get good performance out of the system.

And that makes sense when you look at the architectures. The XBox360 has been designed so it can run general purpose computing applications just as well as games, plus the graphics chip has been designed so that developers don't have to worry about bottlenecks. So if a developer wants to put a few background proses into the game for physics or reflections I don't see why the XBox360 won't be able to handle it without lowering framerate and causing a bottleneck.

The PS3 on the other hand has some serious architecture concerns, specifically around data access to the memory from the cell chip. This might mean that developers choose to develop more processor light games, but Sony has been marketing the PS3 as a super computer that happens to be able to run games, so that makes me think that the PS3 is very procedural based and won't be able to handle many background processes. I wonder if Sony really knows how the PS3 will preform because they haven't addressed any of the statements made by Microsoft personnel about the PS3 architecture.

Only time will tell, but I still find it interesting that both sides think they have the upper hand, and possibly because of their cultural differences.

The new War Of The Worlds film is out in the UK on the 1st of July and I have been eagerly anticipating it since I first spotted it on IMDB while I was looking at Spielberg's Film List.

One of the things that is a kind of grey area about the film is the alien ships because in the book they are silver pods with three legs, but in the classic scifi film they are flying hoverships. So I have been waiting to see what they look like. I have heard they are the three legged kind, but I still want to see for myself.

IGN has a Review for War Of The Worlds for mobile phones, made by GameLoft (who make mobile phone games). And in the game you play as an alien ship killing humans, but if you go to the game's Screenshot Section you will notice that the pictures with the alien craft on have been blurred so you can't see it.

Now I didn't realise that this was a big secret and after looking for leaked pictures I can't find any, and now I really want to know what they look like.

Recently I have been struggling to post anything. Mainly because I have just been sleeping until noon and doing life stuff. I want to start getting up earlier because I get more done that way so after posing this I am going bed instead of starting up MSN, starting up a multiplayer match or going through any of my feed subscriptions. Normally to post something when there isn't anything new I would go through my draft posts, but I am just not in the mood right now.

I bought a book on C yesterday, so I can take a look at the language and build a few apps that display how poor the language is compared to todays managed code languages. The book I have bought is C Programming in Easy Steps (184078203X) purely because it is the only book on C that I could find. Most people want to learn C++ because that is what the games industry uses, but I am having a go at C because it should be easier to learn, as I don't want to take it up as my main language.

On DVD today I received Cradle 2 Grave and Big Fish. I haven't watched either yet, but I love Jet-Li and Big Fish has a good rating so I should like both.

One of the things I have been meaning to post about for a while is 4 Color Rebellion which is a blog dedicated to Nintendo and Nintendo related stuff, and it is a great blog. Recently 4 Color posted about Mario Chat-up Lines, the NES Pad Belt Buckle (just like the one captain N wore) and the shigeru Miyamoto tshirt. I love 4 Color's postings and there aren't many blogs where I eagerly wait for new posts, but 4 Color is one of them.

Monday, June 13, 2005

There is currently a gap in the market for a free filehost for small files. Nobody currently does it and so more and more sites and communities are finding out about and using YouSendIt as a stopgap solution.

Sunday, June 12, 2005

I have been playing more of the demo and I have noticed something strange going on with the shadows on occasion.

There are also some horrendous design decisions with the menus which means that you can't actually have your own control setup because it won't allow you to set a key that is already set. Now that doesn't sound so bad, but this includes all keys for planes, tanks and helicopters so there simply isn't enough free keys available to create your own setup.

Anyway to improve my flying skills (yes the helicopter is very pilotable now, but the plains are still a struggle because of the limited space) I tried flying some stuff into a drained swimming pool.

Next week is the Dr Who series finally, and I think Davros is back. Which is great because he has always been my favourite character next to The Dr, but if that was his voice on the next show preview, then his voice has deepened a bit.

NCsoft maker of many MMO games has started a new company called DirectSong which is a company formed to make music expansion packs for Guild Wars.

Initially I though this was an idea that wouldn't take, but the people creating the music have worked on games like Star Wars Knights of the Old Republic, Harry Potter, Elder Scrolls Morrowind and Total Annihilation. So the music is very good and they are currently selling the whole Guild Wars 23 track soundtrack for just $5.99, so that indicates that the expansion pack should be fairly cheap too.

Friday, June 10, 2005

FileRush has a torrent file and FileShack has a direct download. For some odd reason EA has asked FilePlanet to hold off from putting the file up, so they won't be hosting it for a while, but that won't effect most of you.

EDIT: After playing it for a few hours I can confirm that I will not be buying Battlefield 2, I might go into this in a post in the future because there are a few games that do this one thing with player tactics, but it is certainly not my kind of game.

Thursday, June 09, 2005

I was thinking about this last night because I am irritated by companies using innovation as a buzzword, and don't like how companies are still talking about the leading edge and coming up with new product ideas by locking designers away in rooms, because this is all corporate BS.

Innovative ideas generally come from necessary. So the need to solve a problem is always a good source of innovation, but the people who encounter these problems are generally people at the lower corporate level so their ideas never get hared.

Another very good source of innovative ideas is from the power users. So if it is a piece of software for example, talk to the users who use it all the time and ask them what they think of the software, and if they say "I love the software, but wouldn't it be cool if..." then you have a prime innovative nugget there that must be investigated or at least considered.

Tuesday, June 07, 2005

Apple is now going to be transitioning to an x86 architecture. Yes that's the same architecture as windows and upon discovering this I was delighted because this would mean that Apple would be directly competing against Microsoft on a level playing field. This would be great because I could have a Mac experience of my very own for only £74.99.

Unfortunately Apple sees themselves as a hardware company and that means your computer will only run Tiger, if your computer has an Apple Macintosh branded logo on the side.These systems will of course be able to run Windows, but an unbranded computer will not be able to run Macintosh software.

Apple has lost market share everytime they have moved platform. This time they will be able to keepup with the price point of a Windows computer because they will be using the same hardware, but that is the only advantage I can see from this decision. And that makes me think that they have made a mistake because they haven't increased the accessibility of the Macintosh platform beyond their traditional marketing strategy. The hardware is still a closed platform and that is still a limiting factor for growth. Microsoft on the other hand can now sell their Windows platform to the previously untouchable Macintosh user. This means that Apple has just given Microsoft a new market to exploit, and opportunity to grow.

Monday, June 06, 2005

This is a new term that has recently come into my vocabulary and the whole idea of it feels odd.

Backwards compatibility is when you have a current system that will run stuff that was designed for the old system.

Forwards compatibility is when you have stuff designed for the current system that will run on the old system.

So to put that slightly confusing fact into context.The PlayStation3 is backwards compatible, so it will run run PlayStation2 games.

And forwards compatibility then would be running PlayStation3 games on the PlayStation2 hardware. Which might mean that the games themselves and not the console would be backwards compatible, but I am not so sure.

A good example of forwards compatibility would be USB because you can use USB2.0 devises in USB1.0 ports. This is because USB is a standardised protocol.

When the series started people where making a big issue of the whole "I don't want to loose you again" thing that the Dr said about Rose, and some people where saying that the Dr was Rose's Dad and the whole thing got over-analysed, but in the last episode Rose said that the phrase "Bad Wolf" kept following them around and then the Dr said it was probably just a coincidence.

If that is so then, why has the BBC made This website. A website that for all intense and purposes only makes people talk about this more.

I don't think the reference refers to the Daleks because that would be very undalek like. And I don't think it would be Davros because that isn't his style either. I am hoping for the reference means a return of The master.

The reference could even point to the Dr, because the whole of episode 11 was just an excuse to get one of his enemies to call him a killer at the dinner table. Probably so it came across as an analytical observation instead of an insult, but keeping with the fairy tale reference he does have big ears.

I thought all the big news sites would have raved about this so I didn't bother posting anything about it, but they haven't, so I will.

If you have a look at the XBox360 Camera Accessory you will notice that it has two cameras in it. This is significant because for years Microsoft Research has been doing research into the stereo vision from two webcams placed on top of the monitor and what can be achieved with this data.

Smart FramingSometimes the subject in a webcam image is only small, a person's head for example normally does not fillup the whole picture. So MSR developed smart framing to intelligently zoom and track objects of interest.( Direct Link AVI )

Gaze CorrectionThe whole idea of this project was to solve the problem that people never look directly into their webcams. So a 3D model of the person is created and manipulated so that it looks like they are looking directly into the camera and at the person they are talking to.( Direct Link AVI )

Smart IconsThis is icons painted over the video of the subject. So you could dress yourself in a hat or put other emotions on your webcam video.( Direct Link AVI )

Background substitutionThis is my favourite because it replaces the background of the subject with anything you like. So if you where playing a game of poker in a virtual casino and it was one where you had videos of all your friends playing on the screen at the same time. The backgrounds of all the players could be replaced with backgrounds more fitting of the casino. Thus making the whole experience more atmospheric.( Direct Link WMV )

GWindowsIs effectively a 3D version of eyeToy used to control windows.( Direct Link WMV )

Now all this is going to require a lot of multithreaded processing power, so its lucky then that the XBox360 has 3 CPUs.

I have been playing through Wing Commander Prophecy, one of the very few space combat games I haven't gotten around to playing. The game runs brilliantly under XP, but the cutscenes between missions and the conversations with other members of crew out of combat that provide the back story are hopeless because they run far too fast.

Its not a bad game, but it is tireing without the backstory because I am just jumping into missions and kill stuff without context.

Saturday, June 04, 2005

Something that has been bothered me for years is how to store data in memory, but in a secure way so that nobody can use a program like ArtMoney to search for it in memory and change the value. This would be important for transmitting secure data across the net or storing the health data of a video game character if you rally didn't want anybody to change it.

So I created this test app:

It takes an Integer and stores it in memory by using two methods. The first just stores the number normally and the second stores it via a secure method.

This method isn't as robust as I probably would have liked and I don't fully understand how it is generating the encryption key, and this is the first time I have worked with data streams which is probably why I have had a little trouble, but it works.

In the declerative space:

Private ms As New System.IO.MemoryStream 'memory stream in memmoryPrivate Rijndael As New Security.Cryptography.RijndaelManaged() 'encryption class for doing the encrypting and decryptingPrivate cs As New Security.Cryptography.CryptoStream(ms, Rijndael.CreateEncryptor(), Security.Cryptography.CryptoStreamMode.Write) 'links the data stream and the cryptography transformerPrivate w As New System.IO.BinaryWriter(cs) 'writes the data as binary witch is needed for use with the the strwam

Then to store a varible:

w.Write(passedVal) 'writes passedval as binary to ms and uses Rijndael to encrypt the streamcs.FlushFinalBlock() 'clears the write buffer apparentlyms.Position = 0 'sets the index back to the start of the stream, this is probably so you can write multiple bits of deta in the same streamTo access the varible:

Thursday, June 02, 2005

I was looking at Black for the PS2, it should be out before Christmas, but it Looks stunning. In particular, while I was looking at This screenshot I realised that it looks better than most XBox games. The developers have said that for any badguys you kill, instead of helping performance by having their dead bodies disappear while you aren't looking, will instead remain on the ground throughout the entire level. I have no idea how they managed to get these kinds of visuals out of the PS2 because PS2 graphics are always very pixelated with low resolution textures, but this looks great!

I mean do you get a new graphics chip with the game that you have to put inside your PS2 before you can play the game! What are they doing!?

He is referring to that fact that more PS2 units have been sold than XBox units, but if you consider that everybody was very skepticle four years ago with the XBox. Even going as far as mocking the idea of a hard drive, they have shaken up the console market considerably.

It is good at improving, but we will be advancing to the next level with revolutionary technology. Beating us for a short moment is like accidentally winning a point from a karate master and Microsoft is still not a black belt

He is either very confident or underestimates his opponent, but if I keep with the fighting references. Sony will not recover from the PS3 if Microsoft can hurt Sony hard enough in the home entertainment department, because Sony hasn't been doing so well in the past few years, profits are falling and they are looking at ways of cutting losses, but Microsoft will keep on coming nomatter what Sony does.

The PS3 still hasn't shown its hand even after E3 and it is very unclear wither the PS3 is even ready for the processor intensive games of the future. Only time will tell.

I have always though that my university should videotape lectures so I wouldn't have to attend, and it would really help when it is time to revise for a test because you could just watch the lecturers with the relevant talks, but Massachusetts Institute of Technology has already put all their Guest Speaker Lectures Online. You can watch lectures on all kinds subjects, like How Cancer Begins or Democratizing Innovation (essentially talks about user created content).

The videos all stream very well, but they are encoded in ram format, so you are going to need a copy of Real Player or better yet Real Alternative, because it won't crash your system like Real Player does.