Monthly Archives: May 2012 - Page 2

Portal editor

No, this has nothing to do with real programming (those SharePoint guys…) 😉 Rather, it’s about the Valve game Portal 2 that now has a editor to create your own levels. See this.

This started me thinking… What if… other publishers can catch a hint and provide an editor to say… Mass Effect 3 Multiplayer. Just think…. You will of course have to share your maps to all the players that want to join in and so on but that would be obvious (unless you want to surprise everyone with hidden dangers and stuff hehe).

What would be needed? First a terrain editor (think of the old Sim City games), then buildings (think of the The Sims like games) and finally something like the Portal editor (though Sims editor also contain loose items inside buildings…). They can of course provide a series of ‘default’ terrain maps as well. If someone ever created something like this it could start a new game creation craze and perhaps some fun for a few million people (gamers). Perhaps better yet – what if you can ‘string up’ some maps in a sequence and you have the building blocks to create your own game/world. Of course, creating a fully functional game on its own would be a lot more complex than this. I’ve been thinking/dreaming of something like this for year actually. If only I had the time/skills/tools to do it…

Is someone out there taking notes? (throwing hints in BioWare’s/Valve’s direction hehe)

ME3 war assets

Well, I started a second play-through of the game to try and ‘max’ out everything I could or do it as best possible. In the process I discovered a few ‘mistakes’ I made during the first attempt – like loosing Miranda (don’t ask me how I managed to to that).

As far as alien assets I got all the possible fleets including both Quarian and Geth fleets. Previously I could not for the life of me get both – had to choose between them. It turns out you have to leave the Rannoch missions until the very end so your Paragon/Renegate is high enough to choose one of the ‘overriding’ dialogue options. In the first iteration I even managed to get Tali to commit suicide… ouch!

Another thing I discovered that I didn’t know before was that the Omega missions are not accessible if you have Mordin and the Genophase cure saved since Maelon isn’t required to get the possible cure anymore. I happened to have both so I missed the Omega mission(s) again. Then there was the pleasant surprise to have Miranda survive her Horizon mission. Again I managed to miss the critical dialogue decision the first time that managed to ‘save’ her.

So in the end I managed to gather a war asset strength of just below 8000 (7978). I promoted a couple of multiplayer ‘squads’ as well that helped and I could have tried to add some more if I wanted.

Of course to actually make use of all those assets you must play the multiplayer (each day to keep it 100%). I’ve started to really like it but there are a couple of things I could suggest they add to the multiplayer ‘experience’ – like having the ability to invite friends from in the game (say on the lobby screen or just after finishing a good game where you were impressed by someone).

I also like the new multiplayer manifest pages they added (e.g. mine). They should also add stats on your kills as well as kill count per weapon/power. This could make it useful to see what weapons/powers you do the best with so you can enhance it or improve how you play. Of course, this is also useful to see how your friends are doing and how you all can compliment each other.

A couple of screenshots of the war:

The fleets arrive!

This sequence really is the epic high-point of the whole ‘Mass Effect’ series. The moment you/Shepard worked to hard to achieved. Pitty it turned out to be all for nothing…

And starts to move towards Earth…

Open fire!

Engaging the Reapers

Fighters enter the battle…

Fighters start to move around

The Reapers starts returning fire!

Alliance ship gets blown to hell (and back)

Chaos, blood and guts and more chaos!

This is not war – this is carnage and the Reapers are feasting…

Update: Well I’ve finished the game again – this time with fleet strength maxed out so that when I chose the ‘destroy’ option (don’t get me started about the bad ending again…) that hidden/secret video clip plays hinting that Shepard may still be alive. To be honest – that is more like I would have liked the game should have ended… Alternatively, a clip of Shepard and Garrus meeting at the bar (in heaven) should have been played… (ok but Garrus is not dead yet in ‘my’ game’s ending…).

Loading custom resources

The idea to use ‘custom’ resources in a .Net app might not make sense for all – and there may be times when it does not make sense at all since .Net apps (using VS.Net) have a built-in editor to manage embedded resources for an app. But… {here it comes} there could be some more flexibility to do it yourself like the ‘resource files’ does not have to be all located in the same directory (from a source point of view) and you can choose whether you want to include the files separately from the main executable when distributing the app.

First off, to you have to add a file (the resource) to the project – either by using the ‘Add new Item’  or ‘Add Existing Item’ context menus. Then under ‘Properties’ of the file ‘Build Action’ to ‘Embedded Resource’. Optionally you can set the ‘Copy to Output Directory’ but for this blog entry it won’t be used. Take note of the relative directory name (to the project’s root) since that will become part of the name of the resource – including the exact ‘case’ of the letters. For example, adding a text file named ‘CreateTables.sql‘ under a project directory ‘SQL‘ would result in a resource name ‘<Default namespace>.SQL.CreateTables.sql‘. Yes that is correct, the default namespace of the project is prepended to the full resource name.

Now to use the resource file (actually only the content since the file name has no use inside the project) you can use the following code:

public static string GetResourceByName(string name)
{

Stream s = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(name);
System.IO.StreamReader sr = new StreamReader(s);

return sr.ReadToEnd();

}

…

string sql = GetResourceByName(‘myNamespace.SQL.CreateTables.sql‘);

One small note: this example code does no error checking.

You can make the resource name a constant inside the project or create an enum using something like a string value attribute to match the enum entries to a string or something. Also, this example assumes the content is a text file but you can use the same principle of any type of content (like images, audio, video or whatever).