Page 1 of 1

Tetris Replays

PostPosted: Sun Dec 01, 2013 12:30 pm
by morningpee
Hey, I want to write an HTML5 replayer based on simonlc's "tetr.js".

My first goal is to parse replays on Tetris Friends, particularly ones for Sprint and Ultra. The GameData (that's what they call it) format is the same as for all replays from Tetris Battle (with minor variations per game). For example, this is a Battle2P replay from Tetris Friends, and this is a Battle2P replay from Tetris Battle. I can successfully replay games using the GameData from either site (using the official Flash-based replayers). It's kind of cool, you can use Ultra replays for each player in Battle2P and pit them against each other (Chocobana's replay almost always wins :lol: ).

As you can see, the replay data is very compressed, not nearly as readable as TOJ replay data. So, I've been trying to decypher the GameData format.

I know basic details about the structure of the replays. The whole thing is Base64-encoded. Inside that, there's a header that they refer to as the "TPRHeader", from offset 00-6D. That includes details like the mino style (offset 3D) and the size of the replay portion (offset 04-07), which follows the TPRHeader.

The replay portion itself is zlib-compressed, and goes from offset 6E to the end of the GameData. The replay portion is self-contained and includes enough information that it will work with any TPRHeader. For example, offset 2A-2D of the replay portion is the seed for the bag randomizer.

Anyway, I'm a little stuck figuring out the format of the replay portion, and I'm wondering if anyone else has any helpful information I can work with. Thoughts?

Re: Tetris Replays

PostPosted: Sat Dec 07, 2013 4:30 am
by Wojtek
hello,
i will look into it when i have some time.

Re: Tetris Replays

PostPosted: Sun Dec 08, 2013 2:52 am
by morningpee
Wow, that would help a lot. Thanks for anything you can find.

Re: Tetris Replays

PostPosted: Wed Apr 03, 2019 12:09 pm
by vincentwickline
Hi, I'm not sure I'm posting in the right thread but, unable to locate any
Is it the right place to play Tetris https://unblockedgames500th.weebly.com/tetris.html? or where you all play so different versions?