Monthly Archives: April 2012

After Mass Effect 3 – what if..

Part one of … not sure
The following is just a couple ideas of how things could ‘be’ after the events of Mass effect 3 – despite the bad ending… ūüėČ
Since there are a lot of things not actually ‘shown’ in the final cut scenes we are left to wonder about a lot of things like what happened to some characters, planets, technologies etc.

My preference for the ending is of course the ‘destroy the Reapers’ option.

First off – a couple of things that can be directly deduced from the final cut scenes:

Some characters definitely (from what I can see) survived – like Joker, Liara, Garrus, Ashley/Kaiden, the Prothean and Admiral Hackett. Possibly Tali, Grunt, Jack, Jacob, Zaeed, Kasumi, Miranda¬†could also have survived. I’m a bit unsure about Wrex since there was a cutscene just before the ‘run to the beam‘ scene where he and some Asari commandos were hit directly by a Reaper beam. Most of these characters would have been on the Normandy when it crashed (but I’m still totally confused how they managed to get back to the ship at all and why!?). They would be stranded in the middle of nowhere between points where Mass relays were. That implies they would be nowhere close to any known planets or space traveling routes which implies no one else would know where they are as well. Sheppard is almost surely dead unless that secret ending hint is true (only possible if you choose the destroy option with very high war readiness). Anderson is dead – period. So is Thane and Mordin.

Most the major civilizations home planets are destroyed – except for Sur’Kesh’s (Salarian), Rannoch (Quarian/Geth) and Tuchanka (Krogon) (which is a wasteland anyway). To be specific the planets Thessia (Asari), Palaven (Turians), Dekuuna (Elcor), Kahje (Hanar and Drell), Irune (Volus), Khar’shan (Batarians) and of course Earth are destroyed or very close to it. There may be survivors but the best chance for survival would be small colonies that might have been secondary targets for the Reapers which they would have attacked later if they survived. To summarise – there are survivers but they are spread all over the place and isolated. Many small colonies might actually die if they cannot survive on their own.

Although the relay network was/is (tenses are gona be confusing since I refer to fictional stuff here) disabled or destroyed depending on ‘Sheppard’s choices travelling between major planets are difficult if not impossible in a reasonable time. There is a posibility that some could have survived – those that has not been activated, discovered or disabled in the past. Even so the network as a whole would be out of commission for all practical purposes. FTL drives would still operate but since most technologies were based on the relay network most civilizations would not have bothered to make advances in FTL technology for very long distance travel. Even if they try it it could take years, decades or even centuries to travel to other systems – especially those that are on the other side of the galaxy. Think of the poor Quarian fleet that have to travel back home (provided any survived the final battle over Earth). Then again they were ‘used’ to long term space travel so perhaps… If any Turians or Asari ships survived they would also have a very long journey ahead of them. The same goes for Krogon which probably have to hitched a ride with the Asari since Tuchanka is on the way to Thesia as seen from Earth.

Pockets of small fleets that might have been traveling or battling Reapers in remote locations would also be stranded. It is assumed that most of Earth’s forces were at the final Earth battle so these pockets might mostly be those of other species.

The Citadel is destroyed or very badly damaged. If anyone survived the Reaper take-over they probably would have died during the final ‘beam’ event. Still, it is a massive structure so perhaps parts of it could have survived or could be re-used for rebuilding something else.

Other technologies might also be affected. During the final conversation with the Catalyst (ok more like a¬†monologue) it is stated that some organics already contain some synthetics. Whether that means they also would stop working given the destroy option is unsure. The same might apply to the ‘control’ option as well. With the synthesis option those technologies obviously will survive. So the general feeling I get is that technologies like biotics and Mass effect type weapons would still be usable.

Deductions and theories.
So how could things change given some time of recovery? Although the Earth’s surface has been all but destroyed the survivers have access to all the element zero formally used by the Reapers. That would give them a good chance to recover more quickly. Perhaps the same would happen on Thesia and Palaven as well. Using the larger concentrations of element zero some more advanced FTL drives can be developed.
Humans are adaptable and if (real) history teach us anything even major disasters can be overcome as long as there are a few survivors. The biggest threat (other than surviving Reapers) would be pirates that would also be desparate after the whole invasion. They would strip any resources they can lay their hands on. Actually, any survivors would fall into this description.

One theory or idea I have is about whether any Reapers might have survived the ending – given the destroy option. If it was only the blast from the Catalyst that killed/disabled them then there is a chance that some might have survived in deep space away from the relay network. I don’t believe they would have sent all Reapers to the final battle over Earth – not even an AI would be so foolish to take the chance that some enemy can potentially wipe out all of them in one single battle. Also, given their long history they more than likely have multiple hiding places.
Then if the Catalyst merely used a signal to disable them why would the all willingly simple ‘kill’ themselves? What intelligent being would willingly self destruct just by getting a signal? Some could have rebelled or refused to obey. This is all speculation but it does raise one big problem. If any of them did survived the organics would still have a major problem! Being almost wiped out, many isolated or spreaded thin it could only mean the Reapers would still have won and can clean up the survivors and then start rebuilding for the ‘next cycle’… This is one of the reasons I don’t like the current ending of the game – by removing the relay network any further resistance would also be useless and destroyed.
If Sheppard choose one of the other two options then the Reapers definitely would have survived. On the Mass Effect Wiki it is stated that the Reapers then ‘peacefully’ leave the galaxy… but why would they stay away if they need to harvest organics to survive themselves?? A predator cannot stay without food forever…

Another totally different idea I have is – what happens in other galaxies? Do they also have Reaper like ‘control’ mechanisms to avoid synthetics from destroying organics? Even if the Reapers in the Milkyway do get destroyed how long would it take for such ‘alien-reapers’ to realize the vacuum of power in this galaxy and come over to prey on/help organics? Then again it was never stated definitely that the Reapers are ‘only’ from the Milkyway. They could even be from another galaxy for all we know.

Yet another idea is what is the posibility that some civilizations somehow did not encouter or refused Reaper tech? They would then develop on their own – slower but without the influence of Reapers. How would they fit into the bigger picture? Such a group could develop tech that could be unknown to the Reapers and possibly have no defences against. Of course they might have the same issue with developing AI’s that may rebel but there is also the posibility that they survive or sidestep that problem. However, such a group would not fit into the Mass Effect universe at all and thus could be ignored – sorta.

Given that Javik survived and he can read/talk Prothean he could help with technology discovered at Prothean ruins. They were alway presented as very advanced and the ability to understand such discovered tech could be very valuable. The problem is just that he and the rest of the Normandy crew are stranded somewhere out ‘there’. Just imagine Liara and Javik conversations about discoveries she made – during all that time they are stuck on that alien planet… but Javik might actually get crazy of it all ūüôā

If Sheppard and Mordin managed to create and spread the cure for the genophage the Krogon would again thrive on their planet, despite the conditions. This is one good reason for the relay network to be disabled. The Krogon could then only expand to close-by systems when they start expanding again. A problem would be if Wrex did not survived (which I suspect). This would mean the Krogon would once again fight among themselves but at least it would stay ‘local’ only on the planet. I kind of felt sorry for them in that situation.

The Rachni is one of those possible good and bad things depending how they turn out. If any of them survived the final battle they could possibly be a problem on Earth because of their past history and the misstrust between other species and them. Thankfully Sheppard didn’t bring a thresher maw along as well!

So what would happen if among the debries of the destroyed Reapers they found plans or notes on how to build a new relay network? That could be a very interesting avenue for a future direction for the Mass Effect universe. Even if they did find tech like this it would take very long to establish a new relay network as you have to first travel to the destination manually to build a ‘destination’ relay before anyone can jump to that point. Even then you have to use ‘local’ resources at that location to build that relay. This makes me wonder how the network was built in the first place and how long it took? Certainly some ‘old’ gates as mentioned before could still be there – ones deactivated, burried or disabled that can help to spread the new network again. Would this be a good thing? Who knows? At least if the network between the major civilizations could be restored it could help a lot. There is also the chance that the Reapers themself did not actually create the relay network but inherited or conquered it from someone else. Perhaps the ‘gate/relay’ builders still exist somewhere in the universe or they were the first¬†victims of the Reapers/AI’s.

Catalyst is lying idea

I’m sure I’m not the only one that has thought about this idea. Given how powerful mind control abilities the Reapers (Saren)¬†had it is not unreasonable that everything the Catalyst¬†supposedly said could be a lie to¬†accomplish something else. Also seeing that the relays, Citadel and lots of other technology were actually ‘theirs’ it is not hard to imagine that even the Crucible was actually their design just waiting to be discovered and used by organics to do their bidding. They could have used the attack from the combined fleet from the organics to simply get all remaining resistance in one place to wipe them out in a single battle. It would be a terrible tragedy that Sheppard played right into their hands (perhaps under their influence) – ironically and unknowingly following the same path as Saren. Just perhaps that is why the Normandy was running away from the Sol system… to get away from the influence. If so hopefully they took Sheppard’s body along as well that might still have been laying next to the beam dreaming the whole encounter with the Catalyst… (One issue with this idea is that was Sheppard;s actions that let to the Relay network destruction which stranded the Normandy so how could the crew have Sheppard with them while they crashed… questions, questions, questions…)

This might open the possibility that there could be a continuing story involving Sheppard somewhere (but BioWare did state that this game would/should be the last involving the character… but… they could also be lying like the Reapers hehe). ¬†Perhaps we’ll have to wait for part four of the trilogy (Mr Douglas Adams would have been proud ūüėČ )

But these are all just ‘what if’s’…

Music of Mass Effect

Now and then you come across tunes or rythms in places that just grab you or get stuck in your head. These usually have some kind of association to something you enjoyed for some reason. The music and sounds of Mass Effect does this very well. Despite the game’s ending (don’t get me started on that again) all the music of the game really ‘mean something’ as it portray some aspect of the emotion or situation of that part of the game. I firmly believe this is a must in any story that can make use of it – like TV, movies, games and yes, even old radio hehe. Books are of course a bit older but it could have been very interesting if you could read a book and have the emotion of the current stage playing somewhere in the background… hint for ebook makers… hehe

As for Mass Effect (the whole series) even the first and second games’s music did the same even though they had a different composer. I actually liked that too. When you start the original first game (Mass Effect) with the opening scenes introducing the story and the Normandy the theme music really set the stage – futuristic, expecting excitement, anticipation adventure etc. Even the ‘new worlds’ or ‘uncharted worlds’ theme afterwards reminds me of fond memories of the game (even though the scanning for resources really became annoying after a while ūüôā ). And who can forget the first time you close in on the Citadel! The music playing adds to the size, awe, mystique of the place!

Mass Effect 2 also had some new music that set it apart from the original. The whole shift to the ‘Cerberus side’ changed things but the music portrayed a more positive or excitement idea. Who can forget the almost overly excitement of Grunt and his comments on the battlefield about how ‘good’ he is ūüôā

The third/last game also shines at these. The opening scenes of the game – even before you start playing really tells you something of the game. The atmosphere have changed again. There is a feeling of more drama, sadness, fear. Perhaps almost too much as the overall feeling is leaning towards the fear/sadness side. The only real positive/uplifting themes are when Admiral Hacket gives his speech and the fleets arrive to save Earth. Then there is the really scary theme of the ‘Ardat Yakshi’ that kind of creeps you out just hearing it.

Overall each game’s music sets a general theme and tells you about the direction of the story.

1. Introducing a new exciting, mysterious world of adventure.
2. More heart pounding action/excitement of combat, preparing for the real big battle ahead
3. Fear, confusion and sadness of the coming battle, loss (of friends and the war)

Some notable themes I like(ed) are:

1. ‘The Mass effect’
2. ¬†‘The Normandy’
3. ‘The Citadel’
4. ‘Spectre Induction’
5. ‘Virmire drive’
6. ‘Uncharted worlds’
7.  Uplink
8. ‘The Illusive man’
9. ¬†‘A Rude awakening’
10. Thane
11. ‘Grunt’
12. ‘Tali’
13. Mordin’
14. ‘Jack’
15. ‘The end run’
16. ‘Fate of the galaxy’
17. ‘Leaving Earth’
18. Mars
19. ‘The view of Palavan’
20. ‘A future for the Krogan’
21. ‘The Cerberus plot’
22. ‘Prothean beacon’
23. ‘Stand strong, stand together’
24. ‘I was lost without you’
25. ‘We face our enemy together’
26. The fleets arrive’
27. ‘I’m proud of you’
28. ‘Das malefitz’

If it wasn’t for the music the game wouldn’t have been half as good it is. Despite the ‘bad’ ending I’ll still have fond memories for a couple of years about the whole ‘Mass Effect’ world. It really sets it apart from most other games/shows that is currently around. For example – despite what an impact the ‘new’ Battlestar Galactica had (around 2004) who actually remembers anything about it?? – since it had no music, no themes that reminded you of anything noteworthy that happened. Hell, I have better memories about the original Battlestar series that at least had a theme song!

Revisited – XML File as database

I’ve again relooked at the idea of using a plain XML file as a source of a ‘small’ database. The previous attempt resulted in me going down the path of using datasets (typed and non-typed).

This time I started with a set of very simple classes (.Net/C# classes) that when you serialize them to XML it looks very much like a small data store/structure I also happened to use for another import/export genealogical database app I created.

Effectively through the use of ‘Generics’ I am able to create a simple ‘base’ class with which any such small in-memory database can be created/used/persisted to and from disk again. At the ‘lowest’ level I have a class that only does 3 things: Create the data store, load from disk/file and then save to disk/file. It makes use of a small utility class that handles serialization to (xml) files.

public interface ISmallDataStore
{

void CreateNewDataStore();
void LoadDataStore(string source);
void SaveDataStore(string destination);

}

public abstract class SDSXMLFileBase<T> : ISmallDataStore where T: class
{

private string sourceFilePath;
internal T DataContainer;

#region ISDS Members
abstract public void CreateNewDataStore();
abstract internal void SetRelationObjects();
abstract internal void RefreshCacheObjects();

public void LoadDataStore(string source)
{

sourceFilePath = source;
DataContainer = SerializationUtils.DeserializeXMLFile<T>(source);
SetRelationObjects();
RefreshCacheObjects();

}
public void SaveDataStore(string destination)
{

sourceFilePath = destination;
SerializationUtils.SerializeXMLToFile<T>(destination, DataContainer);

}
#endregion

}

Two abstract methods are added to facilitate functionality that will be explained later (SetRelationObjects and RefreshCacheObjects). They are optional and but I needed them for specific reasons.

The next ‘layer’ is a class that implements ‘DataContainer’¬†with data structures you want to use as the data store. These data structures are what is going to be saved/serialized. The following is small example of what it looks:

public class SampleSDSImplementation : SDSXMLFileBase<SampleTDataContainer>
{

public override void CreateNewDataStore()
{

DataContainer = new SampleTDataContainer();

}

}

Through the use of serialization attributes you can define the way the resulted xml would look that is stored. In my example the class SampleTDataContainer is effectively the data store and its fields are decorated with the attributes like XmlElement, XmlAttribute etc.

The following is a small excerpt from a sample class:

[Serializable(), XmlType(“data”)]
public class SampleTDataContainer
{

[XmlElement(“p”)]
public List<Person> Persons = new List<Person>();
[XmlElement(“m”)]
public List<Marriage> Marriages = new List<Marriage>();

}

[Serializable(), XmlType(“p”)]
public class Person
{

[XmlAttribute(“id”)]
public int Id { get; set; }
[XmlAttribute(“fn”)]
public string FirstName { get; set; }
[XmlAttribute(“sn”)]
public string Surname { get; set; }

}

A basic output of the (xml) file will look something like this:

<?xml version=”1.0″ encoding=”utf-16″?>
<data>

<p id=”1″ fn=”Anakin” sn=”Skywalker” … />
<p id=”2″ fn=”Padm√©” sn=”Amidala” … />

<m id=”1″ mno=”1″ hid=”1″ wid=”2″ … />

</data>

Now that is all good and well for very basic stuff but what about a few more advanced requirements, like auto generating the ‘id’s, having ‘references’ between the objects (the Marriage class will have two references to Person (husband and wife), Person will have two (father and mother) and even reverse referencing (Person having a list of Marriage objects..).

Setting up those references in code is easy but once it has been serialized and then deserialized you get all kind of funnies. For example, An instance of a Person class might have a reference to a marriage and that Marriage instance has a reference to the same Person instance (the first time when you set it up in the code). Next time when the data is loaded from file (deserialized) the Marriage instance reference will not pont to the same instance as the Person instance (and vice versa). Ok this is a generic explanation of the issue but hopefully you get the drift… ¬†Well, this is where one of those 2 methods I mentioned in the original base class comes in – SetRelationObjects. To ensure all referencing objects (at run-time) are actually referencing the correct objects you can do something like this:

internal override void SetRelationObjects()
{

foreach (Marriage m in DataContainer.Marriages)
{

if (m.HusbandId > 0 && m.Husband == null)

m.Husband = DataContainer.Persons.FirstOrDefault(h => h.Id == m.HusbandId);

if (m.WifeId > 0 && m.Wife == null)

m.Wife = DataContainer.Persons.FirstOrDefault(w => w.Id == m.WifeId);

}
foreach (Person p in DataContainer.Persons)
{

if (p.FatherId > 0 && p.Father == null)

p.Father = DataContainer.Persons.FirstOrDefault(f => f.Id == p.FatherId);

if (p.MotherId > 0 && p.Mother == null)

p.Mother = DataContainer.Persons.FirstOrDefault(f => f.Id == p.MotherId);

//Reassign union objects since deserialization created new/separated instances.
for (int i = 0; i < p.Marriages.Count; i++)
{

Marriage m = p.Marriages[i];
p.Marriages[i] = DataContainer.Marriages.FirstOrDefault(u => u.Id == m.Id);

}

}

}

The fields for things like (Person) Father and (Person) Mother was not shown in the class listing but you can probably guess what they should look like. These fields are ‘NOT’ serialized per se but rather handled by adding a (int) FatherId and (int) MotherId set of fields that ‘ARE’ serialized. It both makes it easier to read and smaller to store in the xml file. When deserializing only the ‘id’ fields are restored letting the¬†SetRelationObjects method correct the referencing just after load. There may be other ways to do these kind of things but I choose this one as it suits me at the moment.

When designing classes for serialization it helps to know a couple of things about Xml serialization attributes and hidden methods. Lets say you want to have a public field in your class (like the Father/Mother ones) that you do not want exposed by serialization you can use a public bool ShouldSerialize<FieldName>() method inside the class. e.g.

public bool ShouldSerializeFatherId()
{

return FatherId > 0;

}
public bool ShouldSerializeMotherId()
{

return MotherId > 0;

}

[XmlAttribute(“fid”)]
public int FatherId { get; set; }

[XmlAttribute(“mid”)]
public int MotherId { get; set; }

private Person father = null;
[XmlIgnore]
public Person Father
{

get { return father; }
set
{

if (value != null)
{

father = value;
FatherId = father.Id;

}
else

FatherId = 0;

}

}
private Person mother = null;
[XmlIgnore]
public Person Mother
{

get { return mother; }
set
{

if (value != null)
{

mother = value;
MotherId = mother.Id;

}
else

MotherId = 0;

}

}

Helper methods for interacting with the data

It is possible that you can use the data container as is and directly call methods on the Person objects but that means you could be duplicating a lot of code or functionality each time you use it. To help with this I added a few simple helper methods in the class that implements the base class (SampleSDSImplementation). For example:

public Person AddPerson(string firstName, string surname)
{

int nextPersonId = 1;
if (DataContainer.Persons.Count > 0)

nextPersonId = (from p in DataContainer.Persons select p.Id).Max() + 1;

Person newPerson = new Person() { FirstName = firstName, Surname = surname };
newPerson.Id = nextPersonId;
DataContainer.Persons.Add(newPerson);
return newPerson;

}

public Person FindSinglePersonById(int id)
{

return DataContainer.Persons.FirstOrDefault(p => p.Id == id);

}

As an example of how to use it look at the following:

string dataStoreLocation = System.IO.Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop), “TestSDS.xml”);
SampleSDSImplementation sdsSample = new SampleSDSImplementation();
sdsSample.CreateNewDataStore();

Person vader = sdsSample.AddPerson(“Anakin”, “Skywalker”);
vader.IsMale = true;
vader.History = “The baddy of the story”;
vader.NickName = “Darth Vader”;
vader.PlaceOfBirth = “Tatooine”;
vader.PlaceOfDeath = “Death star 2”;

Person padme = sdsSample.AddPerson(“Padm√©”, “Amidala”);
padme.DateOfDeath.Year = 2005;
padme.PlaceOfDeath = “Polis Massa”;
sdsSample.AddMarriage(vader, padme, 1, null, “Naboo”, null, “Mustafar”);

Person luke = sdsSample.AddPerson(“Luke”, “Skywalker”);
luke.IsMale = true;
luke.ChildNo = 1;
luke.NickName = “Master Luke”;
luke.PlaceOfBirth = “Polis Massa”;
luke.Father = vader;
luke.Mother = padme;

sdsSample.SaveDataStore(dataStoreLocation);

Conclusion

This is a simple way to build a little database (don’t fool yourself that you can easily build huge databases with this hehe) with which you can run a simple system that requires small database that can fit into memory.

See example project here: SDSTest

 

QPerfmon 1.8.2

I made a small change to my Quick Perfmon tool so that the performance counter definition set files (qpmset files) can also save the location of the application window’s size and location. This is useful if you want it to always load up to the same position on the screen – say when you have multiple sets and you want to position a couple of these windows with a specific layout.

Go grab it here

ME3 ending – more

Wow, there are some really good comments out there that summarise the ‘problems’ we (the fans) have of the Mass Effect 3 ending (that isn’t an ending many times and for none..)

See this: ‘All That Matters is the Ending, Part 2: Mass Effect¬†3

I could not say it better myself…

Although Bioware is within their rights to do whatever they like with their ‘game’ I sincerely hope that they consider doing something to change/improve the ending in such a way that all parties (they included) could be happy about it.¬†Admittedly, that¬†won’t¬†be easy but what needs to be done needs to be done. They started the line now they have to hold it!

Create SQLCE database in code

This is not exactly something new or breaking any new boundaries but it could be a useful tip for anyone that wants to make use of SQLCE databases from a small .Net application. There are some great tools and utilities to create a new SQL compact edition database using some UI but what if you want to automate the process or allow a client app to create a new database ‘on the fly’ or when needed?

It turns out it is not really that hard at all. All you need is a reference to the System.Data.SqlServerCe assembly Рwhich is installed when you run the Sql server compact installer. Then you simply need to use the following code (example):

string connStr = string.Format(“Data Source={0};File Mode=Shared Read;Persist Security Info=False”, sdfFilePath);
using (System.Data.SqlServerCe.SqlCeEngine SQLCEDB = new System.Data.SqlServerCe.SqlCeEngine(connStr))
{

SQLCEDB.CreateDatabase();

}

That will create a new ‘blank’ database. What if you want to also create tables inside it? That is also very simple. I created a simple library to do that – it simply takes an input script and runs each command one by one. Each statement must be separated by a ‘GO’ statement that is on its own line.

e.g.

CREATE TABLE [TableA] (
[SomeID] int NOT NULL IDENTITY (1,1)
, [Desc] nvarchar(100) NOT NULL
);
GO
CREATE TABLE [TableB] (
[OtherID] int NOT NULL IDENTITY (1,1)
, [Desc] nvarchar(100) NOT NULL
);
GO

The class that handles it looks like this:

public delegate void CreateCmndResponseMsgDelegate(string createCMND, string message);
public class CreateSQLCEDB : BaseSQLCEDAL
{

private List<string> createCMDs = new List<string>();
public int ErrorCount { get; set; }
public event CreateCmndResponseMsgDelegate CreateCmndResponseMsg;
private void RaiseCreateCmndResponseMsg(string createCMND, string message)
{

if (CreateCmndResponseMsg != null)
{

CreateCmndResponseMsg(createCMND, message);

}

}
public void CreateCommandsFromScript(string script)
{

string[] createCmds = script.Split(new string[] { “\r\nGO\r\n” }, StringSplitOptions.RemoveEmptyEntries);
createCMDs.AddRange(createCmds);

}
public bool RunCommands()
{

ErrorCount = 0;
base.OpenConnection();
foreach (string cmndStr in createCMDs)
{

try
{

base.ExecuteNonQuery(cmndStr);

}
catch (Exception ex)
{

ErrorCount++;
RaiseCreateCmndResponseMsg(cmndStr, ex.Message);

}

}
base.CloseConnection();
return ErrorCount == 0;

}

}

Note that the base class ‘BaseSQLCEDAL’ is simply a wrapper class to handle all interactions with SqlCeConnection,¬†SqlCeCommand etc.

See CreateSQLCEDB for full example code.