Minimal Tetromino Friends: Reducing lag as much as possible

Started by morningpee, December 21, 2013, 09:08:38 AM

Previous topic - Next topic

morningpee

[!--ImageUrlBegin--][!--ImageUrlEBegin--][img width=\\\"500\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/1njY7qe.png\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]


Version 5.0.1, last updated 2019-05-20

Description
This is a script that removes everything from the page except for the game itself (and the nice-looking background). This reduces lag significantly.

Games currently supported:
• [a href=\\\"http://www.tetrisfriends.com/games/Live/game.php]Arena

Sprint
Ultra
Survival
Marathon

How to install

Before you begin, install uBlock Origin!  This step reduces lag quite a bit by itself.

Step 1: Get a Userscript Manager
If you have Firefox, download the Minimal Tetromino Friends Firefox add-on.
If you have Chrome, download the Minimal Tetromino Friends Chrome extension.
If you have Opera, download the Minimal Tetromino Friends Opera add-on.

If you have Edge, get Tampermonkey.
If you have Safari, get Tampermonkey.

Step 2 (Edge and Safari only): Get the script
Go to this page.  A dialog will pop up, click accept, and the script is installed.

How to use
Visit the Tetris Friends Arena, and the script will do the rest.  The DAS URL hack does work with this.

What it should look like
Without the script installed, it will look something like this:
[!--ImageUrlBegin--][!--ImageUrlEBegin--][img width=\\\"500\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/08BJLH4.png\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]


If the Minimal Tetromino Arena script works, the page will look like this:
[!--ImageUrlBegin--][a href=\\\"http://i.imgur.com/RL8nTBB.png\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"500\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/RL8nTBB.png\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]


So anyway, try it out and post results.

[a href=\\\"https://addons.mozilla.org/addon/mtf/]Download for Firefox

last updated 2019-05-20

Download for Chrome
last updated 2019-05-20

Download for Opera
last updated 2019-05-20

Download for Edge or Safari
last updated 2019-05-20

Source code: https://github.com/TSTman/mtf

dotamistern


Intendant

When i have it activated, my site doesn't load at all D: only backround :/
Intendant, you have a voice that makes me wanna play tetris!
- yotipo, approved by Mucho

djackallstar

#3
Quote from: Intendant
When i have it activated, my site doesn't load at all D: only backround :/

same here
[!--ImageUrlBegin--][a href=\\\"http://i.imgur.com/47MSSIw.png\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/47MSSIw.png\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]

but if I do this:

var bodyStr=...;
alert('aaa'); // wait a couple of seconds
...(the following unchanged)

then the script works; the Flash object is a little too high, though.
[!--ImageUrlBegin--][a href=\\\"http://i.imgur.com/FJ0crk6.png\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/FJ0crk6.png\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]
.

morningpee

Quote from: Intendant
When i have it activated, my site doesn't load at all D: only backround :/
I just uploaded a new version.  If you install that, it should work now.  Still working on the Opera fix.

morningpee

Fixed the extension for Opera, the script should now be running correctly in all browsers.  See the first post for links.

Intendant

Intendant, you have a voice that makes me wanna play tetris!
- yotipo, approved by Mucho

morningpee

#7
For anyone who has tried Minimal Tetris Arena, do you think it should also set the Flash quality to low, to reduce lag even further?  The version of this script that I use (not the current public version) does do this, and it makes all the games on Tetris Friends run like a dream.  However, the "low" Flash quality setting also makes everything look like poop.  Thoughts?

Alexsweden

Quote from: morningpee
For anyone who has tried Minimal Tetris Arena, do you think it should also set the Flash quality to low, to reduce lag even further?  The version of this script that I use (not the current public version) does do this, and it makes all the games on Tetris Friends run like a dream.  However, the "low" Flash quality setting also makes everything look like poop.  Thoughts?

Yes! I dont care what it looks like as long as its fast!

Great work btw! I love it!

morningpee

Quote from: Alexsweden
Yes! I dont care what it looks like as long as its fast!

Great work btw! I love it!
Okay, I've updated it to set the Flash quality to "low", to decrease lag even further.  Also, the Opera extension now works in Opera 18.

Thanks for the support, everyone!

djackallstar

#10
Quote from: morningpee
How to install
Step 1: Get a Userscript Manager
If you have Chrome, get Tampermonkey.
If you have Firefox, get Greasemonkey
If you have Opera, you can skip this step.
For Fx/Iceweasel users, install any of these: ((1)'s been mentionsed in the quote):
(1) Greasemonkey: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
(2) Scriptish: https://addons.mozilla.org/en-US/firefox/addon/scriptish/
(3) Lubemonkey: https://addons.mozilla.org/en-US/firefox/addon/lubemonkey/

Both (2) and (3) are forks of (1), and they claim to have superior performance to (1) in some aspects.

For Maxthon users, install Violentmonkey:
http://extension.maxthon.com/detail/index.php?view_id=1680

For Opera users, if your version can't run this userscript, try install:
https://addons.opera.com/en/extensions/deta...violent-monkey/
Quote from: morningpee
Okay, I've updated it to set the Flash quality to "low", to decrease lag even further.  Also, the Opera extension now works in Opera 18.
Furthermore, you might also want to remove CSS, JS, images, or other annoyances
https://www.squarefree.com/bookmarklets/zap.html
.

MuchoExito

#11
Holy Freking Crap Man!!!
How Do You Change The Epic Ultra Low Definition Back To Normal???

I updated it and now it looks like if it was an unfinished art from ...

How Do I change it back to high definition?

(EDIT) Thx for your time doing this morningpee...
It actually minimizes a large portion of lagg.  ^^
But Plz Tell Me How To Return To Normal Def.  =)

(EDIT) Never mind...
I found it... '<param name="quality" value="low">'
I just had to change the "low" to "high"...

yotipo91

Thanks much! I always wanted to lower the flash quality but I didnt know how
[div align=\\\"center\\\"]

Sprints: Nullpo-26.78 (4/0),  TF-35.97, TOPW-29.461 (065-15), C2-36.58 (4.5/0)
[url=http://tetrison

morningpee

Quote from: MuchoExito
Holy Freking Crap Man!!!
How Do You Change The Epic Ultra Low Definition Back To Normal???

I updated it and now it looks like if it was an unfinished art from ...
Sorry about that.  I'm glad you figured it out eventually.  If you want a compromise between performance and not-looking-like-poop, try setting the Flash quality to "medium".

I'm thinking of making Minimal Tetris Arena a fully-fledged browser extension so you can choose page quality as a setting before the page loads.

Quote from: djackallstar
For Opera users, if your version can't run this userscript, try install:
https://addons.opera.com/en/extensions/deta...violent-monkey/
Thanks, I've been looking a userscript manager extension for Opera but couldn't find one.

Quote from: djackallstar
Furthermore, you might also want to remove CSS, JS, images, or other annoyances
https://www.squarefree.com/bookmarklets/zap.html
There are no images or CSS left on the page from the original Tetris Friends code.  I added the background back in for æsthetics, which shouldn't affect performance.  I suppose there are still a few JS listeners still on the page if you don't use AdBlock.  I'll do something about that in the next update, thanks for the suggestion.