# The mystery of parallel lines

date: 11 Aug, 2010, actionscript: 3 FP10, complexity: , feedback (votes):

### Music - last records

There is always extra spare time during the world cup for everyone I think; it seems to me that everybody has more flexible chronograms during the cup and quite tough ones before it; at least it worked always like that with me. For us here in England the world cup finished a bit early but for me personally it carries on till the semi finals (I just been supporting South American teams all the time, hehe).

Just few weeks before the cup I have received an advertisement email speaking about of a competition, a flash game competition with subject as "the biggest flash competition ever", then I took a quick look on it, and well after I read it what I can say is that it took my attention because of the big amount of people participating on it and of course because of the great prizes. Just by chance during those weeks I've been working in an algorithm for snapping objects which works quite well for any kind of shapes (polygons) based on parallel lines. I was working on this algorithm for using it in a modified version of the famous chinese game called Tangram, which it has some modified pieces that makes everything a bit harder when solving puzzles of it. Well as I said it is based on parallel lines, also it is very light in terms of CPU consummation and works perfectly when we want to stick (snap) any kind of polygons with a parallel side facing each other.

Here is a self explanation of how it works:

Here is the algorithm performing as part of this latin Tangram game (original game manual), The psychometric test.

Guys, this algorithm has many usages and can be reused in different scenarios. Here is the source code in case you don't want to re-invent the wheel, and also a full explanation of how it was built, watch this video if you're interested on it (How to know the distance between parallel lines).

## Making the game

Anyway, one day after work I was in a pub with an old friend (Andrew Porter) talking about this algorithm, trying to clarify some ideas for participating in the competition without spending too much time and, among pints there was a light at the end of the tunnel for reusing this, making a game a bit more "dynamic" than a tangram. The concept of it was quite simple, reusing the algorithm all, based on shapes (polygons) with parallel sides facing each other all the time. So we made an ore collector picking up some gems around with some magnets, attractions, crazy lasers, flashbacks, etcâ€¦ and at the end all together was called Blizz in magnetland, don't ask me why. :)

And then, once we got a clear idea about what to do and how to do it, we started making the game. It was just before the world cup begins and it took us about 5 weeks for having it all done as it was thought from the very beginning (working only at nights and weekends, it was quite tough and a bit in a rush but nothing that could kill me).

Here is Blizz in magnetland published in Fizzy.com (The competition sponsor), take a look on it and if you like it try to beat my score, I can tell you it's close to 200.000, hehehe. Beware; this game wasn't made for those who just like running like a bull shooting around with infinity amount of bullets. This game is not easy and you may have to think for a while before solving some of the levels.