2010-08-11

Gone loopy

OK, Loops of Zen is a fun game on the iPad.

We (or rather Kev) found a version that is flash based on the web.

So James and I, after a few drinks late last night, knocked up a quick javascript based version. Took maybe an hour at most.

www.loopsofzen.co.uk

6 comments:

  1. OK, James is knocking up a leader board, and I am adding code to validate that the game was one we served and has been solved so as to minimise leader board hackery..

    Of course you have to ask about IPR. More than happy to credit the creator of the game, of course. It is a great game.

    But then you wonder about IPR. There are, I believe three main areas :-

    1. Copyright. Having not seen the source code of the flash or iPad (or any) version, the game we made is not a "copy" of the code. The artwork we made is created from scratch using svgs and not a copy. It is a copy of the "idea" which is not covered by copyright.

    2. Trade mark. This is a good point. The name "loops of zen" may be a trade mark. If that is the case I am happy to pick a new name...

    3. Patent. This protects "ideas", and so if there is a patent in the game then our version is infringing that even though not a copy of the code or artwork. Patents are country specific, so it would have to be patented in the UK though and a search on the UK patent office web site throws nothing up.

    So, in short, if we are infringing IPR, I'll be happy to change so as not be, or remove the site. I suspect we are not.

    ReplyDelete
  2. OK, here is the geek bit :-)

    How do you make sure people can't hack the leader board? The final stage when solved is to take a name and post a form to record the result. This could easily be hacked...

    First, when the game is made we create a unique reference and a time stamp, and make an SHA1 hash of the reference, timestamp, the game, and a secret.

    For the hash, the game has to be normalised, i.e. all pieces treated as one of 6 shapes from the 16 combinations. This is because there can be mutliple solutions to a game so we can't simply check the solution is the right one using a hash.

    When the game finishes this original hash, and the complete final layout of the game is posted along with the name and time.

    This allows the code to check that it is a game we served (check the hash), not a duplicate (check the unique reference), is solved (check the layout sent), and check the overall time from serving to posting to leader board (check the timestamp).

    We do record in-game time from first click to solved as the leader board time, and so you could fake that but by recording the total time, this can be spotted too.

    All a good fun exercise in security of web applications.

    ReplyDelete
  3. Hey, cool game.

    I'm wondering - what algorithm is used to generate a new game?

    ReplyDelete
  4. Simple, each join between cells is either there or not, randomly, then all cells are rotated a random amount. That is all.

    ReplyDelete
  5. Well, Eleanor from Cambridge Uni, you are the king. Do post on here...

    And have you found the Easter egg yet?

    ReplyDelete
  6. This game is evil :)

    This would be a killer app on Android. Had a look on the Android market place and couldn't find anything like it.

    ReplyDelete

Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.

Missing unix/linux/posix file open option

What I would like is a file open option for "create replacement file". The idea is that this makes a new inode in the same mount p...