Decompiling TOJ's Flash games

Miscellaneous Tetris discussion

Decompiling TOJ's Flash games

Postby BlankedOutBox » Mon Jul 18, 2011 6:49 am

Yes, ActionScript of most of the TOJ's Flash games (http://toj.mooo.com/toj_flash/) can be decompiled by using a tool named Flare (http://www.nowrap.de/flare.html).
The engine is named Garlic, which is the same engine as TOJ's client. (Try searching "GarlicImpl" in tetris.exe)

List of interesting things from Tetris Dash (dash_090707_toj_594px.swf):
  • O Tetromino doesn't rotate at all.
  • There is an unused class named "TetrisAI". Probably they wanted to put AI battle?
  • There are some partial implementations of Anti Miss Drop item.
  • There are some partial implementations of Replayer.
  • There is a protection that prevents the game from working on local drive. But the protection is simple. It just checks the existence of "http" in the URL.
BlankedOutBox
 
Posts: 9
Joined: Fri Jul 08, 2011 12:56 pm

Re: Decompiling TOJ's Flash games

Postby Wojtek » Tue Jul 26, 2011 6:57 pm

stardust tetris has bit better protection, it connects some url on tetrisonline.jp to get authorization to play, so you can't make it work without moddification. but because if is .NET application, you can decompile it easily with ILSPy or dotPeek.
User avatar
Wojtek
Site Admin
 
Posts: 233
Joined: Sat Jun 18, 2011 4:09 am

GarlicClone v1.0 release

Postby BlankedOutBox » Tue Oct 11, 2011 12:41 pm

I created a Java port of (Flash games version of) Garlic engine, "GarlicClone".
It allows you to play simple Tetris game on near-perfectly cloned TOJ engine.
It also includes AI codes that can run TOJ's Lua scripts. (But you need JRE1.6+ and "kahlua2-v6.jar" from https://github.com/krka/kahlua2/downloads)
So you can create your own TOJ minigames now. Have fun!
You can change some of settings by editing "config/config.properties" file by any text editor. (Sorry, no key config yet)

Wojtek: Thanks for the tip! The code of Stardust is interesting too. Too bad they didn't port AI at all...

EDIT:v1.1 Released!
    T-Spin AI will now use instant lock. (It wasn't in original Flash codes)
    You can select the game mode in start-up screen. Push Left/Right keys to select.
    Anti-miss added. (kahlua2 and JRE1.6 required)

Download GarlicClone from below:
Attachments
GarlicClone_2011_10_15.zip
GarlicClone v1.1
(139.7 KiB) Downloaded 1409 times
GarlicClone_2011_10_11.zip
GarlicClone v1.0
(138.08 KiB) Downloaded 892 times
Last edited by BlankedOutBox on Sat Oct 15, 2011 8:39 am, edited 1 time in total.
BlankedOutBox
 
Posts: 9
Joined: Fri Jul 08, 2011 12:56 pm

Re: Decompiling TOJ's Flash games

Postby farter » Wed Oct 12, 2011 1:59 am

so cool
but seems t-spin AI doesn't use hard drop when performing t-spin..?
farter
 
Posts: 69
Joined: Tue Jul 05, 2011 1:34 pm

Re: Decompiling TOJ's Flash games

Postby Wojtek » Wed Oct 12, 2011 7:59 pm

great to see this released!
User avatar
Wojtek
Site Admin
 
Posts: 233
Joined: Sat Jun 18, 2011 4:09 am

Re: Decompiling TOJ's Flash games

Postby BlankedOutBox » Sat Oct 15, 2011 8:44 am

GarlicClone v1.1 is now available! See my above post to download.

@farter:
Yeah, the T-Spin AI didn't use hard drop for T-Spins because there were no codes for it.
It appears that who ported the AI codes didn't do the good job for T-Spin portions.

@Wojtek:
Thanks for the beta testing it :)
BlankedOutBox
 
Posts: 9
Joined: Fri Jul 08, 2011 12:56 pm

Re: Decompiling TOJ's Flash games

Postby Wojtek » Sat Apr 14, 2012 1:05 am

finally i found free AS3 decompiler: http://sites.google.com/site/as3extractor/
User avatar
Wojtek
Site Admin
 
Posts: 233
Joined: Sat Jun 18, 2011 4:09 am

Re: Decompiling TOJ's Flash games

Postby morningpee » Sun Dec 01, 2013 1:27 pm

I've had the most success with Sothink SWF Decompiler, which costs $80 if you're an honest person, which I'm not.
morningpee
 
Posts: 5
Joined: Mon Nov 18, 2013 9:39 am


Return to Tetris

Who is online

Users browsing this forum: No registered users and 1 guest